Inspiration

To make cross-chain index funds possible.

What it does

With Mayan you can create an index fund with assets from multiple chains and users can invest in it from other chains without leaving their home chain. Users don’t even need to have a wallet from the other chain to invest or redeem. This is due to our bridge being completely transparent from the user's view. Currently, our index funds support cross-chain assets from Solana and Ethereum.

How we built it

We created a new bridge upon the Wormhole V2 message passing primitive which we called “Fund Bridge”. Then we built a standard for index funds that want to facilitate the Fund Bridge. We also created a prototype SDK for using the Fund Bridge protocol in web3/node.js clients. The SDK uses and follows a similar pattern to the wormhole SDK, with most parts written in js, and Solana message encoding parts written in rust using wasm. On the user interface level, we created a DApp using React that enables users to create index funds with assets from multiple chains and allow users to invest and redeem from those chains.

Here are more implementation details:

  • We’ve created a Solana program that users can access to invest or redeem funds containing a mixture of assets from Solana and Ethereum. The program uses the Generic Message Passing part of the Wormhole protocol for communicating with its Ethereum counterpart.
  • We took inspiration from the Wormhole’s Token bridge protocol to create a fee mechanism to facilitate message transfer from chains. This way the end-users do not need to have a wallet for the other chains and automatic relays can transfer the messages for a small fee.
  • In our design architecture, most of the logic of the index fund is hosted in one chain with portals that can be deployed on other chains. This way it only requires one round trip from portal to host to invest or redeem and it’s more secure and efficient compared to having index funds logic spread over multiple chains.

Challenges we ran into

Coming with backgrounds in Ethereum, developing for Solana was pretty different and challenging but it was worth it when we saw the transaction speed in Solana. Although the Wormhole V2 protocol has detailed documentation, It is still under active development and with such a complex stack, debugging was pretty challenging.

Accomplishments that we're proud of

Creating a new application bridge on top of Wormhole in such a short time. And we are proud of the UI/UX of Mayan DApp that uses our Fund Bridge SDK.

What we learned

We have learned many aspects of Solana but there is still a lot to learn. Also, we learned about the architecture of message passing in Wormhole and many details of its implementation.

What's next for Mayan Finance

  • Connecting it to Serum to make cross-chain asset management possible!
  • Implementing our protocol in other chains supported by Wormhole protocol.

Built With

Share this project:

Updates