Skip to main content
Two things can happen on a swap: Mayan may take a protocol fee, and if you set a referrer address, you take one too. Your referrer fee sits on top of the protocol fee rather than coming out of it.

Protocol fee

Swift has no protocol fee. Orders filled through Swift, which is most swaps, carry zero. Other methods do charge one, and the rate can change. The live value for any quote is returned as protocolBps in the quote response, so read it rather than hardcoding it.

Relayer fees

Route-dependent, and returned per quote: Show clientRelayerFeeSuccess if you display a cost breakdown. It is already the aggregate.

Earning as an integrator

Set a referrer address and a referrerBps on the quote, then pass the matching referrerAddresses at swap time. The fee is collected onchain.
Always pass your Solana address as referrer, whatever the source and destination chains, including EVM to EVM. referrerAddresses is keyed by network type, because the address that receives the fee depends on which chain it settles on:
Pass the full object at swap time. The SDK picks the right wallet for the route.

Where the fee is paid

Each route collects and pays differently. Two cases earn nothing. On MCTP, a plain USDC to USDC transfer has no destination swap. On Wormhole Swap, a transfer that does not swap, such as ETH on Ethereum to WETH on Solana, does not qualify either.

Setting the rate

On Swift, MCTP and Fast MCTP, set the rate with referrerBps on the quote request. On Wormhole Swap the rate is set onchain instead. Use Referrer Fee Management to set it against your Solana address.

Collecting

Fees transfer to your address automatically on every route except Swift with an EVM source chain. Those accumulate in the fee manager contract, and you withdraw them at explorer.mayan.finance/withdraw-fee-swift.
Your Solana referrer address needs associated token accounts for USDC, USDT and WETH. Without them you can lose the referrer fee on routes that pay out in those tokens. Create them by sending a dust amount of each token to the address.
  • USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
  • USDT: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
  • WETH: 7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs

Splitting across wallets

Pass a referrers object to fetchQuote instead, with a bps share per wallet, then pass the same object at swap time. The SDK throws if it does not match the quote. See Fee Splitting.

Next steps

Fee Splitting

Split the referrer fee across several wallets.

Fetching Quotes

Setting referrer and referrerBps on the quote.