# Table of Contents - [What is Mayan? | Mayan](#what-is-mayan-mayan) - [WH Swap | Mayan](#wh-swap-mayan) - [MCTP | Mayan](#mctp-mayan) - [Swift | Mayan](#swift-mayan) - [Auction | Mayan](#auction-mayan) - [Quote API | Mayan](#quote-api-mayan) - [Contracts (Legacy) | Mayan](#contracts-legacy-mayan) - [Relayers | Mayan](#relayers-mayan) - [User Manual | Mayan](#user-manual-mayan) - [Referral | Mayan](#referral-mayan) - [Swap Widget | Mayan](#swap-widget-mayan) - [Audits | Mayan](#audits-mayan) - [Mayan Explorer | Mayan](#mayan-explorer-mayan) - [Explorer API | Mayan](#explorer-api-mayan) - [Relayer Fees | Mayan](#relayer-fees-mayan) - [Gas on destination | Mayan](#gas-on-destination-mayan) - [Forwarder Contract | Mayan](#forwarder-contract-mayan) --- # What is Mayan? | Mayan [NextWH Swap](/architecture/wh-swap) Last updated 26 days ago Mayan is a cross-chain swap auction protocol with the goal of offering the best swap rates using auction mechanism. Mayan uses three different methods to facilicate the cross-chain swaps. These methods are complementary and can offer different trade-offs between speed and price. All three methods are powered by Wormhole message passing. * [**WH Swap**](/architecture/wh-swap) This method uses Solana as the trading hub and Token Bridge as the value transfer protocol, this method transfers the assets to Solana and on Solana driver fulfills user's trade using Mayan Flash Swap program and then if the destination chain is not Solana relayers transfer the tokens to the destination chain. * [**MCTP**](/architecture/mctp) Mayan-Circle Transfer Protocol (MCTP) facilicas CCTP as the highway for transfering the value to the destination chain and on the destination chain the driver fullfills user's trade using Mayan Flash Swap smart contract/program and delivers the output tokens. * [**Swift**](/architecture/swift) Swift is intent-centric and is the fastest method of bridging, in Swift user creates an order by locking the funds using Mayan contract on the source chain and specifying the details. The designated driver then fullfills user's order on the destination chain and brings back the proof to source chain to receive the locked funds. For users and integrators all the three methods are available under one unified interface. [![Logo](https://github.com/fluidicon.png)GitHub - mayan-finance/swap-sdk: npm package for sending cross-chain swap transactionsGitHub](https://github.com/mayan-finance/swap-sdk) [![Logo](https://github.com/fluidicon.png)GitHub - mayan-finance/swap-bridge: Contracts for publishing and verifying cross-chain swap messages using Wormhole message passing and token bridgeGitHub](https://github.com/mayan-finance/swap-bridge) --- # WH Swap | Mayan [PreviousWhat is Mayan?](/) [NextSwift](/architecture/swift) Last updated 1 month ago WH Swap Bridge is a permissionless, open-source bridge built on Wormhole primitives and developed by the Mayan team to facilitate cross-chain, one-click token swaps. The Token Bridge, a widely recognized component of the Wormhole ecosystem, facilitates cross-chain token transfers using a mint-and-burn mechanism. To expand its functionality, we leveraged Wormhole's generic message-passing capabilities to design a new bridge tailored for cross-chain swaps. This innovative structure embeds swap-specific information alongside a reference to the Token Bridge message. Upon relayers delivering these messages on Solana, drivers are equipped with all the data needed to seamlessly engage in the Mayan swap auction. Post-auction, the winner becomes responsible for swapping the tokens in a flash swap transaction. In this atomic transaction, the winner receives the funds and must send the promised output amount within the same transaction. After the successful execution of the swap, if the destination address is on Solana, the relayer simply transfers the output token to the user's wallet. Otherwise, the relayer uses a token bridge to send the tokens to the destination chain. Here is an overview of what happens when a user executes a cross-chain transaction on Mayan: The protocol fee of WH Swap method is set to 10 basis points. ### [](#wh-swap-contract-addresses) WH Swap Contract Addresses Network Wormhole Chain Id Contract Address Solana 1 `FC4eXxkyrMPTjiYUpp4EAnkmwMbQyZ6NDCh1kfLn6vsf` Ethereum 2 `0xBF5f3f65102aE745A48BD521d10BaB5BF02A9eF4` BSC 4 `0xBF5f3f65102aE745A48BD521d10BaB5BF02A9eF4` Polygon 5 `0xBF5f3f65102aE745A48BD521d10BaB5BF02A9eF4` Avalanche 6 `0xBF5f3f65102aE745A48BD521d10BaB5BF02A9eF4` Arbitrum 23 `0xBF5f3f65102aE745A48BD521d10BaB5BF02A9eF4` Optimism 24 `0xBF5f3f65102aE745A48BD521d10BaB5BF02A9eF4` Base 30 `0x11AA521C888d84f374B63823d9b873CAa3591f55` Linking Swap Bridge VAA to Token Bridge VAA Overview of the flow ![](https://docs.mayan.finance/~gitbook/image?url=https%3A%2F%2F2301516674-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNGiifMbrcug9ogAfisQY%252Fuploads%252FjiR3duGTz5H35tH6OCSF%252F1%2520FZdaklZ0YonRtJ2x65AVZQ.png%3Falt%3Dmedia%26token%3D8f1bdb42-f78e-4808-a66b-c86eadff70ec&width=768&dpr=4&quality=100&sign=eed298b&sv=2) ![](https://docs.mayan.finance/~gitbook/image?url=https%3A%2F%2F2301516674-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNGiifMbrcug9ogAfisQY%252Fuploads%252FTxyJbePmLbjLHKI24AsM%252FDesign_02-25.jpg%3Falt%3Dmedia%26token%3De642c143-735f-4a9f-805e-0aa499a41fc2&width=768&dpr=4&quality=100&sign=49218563&sv=2) --- # MCTP | Mayan [PreviousSwift](/architecture/swift) [NextRelayers](/architecture/relayers) Last updated 29 days ago MCTP (Mayan-Circle Transfer Protocol) method is powered by the [Circle CCTP](https://www.circle.com/en/cross-chain-transfer-protocol) protocol. Essentially, what we do in this method is convert the input tokens to USDC and send them to the destination chain. Simultaneously, drivers conduct an auction on Solana to identify the best provider for converting the received USDC on the destination chain into the user's requested output token. Once the auction concludes, the winner utilizes the Mayan flash swap method to complete the trade on the destination chain and delivers the output tokens to the user's wallet. The protocol fee of MCTP is set to 3 basis points. ### [](#mctp-contract-addresses) MCTP Contract Addresses Network Wormhole Chain Id Contract Address Solana 1 `Awm2zSgzMGTRraAVjRvshqLehy7mJ2Qr3maURDsoDmwi` Ethereum 2 `0xF18f923480dC144326e6C65d4F3D47Aa459bb41C` BSC 4 `0xF18f923480dC144326e6C65d4F3D47Aa459bb41C` Polygon 5 `0xF18f923480dC144326e6C65d4F3D47Aa459bb41C` Avalanche 6 `0xF18f923480dC144326e6C65d4F3D47Aa459bb41C` Arbitrum 23 `0xF18f923480dC144326e6C65d4F3D47Aa459bb41C` Optimism 24 `0xF18f923480dC144326e6C65d4F3D47Aa459bb41C` Base 30 `0xF18f923480dC144326e6C65d4F3D47Aa459bb41C` MCTP Design ![](https://docs.mayan.finance/~gitbook/image?url=https%3A%2F%2F2301516674-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNGiifMbrcug9ogAfisQY%252Fuploads%252Fc2GUq4SNkFS3n0GzWyrU%252Fmctp-design%2520%281%29.jpg%3Falt%3Dmedia%26token%3D4d5fe47a-3859-4b9c-8d8d-f9630bea9464&width=768&dpr=4&quality=100&sign=c73035ba&sv=2) --- # Swift | Mayan [PreviousWH Swap](/architecture/wh-swap) [NextMCTP](/architecture/mctp) Last updated 4 months ago Swift is the intent-based method for fast bridging and cross-chain swaps. In this method, instead of sending funds directly to the destination chain, the user creates an order by locking the funds on the source chain. The Mayan network of Drivers sees this order and starts an auction on Solana to find the best provider among themselves. The winner of the auction is responsible for fulfilling the order on the destination chain. Once the order is fulfilled, the driver receives a receipt, which can be used to unlock the funds on the source chain. Swift protocol fee is set to 3 basis points. ### [](#swift-contract-addresses) Swift Contract Addresses Network Wormhole Chain Id Contract Address Solana 1 `BLZRi6frs4X4DNLw56V4EXai1b6QVESN1BhHBTYM9VcY` Ethereum 2 `0xC38e4e6A15593f908255214653d3D947CA1c2338` BSC 4 `0xC38e4e6A15593f908255214653d3D947CA1c2338` Polygon 5 `0xC38e4e6A15593f908255214653d3D947CA1c2338` Avalanche 6 `0xC38e4e6A15593f908255214653d3D947CA1c2338` Arbitrum 23 `0xC38e4e6A15593f908255214653d3D947CA1c2338` Optimism 24 `0xC38e4e6A15593f908255214653d3D947CA1c2338` Base 30 `0xC38e4e6A15593f908255214653d3D947CA1c2338` Swift Design ![](https://docs.mayan.finance/~gitbook/image?url=https%3A%2F%2F2301516674-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNGiifMbrcug9ogAfisQY%252Fuploads%252FQjENW8EcFO7KighedIZT%252Fswift-design%2520%281%29.jpg%3Falt%3Dmedia%26token%3D2db48b8d-7212-471f-9d25-3d69f965dffe&width=768&dpr=4&quality=100&sign=8d17d412&sv=2) --- # Auction | Mayan [PreviousRelayers](/architecture/relayers) [NextQuote API](/integration/quote-api) Last updated 4 days ago Mayan auctions are fully on-chain and transparent English style auctions that settle on Solana. With Mayan auction, drivers compete with each other to find the best route and bid the best swap rate to win the auction. If you are interested in participation in auctions please reach out to us on discord. Mayan Auctions ![](https://docs.mayan.finance/~gitbook/image?url=https%3A%2F%2F2301516674-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNGiifMbrcug9ogAfisQY%252Fuploads%252FzCcIZehVjzAjF41e7uyF%252FDesign_02-25.png%3Falt%3Dmedia%26token%3D0cf63907-c527-414d-acd8-7f0c161c7cba&width=768&dpr=4&quality=100&sign=95c7cc4b&sv=2) --- # Quote API | Mayan [PreviousAuction](/architecture/auction) [NextExplorer API](/integration/explorer-api) Last updated 3 months ago We highly recommand using [Mayan SDK](https://github.com/mayan-finance/swap-sdk) for integration as it simplfies the process for you. Before performing a swap we need find the best route and get the swap rate for the token pair using quote API. ### [](#api-reference) API Reference ### [](#example) Example: The request to get the quote for swapping BNB tokens from Binance Smart Chain (BSC) to receive USDC tokens on Solana would be like this: #### [](#request) Request: Copy curl -X 'GET' 'https://price-api.mayan.finance/v3/quote?solanaProgram=FC4eXxkyrMPTjiYUpp4EAnkmwMbQyZ6NDCh1kfLn6vsf&forwarderAddress=0x0654874eb7F59C6f5b39931FC45dC45337c967c3&amountIn=100&fromToken=0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e&fromChain=avalanche&toToken=0x0000000000000000000000000000000000000000&toChain=solana&slippageBps=300&referrer=7HN4qCvG2dP5oagZRxj2dTGPhksgRnKCaLPjtjKEr1Ho&gasDrop=0&gasless=true' #### [](#list-of-request-parameters) List of request parameters: Parameter Type Required Description solanaProgram String Yes amountIn Number Yes Human readable amount of input token (e.g for 100 USDC it should be 100) fromToken String Yes Token address of input token fromChain String Yes Wormhole chain id of source network toToken String Yes Token address of output Token toChain String Yes Wormhole chain id of destination network slippageBps Number Yes Maximum slippage in bps, If the output token amount exceeds the slippage the swap will refund, (Max=100) referrer String No Referrer address that receives the referrer fee gasDrop Number No Default is 0. the amount of gas drop that must be delivered to user on delivered on destination network #### [](#response) Response: Copy { "quotes": [\ {\ "sendTransactionCost": 0,\ "gasless": false,\ "slippageBps": 300,\ "effectiveAmountIn": 100,\ "expectedAmountOut": 0.536793552,\ "price": 0.005460072,\ "minAmountOut": 0.520689746,\ "minReceived": 0.520689746,\ "solanaRelayerFee": 0,\ "solanaRelayerFee64": "0",\ "redeemRelayerFee": 1.687464,\ "redeemRelayerFee64": "1687464",\ "refundRelayerFee": 1.687464,\ "refundRelayerFee64": "1687464",\ "clientRelayerFeeSuccess": 1.687464,\ "clientRelayerFeeRefund": 1.687464,\ "cancelRelayerFee64": null,\ "deadline64": "1716287657",\ "fromToken": {\ "name": "USD Coin",\ "symbol": "USDC",\ "mint": "FHfba3ov5P3RjaiLVgh8FTv4oirxQDoVXuoUUDvHuXax",\ "contract": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",\ "chainId": 43114,\ "wChainId": 6,\ "decimals": 6,\ "logoURI": "https://assets.coingecko.com/coins/images/6319/small/USD_Coin_icon.png?1547042389",\ "coingeckoId": "usd-coin",\ "realOriginContractAddress": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",\ "realOriginChainId": 6,\ "supportsPermit": true\ },\ "fromChain": "avalanche",\ "toToken": {\ "name": "SOL",\ "symbol": "SOL",\ "mint": "So11111111111111111111111111111111111111112",\ "contract": "0x0000000000000000000000000000000000000000",\ "chainId": 0,\ "wChainId": 1,\ "decimals": 9,\ "logoURI": "https://statics.mayan.finance/SOL.png",\ "wrappedAddress": "So11111111111111111111111111111111111111112",\ "coingeckoId": "solana",\ "realOriginContractAddress": "So11111111111111111111111111111111111111112",\ "realOriginChainId": 1,\ "supportsPermit": false\ },\ "toChain": "solana",\ "mintDecimals": null,\ "gasDrop": 0,\ "eta": 1,\ "etaSeconds": 60,\ "clientEta": "1 min",\ "bridgeFee": 0,\ "suggestedPriorityFee": 0,\ "type": "MCTP",\ "priceStat": {\ "ratio": 1,\ "status": "GOOD"\ },\ "referrerBps": 0,\ "meta": {\ "advertisedDescription": "Cheapest and Fastest",\ "advertisedTitle": "Best",\ "icon": "https://cdn.mayan.finance/fast_icon.png",\ "switchText": "Switch to the best route",\ "title": "Best"\ },\ "cheaperChain": "solana",\ "lockFeesOnSource": false,\ "hasAuction": true,\ "onlyBridging": false,\ "mctpInputContract": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",\ "mctpOutputContract": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",\ "mctpMayanContract": "0xF18f923480dC144326e6C65d4F3D47Aa459bb41C",\ "toPrice": 183.42,\ "minMiddleAmount": 98.5,\ "sourceSwapExpense": 0\ }\ ], "minimumSdkVersion": [\ 7,\ 0,\ 0\ ] } ### [](#response-fields) Response fields: The following table shows the common fields of response: Field Type Description type String Determines the bridge method which can be "WH", "SWIFT" or "MCTP" effectiveAmountIn Number The actual input amount that will be deducted from user's wallet expectedAmountOut Number Expected output amount that user receives minAmountOut Number Minimum output amount of auction minReceived Number The minimum amount that user receives after deducting relayer fees price Number The amount of output token that user receives per 1 unit of input token solanaRelayerFee Number For "WH" type this fee is denominated in input token. For "MCTP" type the fee is denominated in USDC. For "SWIFT" type the fee is zero. redeemRelayerFee Number For "WH" type this fee is denominated in output token. For "MCTP" type the fee is denominated in USDC. For "SWIFT" type the fee is zero. RefundRelayerFee Number For "WH" and "SWIFT" types this fee is denominated in input token. For "MCTP" type the fee is denominated in USDC. clientRelayerFeeSuccess Number Total dollar value of relayer fees in the success scenario clientRelayerFeeRefund Number Total dollar value of relayer fee in the refund scenario eta Number estimated time of arrival in minutes client eta String human readable string of eta fromToken Object Input token details fromChain String Source network name toToken Object Output token details toChain String Destination network name ### [](#token-list) Token List You can get list of supported tokens using Token API: #### [](#example-1) Example: Copy curl -X 'GET' \ 'https://price-api.mayan.finance/v3/tokens?chain=solana' \ -H 'accept: application/json' To get the aggregated list of tokens from all chains remove `chain` from in the query . ### [](#chain-list) Chain List To get the list of supported chains you can use Chain API: #### [](#example-2) Example: Copy curl -X 'GET' \ 'https://price-api.mayan.finance/v3/chains' \ -H 'accept: application/json' This endpoint provides a JSON response containing a comprehensive list of all chains supported by the platform. Each chain entry includes detailed metadata such as the chain's name, chain ID, and other relevant attributes. Two key fields indicate the chain's functionality within the platform: * `**originActive**`: Specifies whether the chain is supported as a source chain. * `**destinationActive**`: Specifies whether the chain is supported as a destination chain. Use this endpoint to determine compatibility and availability of specific chains for your operations. Mayan program address [WH Swap](/architecture/wh-swap#wh-swap-contract-addresses) [![Logo](https://price-api.mayan.finance/swagger/favicon-32x32.png)Swagger UI](https://price-api.mayan.finance/swagger) [![Logo](https://price-api.mayan.finance/swagger/favicon-32x32.png)Swagger UI](https://price-api.mayan.finance/swagger/#/default/TokensController_getTokens) [![Logo](https://price-api.mayan.finance/swagger/favicon-32x32.png)Swagger UI](https://price-api.mayan.finance/swagger/#/default/ChainsController_getChains) --- # Contracts (Legacy) | Mayan [PreviousExplorer API](/integration/explorer-api) [NextForwarder Contract](/integration/forwarder-contract) Last updated 10 months ago Here is the Contract Application Binary Interface (ABI) of Mayan Swap Bridge. In the below table you can find the deployed contract addresses of Swap Bridge: Network Wormhole Chain Id Contract Address Solana 1 `8LPjGDbxhW4G2Q8S6FvdvUdfGWssgtqmvsc63bwNFA7E` Ethereum 2 `0xF3f04555f8FdA510bfC77820FD6eB8446f59E72d` BSC 4 `0xF3f04555f8FdA510bfC77820FD6eB8446f59E72d` Polygon 5 `0xF3f04555f8FdA510bfC77820FD6eB8446f59E72d` Avalanche 6 `0xF3f04555f8FdA510bfC77820FD6eB8446f59E72d` Arbitrum 23 `0xF3f04555f8FdA510bfC77820FD6eB8446f59E72d` ### [](#swap-from-evm) Swap From EVM If the input token is not the native currency of network, to initiate a swap we need to first approve the Swap Bridge to spend that token on our behalf Copy tokenContract.approve(swapBridgeAddress, amountIn); Then we can call the `swap` function: Copy function swap( RelayerFees memory relayerFees, Recepient memory recipient, bytes32 tokenOutAddr, uint16 tokenOutChainId, Criteria memory criteria, address tokenIn, uint256 amountIn ) public payable returns (uint64 sequence) In case the input token is the native currency of network you have to call the `wrapAndSwapETH` function: Copy function wrapAndSwapETH( RelayerFees memory relayerFees, Recepient memory recipient, bytes32 tokenOutAddr, uint16 tokenOutChainId, Criteria memory criteria ) public payable returns (uint64 sequence) We are going over each parameter and understand what they mean: #### [](#relayerfees) RelayerFees: Copy struct RelayerFees { uint64 swapFee; uint64 redeemFee; uint64 refundFee; } `relayerFees` is a struct that contains the fees that user is willing to pay to relayers for transfering and committing VAA messages into blockchains, to get a fair value and ensure that relayer will transfer we can use [Quote API](/integration/quote-api) #### [](#recepient) Recepient: Copy struct Recepient { bytes32 mayanAddr; uint16 mayanChainId; bytes32 auctionAddr; bytes32 destAddr; uint16 destChainId; bytes32 referrer; bytes32 refundAddr; } `recepient` is a struct that holds the info about the destination. `mayanAddr` is ATA of main state PDA of Mayan program for the output token. Here is a sample js code to calculate `mayanAddr` for a given output token mint address (`mintAddr`): Copy import { PublicKey } from '@solana/web3.js'; import { getAssociatedTokenAddress } from '@solana/spl-token'; const [mayanMainAccount] = await PublicKey.findProgramAddress([Buffer.from('MAIN')], mayanProgramAddr); const mayanAddr = await getAssociatedTokenAddress(mintAddr, mayanMainAccount, true); `mayanChainId`: field must be set to `1` which is wormhole chainId of Wormhole `auctionAddr` is auction program address of Mayan: `4U6MNAMRbYeTD4HumavhJ1ah9NQ5pNPhTNxcFdeybXFy` `destAddr` field is the address of user's destination wallet. `destChainId` is the Wormhole chain id of user's destination wallet. **tokenOutAddr:** origin address of input token **tokenOutChain**: origin Wormhole chain of output token #### [](#criteria) Criteria: Copy struct Criteria { uint256 transferDeadline; uint64 swapDeadline; uint64 amountOutMin; bool unwrap; uint64 gasDrop; bytes customPayload; } `transferDeadline` is the timestamp (in seconds) that shows the deadline of transaction on EVM and it must be based on EVM clock. `swapDeadline` is the timestamp (in seconds) that shows deadline of swap on Solana and therefore it should be based on Solana clock. You can read the Solona clock from the clock account (`SysvarC1ock11111111111111111111111111111111`) using Solana web3 package. Or you can use [this API](https://price-api.mayan.finance/swagger/#/default/ClockController_getSolanaClock) . `amountOutMin` shows the minimum acceptable amount of output token after slippage (this is the starting price in auction). `unwrap` In case the output token is the native token of destination chain this boolean determines if the output token should be unwrapped. `gasDrop`: the amount of native token that must be dropped into destination wallet. **tokenIn:** Contract address of input token. **amountIn**: Amount of input token. [14KB\ \ MayanSwapAbi.json](https://2301516674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNGiifMbrcug9ogAfisQY%2Fuploads%2Fq40ad3dvamyWnphOf0ve%2FMayanSwapAbi.json?alt=media&token=63e1df0b-55f5-44d1-aeb7-ac072ad9583f) --- # Relayers | Mayan To facilitate Mayan's functionality, it's essential to transmit messages across different blockchains. This task is performed by entities known as relayers. Functioning akin to postmen, relayers are responsible for the delivery of these messages. Specifically, in the Mayan ecosystem, relayers monitor supported blockchain networks. Upon identifying a Mayan Swap transaction, they retrieve the Verifiable Action Approvals (VAAs) associated with the transaction from Wormhole guardians. Subsequently, these signed VAAs are committed to the Solana network, or vice versa. This process incurs network fees. Therefore, to ensure the relayers are motivated to perform these actions on behalf of users, a relayer fee is charged. This fee compensates the relayers for the network costs and their service. Relayers have no access to users' funds and the Solana program is trustless, so anyone can run its own relayer to transfer the signed messages. [PreviousMCTP](/architecture/mctp) [NextAuction](/architecture/auction) Last updated 9 months ago --- # User Manual | Mayan [PreviousSwap Widget](/integration/swap-widget) [NextMayan Explorer](/dapp/mayan-explorer) Last updated 1 year ago ### [](#swap-tokens) Swap Tokens To swap tokens on Mayan all you need is a [Metamask](https://metamask.io/) or a Solana wallet. You can also use any wallet that supports [WalletConnect](https://walletconnect.com/) protocol. The process is really similar to native swaps. Example cross-swap from Avalanche to Solana: Please pay attention to the price impact percentage, it shows how much your swap affects the price of tokens on that market, so if it's high, it means you are not getting an ideal deal. Showcase of Mayan --- # Referral | Mayan Integrators of Mayan Swap SDK and widget can earn from swaps by setting their wallet address as the referrer. Please check [Mayan SDK](https://github.com/mayan-finance/swap-sdk) and [widget](/integration/swap-widget) to see how you can set your referrer address The default referrer fee rate is **10 bps** ([basis points](https://en.wikipedia.org/wiki/Basis_point) ), however as a referrer, you have the flexibility to set your referral fee rate according to your preferences. The referral fee can range from **0** up to **50 bps**. You can set your referrer fee [here](https://explorer.mayan.finance/referrer-fee) . _P.S. zero bps makes sense if you want to just track swaps going through your widget or SDK._ [PreviousForwarder Contract](/integration/forwarder-contract) [NextSwap Widget](/integration/swap-widget) Last updated 29 days ago --- # Swap Widget | Mayan You can add the Mayan cross-chain swap widget to your website by including a few lines of code: (example: [buybonk.com](https://buybonk.com) ) Copy