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

With a single referrer wallet, the fee transfers straight to your address when the order completes, except on two routes that credit it to the fee manager contract instead:
  • Swift with an EVM source chain. The fee is credited when the order is unlocked on the source chain, in the locked source asset.
  • Same-chain swaps on EVM chains.
Mayan pays out fee manager balances at least once a week. A balance is paid out when all of these hold:
  • The token is USDC, USDT or ETH.
  • The balance is at least 10 USDC, 10 USDT or 0.01 ETH.
  • You earned a fee in that token on that chain in the last 24 hours.
Anything else stays in the fee manager until you withdraw it yourself. You can also withdraw a balance manually at any time rather than wait for the automatic payout. Connect your referrer wallet at explorer.mayan.finance/withdraw-fee-swift, or call withdrawFee(token, amount) on the fee manager from that wallet, with the zero address as token for ETH. If you split the fee across wallets, it is credited to a shared address derived from your wallet list rather than to any one wallet. The same automatic payout divides it among the wallets by their bps share, under the same conditions. To track all of this, sign in with your referrer wallet, EVM or Solana, at explorer.mayan.finance/referrer-dashboard. It sums your balances across every chain, including your share of any split, and shows what has been paid out and why any balance is not being paid out.
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.