Swap Bridge

Swap Bridge is a permissionless open-source bridge on top of Wormhole primitives that developed by Mayan team to facilitate cross-chain one-click token swaps.

Token Bridge is a well-known bridge on Wormhole that makes transfer of tokens between two chains possible. We used generic message passing of Wormhole to create a new bridge with a different structure that contains swap information and a reference to the token bridge message so upon delivery of these messages in the Solana by relayers, drivers have all necessary data to participate in Mayan swap auction.

Post-auction, the winner, becomes responsible to swap the tokens in a flash swap transaction. in this atomic transaction winner receives the funds and has to send the promised output amount in the same transaction. After successful execution of swap, if the destination token is on Solana the relayer simply transfers the output token to user's wallet, otherwise the relayer uses token bridge to send tokens to the destination chain.

Here is an overview to what happens when user executes a cross-chain transaction on Mayan:

Last updated