# Gas Drop On Destination
Source: https://docs.mayan.finance/application/gas-on-destination
Delivering native gas tokens on the destination chain to enable immediate post-swap transactions.
The "Gas drop on destination" feature automatically provides native gas tokens along with the output assets on the destination blockchain, enabling users to immediately perform transactions after a cross-chain swap without needing to fund gas separately.
If the destination wallet already holds sufficient native gas tokens, this feature will not be triggered by default.
Users can adjust the amount of gas they receive within predefined limits specific to each supported blockchain:
### Gas drop on destination default and max values:
| Destination Chain | Token | Default Gas | Max Gas |
| ----------------- | :---- | ----------- | ------- |
| Solana | SOL | 0.01 | 0.1 |
| Ethereum | ETH | 0.01 | 0.05 |
| BSC | BNB | 0.001 | 0.02 |
| Polygon | MATIC | 0.1 | 0.2 |
| Avalanche | AVAX | 0.01 | 0.1 |
| Arbitrum | ETH | 0.002 | 0.01 |
# Mayan Explorer
Source: https://docs.mayan.finance/application/mayan-explorer
Real-time tracking and advanced search for complete transparency on Mayan transactions.
Mayan’s dedicated explorer provides full transparency and real-time visibility into all aspects of cross-chain swaps. Users can monitor protocol statistics, track transfer volumes, and follow the progress of individual transactions step-by-step.
The explorer includes a powerful search function where users can input transaction IDs or wallet addresses to view detailed histories and track specific transactions in real time. This makes it an essential tool for both users and developers seeking to audit swap activity or verify transaction statuses.
Visit the [**Mayan Explorer**](https://explorer.mayan.finance/) to gain complete oversight of your cross-chain swaps and the overall health and performance of the Mayan protocol.
# Relayer Fees
Source: https://docs.mayan.finance/application/relayer-fees
Learn how relayer fees work and how transactions are processed by Mayan.
The relayer fee is paid to relayers who cover the gas costs and execute transactions on behalf of users during a cross-chain swap.
**Transaction Process**
Performing a cross-chain swap involves three transactions:
1. **Initial Swap Instruction:**\
The user initiates a transaction to send tokens, along with the necessary swap details, using the [**Swap Bridge**](https://www.perplexity.ai/architecture/wh-swap). The user pays the transaction fee in the native token of the source chain.
2. **Swap Registration:**\
Relayers receive a signed message from Wormhole guardians and register the swap for auction on Solana. This transaction is carried out by the relayers on behalf of the user.
3. **Redeem Transaction:**\
Relayers complete the process by sending the output tokens to the user’s wallet, finalizing the swap.
Users pay relayer fees so that relayers can perform the registration and redeem transactions on their behalf. Without paying the relayer fee, these transactions need to be executed manually by the user.
# User Manual
Source: https://docs.mayan.finance/application/user-manual
# How to Swap Tokens with Mayan
Swapping tokens on Mayan is designed to be as simple and seamless as possible. Whether performing a cross-chain swap or a same-chain swap, the process is straightforward:
1. Choose your **input token** and the blockchain it’s on.
2. Select your **destination chain** and the desired **output token**.
3. Mayan handles everything behind the scenes — from finding the best route and managing transactions to delivering the exact amount of tokens quoted to your wallet.
No complex steps or manual operations are required. Just select your tokens and chains, confirm the quoted amount, and let Mayan do the rest.
## Wallet Support
To use Mayan, all that’s needed is any major wallet. Mayan supports all leading wallets to ensure a smooth, seamless swapping experience across chains.
## Example: Cross-Chain Swap from Solana to Base
* Connect your preferred wallet
* Select Solana as the source chain and your input token
* Select Base as the destination chain and your output token
* Confirm and execute the swap
Your tokens will arrive on Base once the swap completes, with the exact amount quoted at the start.
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.
# Auction
Source: https://docs.mayan.finance/architecture/auction
Discover how the Mayan onchain auction delivers the best swap rates for every user.
**What it is:**\
A transparent, on-chain auction on Solana where drivers compete to offer users the most favorable swap price for cross-chain transfers.
**How it works:**
* Each swap request triggers a 3-second English auction.
* Drivers submit bids focused on offering the best rate, not the fastest response.
* The best price wins, and the winner executes the swap at their quoted rate.
**Why it matters:**\
Unlike typical limit order models—which lead to gas wars and MEV extraction—Mayan’s auction system is designed to maximize value for users through true price competition.
**Get involved:**\
To become a solver (“driver”), open a support ticket in the Mayan Discord and request access. Applications are evaluated on a case-by-case basis.
**Design note:**\
Mayan refers to solvers as “drivers,” it's a nod to the Mayan team’s roots in building ride-sharing routing algorithms.
# MCTP
Source: https://docs.mayan.finance/architecture/mctp
A seamless way to move tokens cross-chain using native USDC powered by Circle CCTP.
**What it is:**\
The MCTP (Mayan-Circle Transfer Protocol) method converts input tokens to USDC and sends them to the destination chain via Circle’s CCTP. Drivers then compete in an on-chain auction on Solana to deliver the best rate for swapping USDC into the user’s requested output token.
**How it works:**
* Input tokens are swapped to USDC on the source chain, then forwarded using Circle CCTP.
* An auction is held on Solana. The winning driver converts USDC on the destination chain to the requested output token.
* Output tokens are delivered directly to the user’s wallet.
* The protocol fee is zero if the output token is USDC and 3 basis points for other tokens.
### MCTP Contract Addresses
| Network | Wormhole Chain ID | Contract Address |
| --------- | ----------------- | ---------------------------------------------------------------------------------- |
| Solana | 1 | `dkpZqrxHFrhziEMQ931GLtfy11nFkCsfMftH9u6QwBU` |
| Ethereum | 2 | `0x875d6d37EC55c8cF220B9E5080717549d8Aa8EcA` |
| BSC | 4 | `0x875d6d37EC55c8cF220B9E5080717549d8Aa8EcA` |
| Polygon | 5 | `0x875d6d37EC55c8cF220B9E5080717549d8Aa8EcA` |
| Avalanche | 6 | `0x875d6d37EC55c8cF220B9E5080717549d8Aa8EcA` |
| Arbitrum | 23 | `0x875d6d37EC55c8cF220B9E5080717549d8Aa8EcA` |
| Optimism | 24 | `0x875d6d37EC55c8cF220B9E5080717549d8Aa8EcA` |
| Base | 30 | `0x875d6d37EC55c8cF220B9E5080717549d8Aa8EcA` |
| Unichain | 44 | `0x875d6d37EC55c8cF220B9E5080717549d8Aa8EcA` |
| Sui | 21 | `0xb787fe0f7530b4fd2162fa0cc92f4f6c5a97c54b4c5c55eb04ab29f4b803ac9c`(shared state) |
**Fast MCTP:**\
A variant using Circle CCTPv2 for faster settlement and more efficient messaging. Flow and auction structure are identical; finality is faster and latency reduced. Protocol fee is 3 basis points.
| Network | Wormhole Chain Id | Contract Address |
| --------- | ----------------- | ---------------------------------------------- |
| Solana | 1 | `Gx9rivpS3YR8pBFwMuP6omYqVxunpLvLkNn7ubNyuZZ5` |
| Ethereum | 2 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| Polygon | 5 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| Avalanche | 6 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| Arbitrum | 23 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| Optimism | 24 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| Base | 30 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| Linea | 38 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| Unichain | 44 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| HyperEVM | 47 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
| Monad | 48 | `0xC1062b7C5Dc8E4b1Df9F200fe360cDc0eD6e7741` |
# Relayers
Source: https://docs.mayan.finance/architecture/relayers
How relayers keep Mayan transactions moving securely and efficiently across chains.
**What it is:**\
Relayers are independent entities that deliver authenticated messages between blockchains on Mayan, playing a key role in cross-chain swaps.
**How it works:**
* Relayers monitor supported blockchains for Mayan transactions.
* When a swap is detected, they retrieve Verifiable Action Approvals (VAAs) from Wormhole guardians.
* Using the VAA, relayers commit the message on Solana or another target network, completing the transaction.
* Relayers earn a fee for covering network costs and acting on behalf of users.
**Why it matters:**\
Relayers never access or control users’ funds. The Solana program is trustless, enabling anyone to run their own relayer and participate in message transfer—no permissions needed. This ensures swaps remain secure and decentralized for all users.
# Swift
Source: https://docs.mayan.finance/architecture/swift
Lightning fast, intent-based bridging and cross-chain swaps with Mayan.
Swift v1 will not be supported in the long term. New integrations should use [Swift v2](/architecture/swift-v2), and existing integrations are strongly encouraged to migrate.
**What it is:**\
Swift is Mayan’s intent-based protocol designed for rapid bridging and swaps. Users simply specify their input token and source chain, along with their desired output token and destination chain. All underlying complexities such as order creation and asset locking are fully handled by the protocol and hidden from users and integrators.
**How it works:**
* When a cross-chain swap is initiated, an auction is triggered onchain.
* Drivers (solvers) bid competitively in this auction.
* The highest bidder fulfills the order on the destination chain exactly as specified by the user, using liquidity (inventory) they already hold on that chain. This results in near-instant settlement with guaranteed output amount.
* Upon fulfillment, the winning driver receives a receipt that enables the secure unlocking and transfer of assets on the source chain.
* The entire process from order initiation to final settlement typically completes within seconds.
**User experience:**\
Swift abstracts all technical steps—and there is no need for users or integrators to manually interact with contracts or manage asset locking. Mayan automatically orchestrates the flow to ensure a smooth experience.
**Protocol fee:**\
Swift charges a fee of 3 basis points (0.03%).
### 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` |
| Linea | 38 | `0xC38e4e6A15593f908255214653d3D947CA1c2338` |
| Unichain | 44 | `0xC38e4e6A15593f908255214653d3D947CA1c2338` |
| HyperEVM | 47 | `0xC38e4e6A15593f908255214653d3D947CA1c2338` |
| Monad | 48 | `0xC38e4e6A15593f908255214653d3D947CA1c2338` |
# Swift v2
Source: https://docs.mayan.finance/architecture/swift-v2
Lightning fast, intent-based bridging and cross-chain swaps with Mayan’s Swift v2.
**What it is:**\
Swift v2 is Mayan's upgraded intent-based protocol for cross-chain swaps. It uses the driver liquidity already available on the destination chain and introduces a cleaner two-contract architecture for more predictable settlement. Instead of bridging tokens or minting wrapped assets, drivers compete to deliver the user's output directly on the destination chain, and Swift v2 later unlocks the user's original funds on the source chain.
This model removes the need for users to route through bridges or supply destination gas. Swift focuses on fast execution, guaranteed output amounts, and a simple integration path through the [Mayan SDK](https://github.com/mayan-finance/swap-sdk).
**What's New in Swift v2:**
| Aspect | Swift v1 | Swift v2 |
| ------------------------ | ------------------------------------------------ | ----------------------------------------------------------------------------------- |
| **Architecture** | Single contract per chain | Two-contract structure (source + destination) |
| **Settlement Flow** | Unlock tied directly to fulfillment | Clearer, more consistent settlement across chains |
| **Payload Handling** | Basic support | Staging + settle step for payload swaps to validate the payload before final payout |
| **Referrer Fees** | Collected from output token on destination chain | Collected from locked source assets and paid on source chain |
| **Integration Clarity** | Some logic shared in one contract | Cleaner separation of responsibilities |
| **Indexing / Analytics** | Less standardized | Destination-side reporting improved |
**How it works:**
* A user starts a swap on the source chain, and the Swift v2 source contract locks the input tokens. The input may first be swapped into the primary locked asset on the source chain (e.g., USDC or ETH); if the swap is later refunded, the user receives that converted asset rather than the original token.
* An [auction](/architecture/auction) is run on Solana, where drivers submit bids based on the output they can deliver on the destination chain.
* The winning driver fulfills the swap directly on the destination chain using their own liquidity, giving the user an instant payout.
* The destination contract posts fulfillment data that is executed on the source chain, and Swift v2 emits an unlock message releasing the locked funds.
* For payload-enabled swaps, the destination contract stages the payout and completes it after a settlement step. The source unlock still occurs after the VAA, as usual.
**Key advantages:**
* Fast, predictable cross-chain settlement powered by driver liquidity on the destination chain.
* No bridge liquidity requirements, wrapping, or mint/burn mechanics.
* Competitive driver participation ensures reliable execution and guaranteed output amounts.
* Simple integration handled entirely through the SDK, with minimal on-chain assumptions.
* Optional referrer-fee support for integrators.
**Protocol fee:**\
Swift v2 keeps the same protocol fee: 3 basis points (0.03%). This value may change over time at the guardian's discretion; the live protocol bps for any quote is returned in the quote response as `mayanBps`.
### Swift v2 Contract Addresses
| Network | Wormhole Chain ID | Source Contract Address |
| ------------- | ----------------- | --------------------------------------------- |
| **Solana** | 1 | `mayan34VedncxdK2XobtvWFDXQASUTBXhUVzt2kKgny` |
| **Ethereum** | 2 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **BSC** | 4 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **Polygon** | 5 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **Avalanche** | 6 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **Arbitrum** | 23 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **Optimism** | 24 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **Base** | 30 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **Linea** | 38 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **Unichain** | 44 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **HyperEVM** | 47 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| **Monad** | 48 | `0x40fFE85A28DC9993541449464d7529a922142960` |
| Network | Wormhole Chain ID | Destination Contract Address |
| ------------- | ----------------- | --------------------------------------------- |
| **Solana** | 1 | `mayan34VedncxdK2XobtvWFDXQASUTBXhUVzt2kKgny` |
| **Ethereum** | 2 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **BSC** | 4 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **Polygon** | 5 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **Avalanche** | 6 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **Arbitrum** | 23 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **Optimism** | 24 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **Base** | 30 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **Linea** | 38 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **Unichain** | 44 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **HyperEVM** | 47 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
| **Monad** | 48 | `0xD78D199f8C402e7B5Cc2abE278dF0412400a3BAe` |
# Wormhole Swap
Source: https://docs.mayan.finance/architecture/wh-swap
Permissionless, open-source cross-chain token swaps built on Wormhole primitives and powered by Mayan.
**What it is:**\
Wormhole Swap leverages the Wormhole Token Bridge’s mint-and-burn architecture enhanced by Wormhole’s generic message-passing capabilities to enable seamless cross-chain, one-click token swaps. Developed by Mayan, this protocol embeds swap-specific metadata alongside Token Bridge messages, making cross-chain swaps efficient and trustless.
**How it works:**
* Users initiate a swap that sends tokens via the Wormhole Token Bridge using mint-and-burn.
* Swap details are embedded in generic Wormhole messages delivered by relayers on Solana.
* Drivers receive all swap information and participate in a Mayan on-chain auction to determine the best execution price.
* The auction winner performs a flash swap on Solana, obtaining the funds and atomically sending the promised output amount within the same transaction.
* Post-swap, if the destination address is on Solana, the relayer directly transfers output tokens to the user's wallet. Otherwise, relayers send tokens to destination chains via the Token Bridge.
**Key advantages:**
* Atomic flash swaps ensure secure, simultaneous execution without intermediary risk.
* Fully permissionless and open-source.
* Efficient use of Wormhole messaging coupled with Mayan’s competitive auction to optimize pricing and execution.
Here is an overview of what happens when a user executes a cross-chain transaction on Mayan:
**Protocol fee:**\
The Wormhole Swap fees are set at 10 basis points (0.10%).
### 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` |
# What is Mayan?
Source: https://docs.mayan.finance/index
Mayan is how crypto moves. Through a simple swap interface and a powerful set of developer tools, it handles routing and execution behind the scenes so users get fast, competitive swaps and teams can build cross-chain movement into their products.
With over **\$18 billion** in total volume processed, **8 million swaps completed**, and **3 million unique wallets** served, Mayan supports transfers between the major blockchains like Solana, Ethereum, Monad, BNB Chain, Base, Arbitrum, Optimism, Sui, HyperEVM, and many more.
## Key Features
* **One place, three swap methods:** Swift, MCTP, and Wormhole Swap — whether you want to transfer pennies or millions of dollars, Mayan adapts to deliver an optimized experience balancing speed and price.
* **Best rates, always:** Onchain auctions continuously find the optimal swap and bridge routes for maximum value.
* **Blazing speed:** Swaps complete in just seconds — not minutes or hours.
* **Developer-friendly:** Easy to integrate using the Mayan SDK and widget, with flexible options for fees.
* **Secure and trustworthy:** Trustless, permissionless smart contracts, audited regularly and designed to keep assets safe.
## Transfer Methods
* ⚡ **Swift:** Our newest, fastest method. Intent-based transfers that complete at lightning speed with the best prices, thanks to a competitive auction system.
* 🌐 **MCTP (Mayan-Circle Transfer Protocol):** Uses Circle's CCTP highway for value transfer, combined with Mayan's auction model for ideal pricing — perfect for high-value and stablecoin transfers.
* 🔄 **Wormhole Swap:** Employs Wormhole’s Token Bridge for low-slippage, high-value transfers of BTC, SOL, and ETH.
## Use Cases
* Swap any asset to any asset on supported major chains effortlessly and instantly.
* Bridge assets quickly with the best prices available.
* Power wallets, dApps, and marketplaces with seamless cross-chain liquidity.
## The Mayan Product Suite
* **Mayan App:** Simple, intuitive interface to execute swaps with a few clicks.
* **Mayan API:** Comprehensive tools for developers to embed cross-chain capabilities into their platforms.
* **Mayan Protocol:** Robust smart contracts and auction mechanisms ensuring trustless, efficient, and transparent swaps.
## Trust and Reliability
Mayan provides industry-leading uptime, rigorous audits, and security measures designed to ensure your assets are safe, and your trades are executed smoothly — whether pennies or millions.
## Get Started
* Try the [**Mayan app**](https://mayan.finance/) for instant, cross-chain swaps.
* Explore our [**developer guides**](https://docs.mayan.finance/) to build your own integrations.
# Zaps (Custom Payloads)
Source: https://docs.mayan.finance/integration/custom-payload
Learn how to attach custom payloads, to Mayan swaps, which routes support them, and how to pass raw payload bytes through the EVM, Solana, and Sui SDK integrations.
## Overview
Custom payloads let you attach a small piece of data to a cross-chain swap. This data travels with the transfer and can be read by your destination contract or backend once the funds arrive.
The [Swap SDK](https://github.com/mayan-finance/swap-sdk) sends this payload as raw bytes. It does not interpret or modify the contents, and your destination logic is responsible for decoding them. Some routes, such as HyperCore deposits, construct their own fixed payload instead.
This page explains what custom payloads are, why they are useful, and how to include them when calling the Swap SDK.
## Definition and Guarantees
A custom payload is an arbitrary sequence of bytes attached to a supported swap route. When a route accepts payloads, the SDK forwards the raw bytes exactly as provided.
### Core guarantees
* Payloads are forwarded verbatim; the SDK does not transform, validate, or decode them. Some routes hash the payload into an order key for verification or indexing, but the raw bytes sent cross-chain are unchanged.
* When a route supports payloads (e.g., [MCTP](/architecture/mctp), Fast MCTP, Swift), it sets the `payloadType` enum accordingly.
* The raw payload bytes are included in the cross-chain message or transaction and reach the destination exactly as provided. Your destination logic is responsible for parsing them.
* Some routes do not accept caller-supplied payloads, may ignore them, or construct their own fixed payload (such as HyperCore or specific lock-fee/auction paths).
## Why use custom payloads?
Custom payloads let you attach additional context to a transfer, such as user metadata, routing parameters, or application-specific instructions for your destination logic. If your integration does not require extra data on the destination chain, you can omit it.
Only specific swap routes support caller-supplied payloads; others will reject or override the bytes.
## Use custom payloads in the Swap SDK
You can attach a custom payload from EVM, Solana, or Sui by passing a `Buffer` or `Uint8Array` to the relevant SDK call. Payload support depends on the chain and the route type, so refer to the sections below for precise behavior.
Payloads should stay small. Each chain and route has its own message-size limits, and larger payloads may increase fees or cause the swap to fail if the underlying protocol rejects the message.
### Fetching quote
To ensure you receive a quote that supports custom payloads, you must pass `payload: 'true'` in the `quoteOptions` parameter when using `fetchQuote` or `generateFetchQuoteUrl`.
> **Important**
>
> * Custom payloads are not supported by all route types provided by Mayan. Therefore, it is important to explicitly indicate that you intend to use custom payloads so the quote service can return only routes that support them.
### EVM
On EVM, a [custom payload](https://github.com/mayan-finance/swap-sdk/blob/main/src/evm/evmSwap.ts#L365) can be included in calls such as `swapFromEvm`, or `getSwapFromEvmTxPayload`.
**Example:**
```ts theme={null}
import { swapFromEvm } from '@mayanfinance/swap-sdk';
const customPayload = Buffer.from('hello-world');
const tx = await swapFromEvm(
quote,
fromAddress,
destAddr,
null, // optional referrer
signer,
undefined, // optional permit
undefined, // optional overrides (gas settings)
customPayload
);
```
### Solana
On Solana, a [custom payload](https://github.com/mayan-finance/swap-sdk/blob/main/src/solana/solanaSwap.ts#L328) is supported on specific routes, including MCTP, Fast MCTP, and Swift v2, under route-specific conditions.
**Example:**
```ts theme={null}
import { swapFromSolana } from '@mayanfinance/swap-sdk';
const customPayload = Buffer.from('hello-world');
const result = await swapFromSolana(
quote,
swapperWalletAddress,
destinationAddress,
referrerAddresses,
signTransaction,
connection,
undefined, // extraRpcs
undefined, // sendOptions
undefined, // jitoOptions
{ customPayload } // forwarded only for supported routes
);
```
### Sui
On Sui, a [custom payload](https://github.com/mayan-finance/swap-sdk/blob/main/src/sui/suiSwap.ts#L19) is passed directly as the payload argument to `createSwapFromSuiMoveCalls`.
**Example:**
```ts theme={null}
import { createSwapFromSuiMoveCalls } from '@mayanfinance/swap-sdk';
const customPayload = Buffer.from('hello-world');
const tx = await createSwapFromSuiMoveCalls(
quote,
swapperWalletAddress,
destinationAddress,
referrerAddresses,
customPayload,
suiClient
);
```
## Summary
Zaps let you attach application-specific data to supported Mayan swap routes. Only specific paths accept payloads, and each chain has its own conditions. Always confirm the quote type and route before attaching a payload, and ensure your destination logic is prepared to decode the data you send.
# Explorer API
Source: https://docs.mayan.finance/integration/explorer-api
Track the full lifecycle and details of your Mayan transactions with the Explorer API.
## Overview
The Mayan Explorer API provides a powerful interface to track and monitor cross-chain swaps executed on the Mayan protocol. It delivers comprehensive transaction data for users and developers seeking detailed insights into swap lifecycle and status.
## Interactive API Documentation
For users and developers who want to explore and test the Mayan API endpoints directly, we provide a [**Swagger UI**](https://price-api.mayan.finance/swagger) portal. This user-friendly interface allows you to view all available endpoints, try out queries in real-time, and understand request and response formats without writing any code.
## Querying Transaction Status
Using the Explorer API, you can query transaction progress and details by providing the swap transaction hash. The API returns current statuses reflecting each step of the swap process.
## Real-Time Monitoring and Auditing
This API enables real-time visibility into the entire swap journey, supporting auditing, error handling, and enriched user experience for frontends or backend integrations.
### Example API Request
Here’s a sample request illustrating how to retrieve swap details using a transaction hash:
```powershell theme={null}
curl 'https://explorer-api.mayan.finance/v3/swap/trx/0x232bf1d5dd6e340a2e036ed0b58dbb444b56d3770d5543c7d55fecebbf0ad65e'
```
## Detailed Swap Information
The API response includes all relevant fields such as swap status, involved tokens and chains, amounts transferred, timestamps, fees, and verification receipts. Null values are omitted for cleaner data consumption.
```json theme={null}
{
"id":"a8054a9c-6141-491a-80c3-8dd7ff88e638",
"trader":"0xeE1A58EafE1977A3D2ae59E2897Bb815054f6D58",
"sourceTxHash":"0x232bf1d5dd6e340a2e036ed0b58dbb444b56d3770d5543c7d55fecebbf0ad65e",
"sourceTxBlockNo":34244833,
"status":"SETTLED_ON_SOLANA",
"transferSequence":"77090",
"swapSequence":"0",
"deadline":"2022-10-12T09:27:45.000Z",
"sourceChain":"5",
"swapChain":"1",
"destChain":"1",
"destAddress":"EU8z368kxJ4VzLfdpNG774L6DpAnav9d9cBBpbyH9Rr2",
"fromTokenAddress":"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
"fromTokenChain":"5",
"fromTokenSymbol":"WMATIC",
"fromAmount":"9.99611386",
"toTokenAddress":"mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So",
"toTokenChain":"1",
"toTokenSymbol":"MSOL",
"toAmount":"0.231",
"transferSignedVaa":"01000000020d00aab8719f49c4c8bb89e6d705d279fc9a8ee7a35e4ff8cce223e2c97970c19c3405e7fd0f938c4e626284dff68bb21381979053b8415a201ed1d0a6e74c18aef001028027fa1479db229ba36a73801754f23a1cafb72a51d6d542ae50971233193aa966ea1c358bebd11cda30616b8ba54abf980f7cac2945e75442cfca0dace2d2a901032add4e30f42d1f8a7259887d6a66a3c84d70dc6069873d99b089263566b95da519259abe330aa736cfd626ce4e18c0e8bc4ee1c4b37d50b8f4d790f5395761fe01044f38137d47f85156d9cb0151a6aba6e9ef04499bea96737ec8a4674916e55689742867f2b7bc90101b22943e1c5ede43346318dae7b8ba38b5d884ecf4d0b2590106168151effac6eecc77a930dfc3b53a30f6ca5ce513449ae11bec0380626324b3624c3ada89b7a5fc736ae2505cedb330abafee60a712df5101098960e101ccb20007f796a00e8c3514551dd526265aebf558b4b03b72cdeb7a9b0ba3ccc399133f162a2f84260aabc6158ea8e6b69ccb19ea99011e576c84b26cef71563b24f12cf6010ac14e56b157b625404aee331233f8c658d8edd4879815b197245e9501d05f89e910685955d9f6330e42f609d1caaf445e27f0ded0064f386c013e0a3983cd33fd000b3f4aec5c048486620b2558d16a3d11cff060fe50ad5e2f89ba105c62b1f00e33064cd41824ad2916d217a0f9e6bd334804434dc26491387843da14da6b8fd2e7000ca44a8bacf1107b08158b301188126508377716bd37f6d0062231ab73594f7999151efd117138f3b5c7fc33122c7f2cfc4c5f65c4b91e8e1b9579f964daf14529000d1a3159f13eba61ce37a45e5e0c56c1c5c75e44dcd9bd9511955ebd5367fccbcc7ada7f68241454edb504d3d2b8f33384b64a688a88bee66e044cdf155f20d021000eb617d77ae2b498591bec60ff3a89c9a25d8854850ed6b3793cbbdae803ec2e43776f029ec6e31c2f0a1973bb8fa220bf3206c0c0c148120ace02cb06b35366cf0011979eea8ec0b1fa9a80a96981441eda2d3d760d39c103d4de440e45d917c7d9c526c2163aadfc1892cdb35e50629fef15651c65e4546215f65ba9cc0722db4a550112ac48a08541a9fd14d0eae20bb80e910b332dc117556ab2da9caa7c0b177e5a5d534baa50dac75715df918bc6f9185dfff37485ffb49a6badb3f7d6884e4b4953016346819500012af700050000000000000000000000005a58505a96d1dbf8df91cb21b54419fc36e93fde0000000000012d220f01000000000000000000000000000000000000000000000000000000003b94dbfa0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf127000057290becfd5df48290fc36fc8597f04cc79c7c122a5389214ee897f3557cd30ba00010000000000000000000000000000000000000000000000000000000000000000",
"swapSignedVaa":"01000000020d003cb77de662828e1455a9ae190ed928eb6c89f7a99e2b4599c7e7c96286461cbe518f1f51624abe5ae129e22607f69b467fe1f37cc0639eefa5d679c22bad6fea0002ca3095e347aa3efed7136169130f34f848fd0bf930c6e234926371dee73c396d003bc747d93a359adc697abacd372882955dfd1eea6f3b1cda83566b34a854a90003b3b500b752b99c36c81d1a3e05e930167d21471bf0b414049c1f4615c22b52826e41c46adace3bf86ec7541d00576235db1a297bd48234d81f841cf899da94570104ea6cdd63d2cd5eae3cd3ead80fea8656617ea15c6354817fc4a437c49028e6bf690782d95f2c37d921d841d86fe7b8e3e13809359436d1d78747b3361ea896ed0106959131aec94f6e26c46e1755a1ba18bf5f2c6f73f02276d97b46e547f52a9dfe05d807435797969bb3678b2334b0513fb5f42f1c590d87d9dc7489b0b1d2caa201071fca6db97d946efb454ad7e88c58dbf1a18f5dbb31842f3711aaafaadeac97834ae99bf5274a3802757eac7495513e980c9cbec9b7ba898eb4994089bfd3492c010885ab047bf6bd72f9760b60e246a835457dc0b0cf8240dd6ef810a6951623a8f84690f280b7861e45d5885ab9726cd5a0fb47eaf87dc692465cb1caea6a171457010aebb44ec2fa0ed1b6a2a7f1485d9887e1c158bfe479f741055b15b5ba9034f81453d6c8d91a14ed90dc324e64a7645170d7ea8bd7b67c42193c895ff7e3e68595000b8e1acd9c77f642bdf5114becfddec283f80f199cd7b1ba0a47fcea3bee669dbe4e0c4e0ec02a02b78a3c09023b46ba4777498efeb6439f044cc9d86f4f64db42000c6d363a69cbeac8d037aa8e5cb802102473d0dc61d2b102bf3cd3d4f2ae2cdde56b096372fd52e7088cda9050a25acb67371d67c6f6d89553f28b9b385c36a50a000d1193dd6415f01bb5b21b5a2207134a7f13be5d3c762c01bb64e5a08dcf22a3425f6439f63f33ec9eed3a6d72d2405f982057793456becad61e32ce490f9bfc2b01113ac90f24dff1d129f8bf8030cea54fee37fc522a2e1cecd425da254de1374e8543fe907e60e336e48bf77c04e0603672bd16592857a22dea9879434277791061001284150c97369be0f71316be004db4604ea7c666747eca0dd1b18314a7d35ac9171f46456a82f73081baa6adfd749bad936cba9a2b5bb83651f917449d4d2b61ba006346819500012af80005000000000000000000000000eae8425c60b12d09d12d02ff981f85b34f2dcfcc00000000000000000f01000000000000000000000000000000000000000000000000000000003b94dbfa0b62ba074f722c9d4114f2d8f70a00c66002337b9bf90c873657a6d201db4c800001c81ba38362db3567aaf37cb0e8ff25e91c669c2f17fbf5c872f847c8c1a7bfbb0001000000000000000000000000ee1a58eafe1977a3d2ae59e2897bb815054f6d5800050000000000012d220000000000000000000000000000000000000000000000000000000001504dc0000000006346889100000000012b3efa000000000000000000000000000a8751",
"savedAt":"2022-10-12T08:57:59.565Z",
"initiatedAt":"2022-10-12T08:57:57.000Z",
"completedAt":"2022-10-12T09:16:26.852Z",
"insufficientFees":false,
"retries":0,
"swapRelayerFee":"0.19611386",
"redeemRelayerFee":"0.0",
"refundRelayerFee":"0.00690001",
"statusUpdatedAt":"2022-10-12T09:16:26.852Z",
"bridgeFee":"0",
"sourceTxFee":"4915861714160382",
"fromTokenLogoUri":"https://assets.coingecko.com/coins/images/14073/small/matic.png?1628852392",
"toTokenLogoUri":"https://assets.coingecko.com/coins/images/17752/small/mSOL.png?1644541955",
"fromTokenScannerUrl":"https://polygonscan.com/token/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
"toTokenScanner":"https://solscan.io/token/mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So"
}
```
# Mayan Forwarder Contract
Source: https://docs.mayan.finance/integration/forwarder-contract
Unified entry point for secure cross-chain swaps across EVM networks.
## Overview
Mayan Forwarder serves as the unified entry point for interacting with Mayan’s cross-chain swap methods—Swift, MCTP, and Wormhole Swap. It streamlines integration by providing a single, secure interface and maintains a whitelist of trusted protocol addresses to mitigate risks from compromised quote data.
The Forwarder contract is deployed across multiple EVM-compatible chains—including Ethereum, Arbitrum, Base, Optimism, Avalanche, Polygon, BSC, Unichain, Linea, HyperEVM and Monad. All share the same contract address:
```js theme={null}
0x337685fdaB40D39bd02028545a4FfA7D287cC3E2
```
### Swap From EVM
To initiate a swap using an ERC20 token as input, you must first approve the required allowance for the Mayan Forwarder contract or alternatively provide a permit object to enable spending.
```js theme={null}
tokenContract.approve(forwarderContract, amountIn);
```
After approval, you can generate the complete transaction payload using the `getSwapFromEvmTxPayload` function from the [Mayan SDK](https://github.com/mayan-finance/swap-sdk) and then pass it to the Mayan Forwarder contract.
If you need to build the payload manually and use Mayan Forwarder, you should choose the right method based on your input token:
* `forwardERC20`: For input tokens that are ERC-20.
| Parameter | Type | Descrption |
| ------------- | ------------ | ------------------------------------------------------------------------------ |
| tokenIn | address | Input token address |
| amountIn | uint256 | Input amount |
| permitParams | PermitParams | Signed permission (eip-2612) Pass zero for all values if you don't want to use |
| mayanProtocol | address | Address of Mayan final contract |
| protocolData | bytes | Bytes data for Mayan final contract |
* `swapAndForwardERC20`: Same as `forwardERC20` but performs a swap on the source chain before bridging.
| Parameter | Type | Description |
| --------------- | ------------ | ------------------------------------------------------------------------------ |
| tokenIn | address | Input token address |
| amountIn | uint256 | Input amount |
| permitParams | PermitParams | Signed permission (eip-2612) Pass zero for all values if you don't want to use |
| swapProtocol | address | Contract address of swap protocol |
| swapData | bytes | Bytes data that is needed by swap protocol |
| middleToken | address | The output token of swap protocol |
| minMiddleAmount | uint256 | Minimum output of swap step or the transaction will revert |
| mayanProtocol | address | Address of Mayan final contract |
| mayanData | bytes | Bytes data for Mayan final contract |
* `forwardEth`: For input tokens that are native tokens of the chain.
| Parameter | Type | Description |
| ------------- | ------- | ----------------------------------- |
| mayanProtocol | address | Address of Mayan final contract |
| mayanData | bytes | Bytes data for Mayan final contract |
* `swapAndForwardEth`: Similar to `forwardEth` but performs a swap before bridging.
| Parameter | Type | Description |
| --------------- | ------- | ---------------------------------------------------------- |
| amountIn | unit256 | Input amount of native token |
| swapProtocol | address | Contract address of swap protocol |
| swapData | bytes | Data that is needed by swap protocol |
| middleToken | address | The output token of swap protocol |
| minMiddleAmount | uint256 | Minimum output of swap step or the transaction will revert |
| mayanProtocol | address | Address of Mayan final contract |
| mayanData | address | Bytes data for Mayan final contract |
# Quote API
Source: https://docs.mayan.finance/integration/quote-api
We highly recommend using [Mayan SDK](https://github.com/mayan-finance/swap-sdk) for integration as it simplifies the integration process.
Before performing a swap we need find the best route and get the swap rate for the token pair using quote API.
### API Reference
### Example:
The request to get the quote for swapping 100 USDC on Avalanche to receive SOL on Solana would be like this:
#### Request:
```powershell theme={null}
curl -X 'GET' 'https://price-api.mayan.finance/v3/quote?amountIn=100&fromToken=0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e&fromChain=avalanche&toToken=0x0000000000000000000000000000000000000000&toChain=solana&slippageBps=300&gasDrop=0&swift=true&mctp=true&fastMctp=true&wormhole=true&solanaProgram=FC4eXxkyrMPTjiYUpp4EAnkmwMbQyZ6NDCh1kfLn6vsf&forwarderAddress=0x337685fdaB40D39bd02028545a4FfA7D287cC3E2&sdkVersion=13_1_0'
```
#### List of request parameters:
| Parameter | Type | Required | Description |
| ------------------ | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| amountIn | Number | Yes\* | Input amount in human-readable format (e.g. `100` for 100 USDC). Either `amountIn` or `amountIn64` must be provided. |
| amountIn64 | String | Yes\* | Input amount in base units (smallest denomination, e.g. `100000000` for 100 USDC). Either `amountIn` or `amountIn64` must be provided. |
| fromToken | String | Yes | Token address on the source chain (use `0x0000000000000000000000000000000000000000` for native tokens) |
| fromChain | String | Yes | Source chain name (e.g. `solana`, `ethereum`, `bsc`, `avalanche`, `arbitrum`, `base`, `optimism`, `polygon`, `sui`) |
| toToken | String | Yes | Token address on the destination chain |
| toChain | String | Yes | Destination chain name |
| slippageBps | Number | Yes\* | Maximum slippage in basis points (e.g. `300` = 3%, max `500`). Either `slippageBps` or `slippage` must be provided. |
| slippage | Number | Yes\* | Maximum slippage as a decimal (e.g. `0.03` = 3%). Either `slippageBps` or `slippage` must be provided. |
| swift | Boolean | No | Enable [Swift](/architecture/swift) routes |
| mctp | Boolean | No | Enable [MCTP](/architecture/mctp) routes |
| fastMctp | Boolean | No | Enable Fast MCTP routes |
| wormhole | Boolean | No | Enable [Wormhole Swap](/architecture/wh-swap) routes |
| gasless | Boolean | No | Enable gasless swap mode |
| solanaProgram | String | No | Mayan Solana program address |
| forwarderAddress | String | No | Mayan Forwarder contract address |
| sdkVersion | String | No | SDK version in `major_minor_patch` format (e.g. `13_1_0`) |
| referrer | String | No | Referrer Solana address that receives the referrer fee |
| referrerBps | Number | No | Default is 0. The basis points the integrator earns through the referral program |
| gasDrop | Number | No | Default is 0. Amount of native gas to deliver to the user on the destination chain |
| fullList | Boolean | No | Default is `false`. Enables returning all available quote options instead of the default limited (fastest and best-return) results |
| destinationAddress | String | No | Helps provide a more accurate quote, for example by checking whether the Solana ATA exists. |
| apiKey | String | No | Defines an API key that prevents the **rate-limit-exceeded** error on a per-IP basis. |
#### Response:
> The quote service returns an array of quotes. By default, it includes at most two items: the first is the fastest option, and the second is the best-return quote. If the fastest option also provides the best return, only one quote is returned.
>
> It is possible to set the `fullList` request parameter to `true` to retrieve all available quote options. In this case, more than two items may be returned, and no sorting is applied. Interfaces can apply their own sorting logic by considering the `etaSeconds` and `expectedAmountOut` fields in each item.
```json theme={null}
{
"quotes": [
{
"meta": {
"advertisedDescription": "Cheapest and Fastest",
"advertisedTitle": "Best",
"icon": "https://cdn.mayan.finance/fast_icon.png",
"switchText": "Switch to the best route",
"title": "Best"
},
"sendTransactionCost": 0,
"gasless": false,
"slippageBps": 300,
"effectiveAmountIn": 100,
"effectiveAmountIn64": "100000000",
"expectedAmountOut": 1.201839546,
"price": 0.01201963167985677,
"minAmountOut": 1.16578436,
"minReceived": 1.16578436,
"solanaRelayerFee": null,
"solanaRelayerFee64": null,
"redeemRelayerFee": null,
"redeemRelayerFee64": null,
"refundRelayerFee": null,
"refundRelayerFee64": "711",
"cancelRelayerFee64": "9147",
"submitRelayerFee64": "0",
"clientRelayerFeeSuccess": null,
"clientRelayerFeeRefund": 0.00902389942474755,
"deadline64": "1774621897",
"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",
"gasDrop": 0,
"eta": 1,
"etaSeconds": 3,
"clientEta": "3s",
"bridgeFee": 0,
"suggestedPriorityFee": 0,
"type": "SWIFT",
"priceStat": {
"ratio": 0.9996,
"status": "GOOD"
},
"referrerBps": 0,
"protocolBps": 3,
"onlyBridging": false,
"minMiddleAmount": 100,
"sourceSwapExpense": 0,
"swiftVersion": "V2",
"swiftMayanContract": "0x40fFE85A28DC9993541449464d7529a922142960",
"swiftAuctionMode": 2
}
],
"minimumSdkVersion": [
7,
0,
0
]
}
```
### 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", "MCTP" or "FAST\_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 |
### **Supported Tokens**
Mayan is an intent-based protocol and supports any token as input or output, provided there is sufficient liquidity on the source or destination chains. We also maintain an approved, whitelisted token list for convenience:
#### Example:
```powershell theme={null}
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 .
### Supported Chains
#### `GET` `sia.mayan.finance/v10/init`
Returns configuration for every supported chain, including whether it can be used as a origin or destination\*\* \*\*chain.
#### Example:
```powershell theme={null}
curl -X 'GET' \
'https://sia.mayan.finance/v10/init' \
-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.
### API Key:
The `apiKey` parameter is optional. If you are using the Mayan SDK on a frontend and your request volume is low or comes from multiple origins, you can omit the `apiKey` to use the public endpoint. We recommend starting without an API key and only requesting one if you hit rate limits. To obtain an API key, email [**support@mayan.finance**](mailto:support@mayan.finance).
# Referral Program
Source: https://docs.mayan.finance/integration/referral
The Mayan Referrer Program lets Integrators of the Mayan SDK and widget earn referral fees on transactions by setting their wallet address as the referrer.
Each bridging method within the Mayan protocol has its own referral fee behavior and collection mechanism. This document explains how referral fees work across all methods and how to configure them in the SDK.
***
## **Swift V1 (will deprecated in favour of V2)**
**Fee Collection**
* Fees are collected on the **destination chain** only if the bridge is successfully completed.
* Collected via the **output token**.
**Fee Rate**
* **From Solana:** up to **100 bps**
* **From other chains:** up to **50 bps**
***
## **Swift V2**
**Fee Collection**
* Fees are collected on the **source chain** once the bridge is successfully completed.
* Collected via the **locked assets** (e.g., USDC, ETH).
**Fee Rate**
* Maximum referral fee for all chains: **100 bps**
***
## **MCTP Method**
**Fee Collection**
* Fees are collected on the **destination chain** only if:
1. The bridge includes a **swap on the destination chain**. (e.g., USDC → USDC transfers have no fee)
2. The bridge completes **successfully**.
* Fees are collected in the **Circle-issued stablecoin** minted during bridging (USDC or EURC).
**Fee Rate**
* Maximum referral fee:
* **From Solana:** up to **100 bps**
* **From other chains:** up to **50 bps**
***
## **FastMCTP Method**
**Fee Collection**
* Fees are collected on the **destination chain** only if the bridge is successfully completed.
* Unlike MCTP, the existence of a swap on the destination chain **does not matter**.
* Fees are collected in the **Circle-issued stablecoin** (USDC or EURC).
**Fee Rate**
* Maximum referral fee for all chains: **100 bps**
***
## **WH Method**
**Fee Collection**
* All referral fees are received on the **Solana chain**.
* Fees are only distributed if the **bridge is successfully completed** and **includes a swap**.\
(Example: a bridge from Ethereum → Solana where ETH is swapped to WETH will **not** generate referral fees.)
* The fees are collected in the **output token** and automatically transferred to the **referrer Solana address**.
**Fee Rate**
* The **default referral fee rate** is **10 bps (0.1%)**.
* Referrers can configure their preferred rate from **0 to 50 bps**.
* Use the [Referrer Fee Management](https://explorer.mayan.finance/referrer-fee) page to set your on-chain referral fee.
* You must specify a **valid Solana wallet address** as your referral address.
***
## **General Rules**
* For all methods **except WH**, you can set your referral fee rate by including `referrerBps` in the quote request parameters.
* For all methods **except Swift V2 with EVM source chains**, referral fees are **automatically transferred** to the referrer’s address.
* For **Swift V2 (EVM source)** orders:
* Referral fees are **deposited into the fee manager contract**.
* Referrers can **withdraw** them using their address signature.
***
## **How to Enable Referral Fees in the SDK**
### Step 1 — Prepare Referrer Addresses
You must prepare a referral address for each VM type:
```text theme={null}
const referrerAddresses = {
solana: 'VALID_SOLANA_WALLET_ADDRESS',
evm: 'VALID_EVM_WALLET_ADDRESS',
sui: 'VALID_SUI_WALLET_ADDRESS'
};
```
### Step 2 — During Quote Fetching
* Always pass your **Solana referral address** as the `"referrer"` parameter.
* Set your desired referral fee (in bps) as `"referrerBps"`.
* **Note:** Always use the Solana address as your referrer, regardless of source or destination chain (even for EVM → EVM routes).
```text theme={null}
const quote = await fetchQuote({
...
referrer: referrerAddresses.solana,
referrerBps: 25, // example: 25 bps = 0.25%
...
});
```
### Step 3 — During Transaction Building
All transaction or bridge functions in the SDK accept an optional `referrerAddresses` parameter:
```text theme={null}
type ReferrerAddresses = {
solana: string;
evm: string;
sui: string;
};
```
Always pass the **full object** prepared in Step 1.\
The SDK will automatically determine which wallet to use based on the selected bridge method, source, and destination.
This ensures referral fees are correctly routed, regardless of the bridge type or source/destination chains.
***
Please note that your Solana referrer address must have associated token accounts (ATAs) for USDC, USDT, and WETH. You can create these ATAs by sending a small (dust) amount of each SPL token to your referrer address.
If these ATAs are not initialized, you may lose your referral bps.
SPL token mint addresses:
* USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
* USDT: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
* WETH: 7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs
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
# Swap Widget
Source: https://docs.mayan.finance/integration/swap-widget
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))
```php theme={null}
```
That's it! You now have a fully-functional bridge on your website.
### Customizing Your Widget
We provide a dashboard where you can fully customize your widget, including:
* Supported chains and token lists
* Referrer fees and referrer addresses for monetization
* Colors and overall appearance of the widget
* And more
Please visit the Mayan widget builder: [https://widget.mayan.finance](https://widget.mayan.finance)
### Full Example
For a full example of the integration, you can check the source code of [buybonk.com](https://buybonk.com) on [GitHub](https://github.com/mayan-finance/buybonk). This repository provides a comprehensive example of how to integrate the Mayan Swap Widget into a project.
# Brand Kit
Source: https://docs.mayan.finance/link/brand
# Github
Source: https://docs.mayan.finance/link/github
# Swap SDK
Source: https://docs.mayan.finance/link/swap
# Security & Audits
Source: https://docs.mayan.finance/resources/audits
Information about Mayan security and smart contract audits.
Mayan smart contracts and Solana programs place a strong emphasis on security. Our smart contracts have undergone thorough audits by leading security firms, including [**OtterSec**](https://osec.io/) and [**Sec3**](https://www.sec3.dev/), ensuring robust protection of user assets and protocol reliability.
Mayan operates on trustless, permissionless smart contracts, meaning no single party has control over or can freeze assets — guaranteeing true user sovereignty.
The protocol benefits from Wormhole’s secure and decentralized messaging network, which validates cross-chain messages with high reliability.