# Getting Started

An overview of XY Finance and the services that spawn on it

<figure><img src="/files/De34ddYzlpFpDfnjx6Ve" alt=""><figcaption></figcaption></figure>

## XY Finance at a Glance

XY Finance Ecosystem, with XY Token ($XY as the ticker), serves as the heart of the XY DAO and the protocol itself. XY is a community-driven platform established to address what might be called the "liquidity problem," ensuring that users benefit from the best routes, while liquidity providers are incentivized with $XY to steadily stack yields. Meanwhile, we are providing utility and functionality to $XY through multiple innovative methods and strategic partnerships.

As a cross-chain interoperability protocol that aggregates not only DEXs but also bridges, we help route your assets of various **types**, with the best **rate** possible and the top **speed** & **security**. Regardless of split or batch transactions, XY Finance helps strike the best bargains with minimized rates. Plus, cross-chain transfer & every transaction step will be carried out in an instant, faster than that of our competitors in the industry. While most have this sneaking suspicion that the platform's safety might be sacrificed due to our pursuit of transaction speed, they're mistaken. Our devs have tapped effortlessly into some mechanisms to ensure the security of your funds.\
\
XY Finance connects every chain, swaps every asset, and serves every user here and there. With the ultimate routing across multi-chains, borderless and seamless swapping is simply several clicks away.&#x20;

### yBridge

In order to achieve the most convenient and fastest cross-chain swap process, XY Finance also has its own bridge called **yBridge**. While yBridge serves as a decentralized non-custodial interoperability solution, it facilitates communication and connection between different blockchain networks.&#x20;

It offers a user-friendly interface for transferring a wide variety of tokens to various blockchains and L2 roll-up solutions while maintaining an efficient cross-chain liquidity pool.

As a result, we are able to create more opportunities for this cross-chain network to provide users with more convenient and cost-effective pricing, as well as offer developers and Dapp creators a more convenient cross-chain infrastructure.

### Closing Thoughts

XY Finance establishes a thorough cross-chain swap mechanism and seamless user experience for both brands and traders. \
\
That having been said, this is just the beginning. XY Finance will continue to extend ourselves and keep evolving with the DeFi community to introduce new features. With the Research & Development Team's creativity and XY DAO community's engagement, XY Finance will constantly vet our own products and do the utmost to develop more diverse functions to further stabilize this ecosystem.<br>


# XY Token

## Token Distribution

Since XY Finance launched in August 2021, we have been early members and developers of the community. We are here today because there have been many community members and liquidity providers who have supported us during the journey over the past few months.

With the growth and development of XY Finance, DAO governance is the next step in our community and LP outreach. In order to advance towards this goal, XY Token will be launched.

XY Token is XY Finance's native utility token and governance token and has the following current and planned functions:

* **Staking incentives:** XY Token holders will be able to stake their tokens on the protocol. XY Token holders who stake their tokens will receive a portion of the revenue generated by the protocol. (Pause from 2023/11)
* **Governance:** XY token holders will be able to **participate and vote in the governance process** of the platform. Through governance, users can influence and **modify product features and key parameters** of XY Finance. This will enable XY Token holders to influence the direction of the protocol's development.

XY Token will be supplied on every single chain supported by XY protocol. If joining liquidity mining program on BSC, you receive XY Token as rewards on BSC. Similarly, providing liquidity on Ethereum brings you XY Token on Ethereum.

XY Finance provides an official bridge for XY Token to cross among supported chains. With the support of consensus, users are able to deposit assets and collect rewards on multiple chains easily and safely.

### Allocation

The total supply will be 100,000,000 XY Tokens to be minted with no possibility for future inflation. The tokens will be distributed in the Token Generation Event (TGE), also known as our initial DEX offering (IDO) on Copper Launch, to the following stakeholders within the DAO.

![](/files/qQgxEnog8iimOrOQug5w)

<table data-header-hidden><thead><tr><th width="375.0867587825359">Lot</th><th width="150" align="center">Allocation</th><th align="center">Vesting Period</th></tr></thead><tbody><tr><td>Lot</td><td align="center"><strong>Allocation</strong></td><td align="center"><strong>Vesting Period</strong></td></tr><tr><td>Seed Round</td><td align="center">7.5%</td><td align="center">vesting over 3 years with 10 months cliff</td></tr><tr><td>Private Round</td><td align="center">10%</td><td align="center">vesting over 2 years with 6 months cliff</td></tr><tr><td>Strategy Round</td><td align="center">6.5%</td><td align="center">vesting over 1.5 years with 4 months cliff</td></tr><tr><td>Public Sale (IDO)</td><td align="center">4%</td><td align="center">TGE</td></tr><tr><td>Liquidity Fund for Mining &#x26; GameFi Reward</td><td align="center">37%</td><td align="center">asymptotic vesting over 3 years</td></tr><tr><td>Marketing and Bounties</td><td align="center">15%</td><td align="center">vesting over 3 years</td></tr><tr><td>Teams &#x26; Advisor</td><td align="center">15%</td><td align="center">vesting over 3 years with 10 months cliff</td></tr><tr><td>Insurance</td><td align="center">5%</td><td align="center"><p>fully locked in a multi-sign wallet and set as an emergency insurance fund that cannot be unlocked without XY DAO’s </p><p>approval</p></td></tr></tbody></table>

### Circulating Supply

![](/files/8msgyKKRNffFdXOyAO45)

## Token Economics

![XY Token Economy](/files/36bt9jEfnynEHUxMTHe1)

### veXY

The XY Finance is governed and upgraded by veXY Token holders. The contract of veXY Token allows the community to propose, vote, and implement changes through the administrative functions of strategies. Proposals can modify system parameters, or add entirely new functionality to the protocol.‌

You can lock your XY Tokens into veXY contract to get veXY Tokens. And there are five of periods to lock-in, from **1 week to 104 weeks**. As longer period lock, the incentive will much higher than the shorter one.‌

### Vote <a href="#vote" id="vote"></a>

As protocol grows, there will be more strategies to be integrated, more proposals to be raised from the community. As veXY holder, you will have voting rights for future protocol changes, **including but not limited to change entry / exit fee factor, DAO reserves usage, protocol structure changes.**&#x200C;

### Treasury  <a href="#treasury-and-safu" id="treasury-and-safu"></a>

**As 40% of the swap fee** goes into the treasury, the funds in the treasury will be used for two main purposes. **50% of the funds will be used for buying back XY tokens**, and **the remaining 50% will be used for XY DAO operations**, including improving security, rewarding long-term contributors, paying for operational costs, and other related expenses across the entire XY ecosystem. Therefore, the treasury funds will become an important resource for XY DAO to actively invest in development, not only increasing the value of XY tokens but also maintaining the operation and security of the ecosystem for its prosperous growth.

{% content-ref url="/pages/XSU90n6zK5KKF4FfCCAC" %}
[Treasury](/smart-contract/addresses/treasury)
{% endcontent-ref %}


# Supported Blockchains/Bridges/DEXs

Lists a good selection of blockchains that are currently supported by XY Finance

## Supported Blockchains

| Network Name      | Chain ID | Status      |
| ----------------- | :------: | ----------- |
| **Ethereum**      |     1    | ✅           |
| **BNB**           |    56    | ✅           |
| **Polygon**       |    137   | ✅           |
| **Cronos**        |    25    | ✅           |
| **Avalanche**     |   43114  | ✅           |
| **KuCoin**        |    321   | ✅           |
| **Arbitrum**      |   42161  | ✅           |
| **Optimism**      |    10    | ✅           |
| **Astar**         |    592   | ✅           |
| **zkSync Era**    |    324   | ✅           |
| **Polygon zkEVM** |   1101   | ✅           |
| **Linea**         |   59144  | ✅           |
| **Base**          |   8453   | ✅           |
| **Numbers**       |   10507  | ✅           |
| **Mantle**        |   5000   | ✅           |
| **Scroll**        |  534352  | ✅           |
| **Blast**         |   81457  | ✅           |
| **X Layer**       |    196   | ✅           |
| **Taiko**         |  167000  | ✅           |
| **Cronos zkEVM**  |    388   | ✅           |
| **Abstract**      |   2741   | ✅           |
| **Berachain**     |   80094  | ✅           |
| **Sonic**         |    146   | Coming soon |
| **OX Chain**      |   6699   | ❌           |
| **Klaytn**        |   8217   | ❌           |
| **Moonriver**     |   1285   | ❌           |
| **ThunderCore**   |    108   | ❌           |
| **Fantom**        |    250   | ❌           |

## Supported Bridges

| Network Name        | Status |
| ------------------- | ------ |
| yBridge             | ✅      |
| cBridge             | ✅      |
| Circle CCTP         | ✅      |
| Synapse             | ✅      |
| Across              | ✅      |
| Owlto Finance       | ✅      |
| Arbitrum Bridge     | ✅      |
| Polygon Bridge      | ✅      |
| Optimism Bridge     | ✅      |
| Base Bridge         | ✅      |
| Stargate Finance v2 | ✅      |
| Multichain          | ❌      |

## Supported DEXs

| Network Name | Status |
| ------------ | ------ |
| OpenOcean    | ✅      |
| OKX Dex      | ✅      |
| KyberSwap    | ✅      |
| SushiSwap v2 | ✅      |
| Uniswap v2   | ✅      |
| ZipSwap      | ✅      |
| VVSFinance   | ✅      |
| MDex         | ✅      |
| PancakeSwap  | ✅      |
| QuickSwap v2 | ✅      |
| MojitoSwap   | ✅      |
| ArthSwap     | ✅      |
| Pangolin     | ✅      |
| TraderJoe v2 | ✅      |
| 1inch        | ❌      |


# Fee Structure

Highlights the rates on XY Finance and lets users know what to expect when working with us.

When engaging in the swapping process, various fees come into play, commonly including the gas fee, as well as the swap fee imposed by bridges, aggregators, and decentralized exchanges, among others.

We provide a variety of functions and conveniences to satisfy users in a single step while using our service. Each service is associated with a specific fee, which can be categorized as **Withholding Fee** or **Bridge Fee**. These fees are paid using the native token of the source chain.

$$
TotalFee = WithholdingFee + BridgeFee
$$

{% hint style="info" %}
`Fee Structure describes how XY Finance charges for our services, laying down policies in advance and making transactions via XY Finance transparent.`
{% endhint %}

### Withholding Fee

XY Finance charges a `Withholding Fee` to cover the additional gas usage and processes involved in the swapping of tokens on the destination chain. For example, when users swap tokens from the pool token of the bridge to their desired token, a protocol fee is incurred. We are continuously expanding our range of services and will be introducing more in the future.

{% hint style="info" %}
The fee amount is determined based on the gas price fluctuations across different chains, particularly on `Ethereum`. You can check the current gas price on Ethereum by following this [link](https://etherscan.io/gastracker).
{% endhint %}

{% hint style="info" %}
When [Gasless](/products/x-swap/gasless-transaction) is enabled, the platform covers the network gas cost and the withholding fee from the original token used in the transaction. For example, if a user swaps USDC on Arbitrum to a meme token on Base with Gasless enabled, the fee is deducted directly from the USDC amount used in the swap, no native tokens is used from user's EOA.
{% endhint %}

### Bridge Fee

We have integrated the following bridges to facilitate token bridging across different chains. The `Bridge Fee` is charged by these bridges, which provide liquidity for asset transfers between chains.

* **cBridge**
  * To understand how fees are charged, please refer to the [FAQ](https://cbridge-docs.celer.network/reference/faq).
* **Synapse**
* **Celer-CCTP**
* **Across**
* **Owlto Finance**
* **yBridge**

{% hint style="success" %}
**yBridge** is a bridge owned by XY Finance itself. Through yBridge, XY Finance can offer users/partners better pricing and more convenient services. For more information about the specific bridges and their fee structure, please refer to the link below.
{% endhint %}

{% content-ref url="/pages/R6ZNeJGabWH2sUpAkY3H" %}
[yBridge Fee Information](/fee-structure/ybridge-fee-information)
{% endcontent-ref %}


# yBridge Fee Information

## How is the bridge fee calculated?

Users are able to roughly estimate the cost of a transaction depending on the formulae given below as reference.

* The Bridge Fee consists of two components. The first part is allocated to cover the gas expenses associated with transferring tokens to users on the destination chain. This portion is determined by the fluctuations in the market gas price on the destination chain. The second part is levied to provide rewards to both the yBridge liquidity providers and the XY DAO.

$$
BridgeFee = BaseFee + ProtocolFee
$$

* The Protocol Fee will be calculated based on the amount and a predetermined percentage factor. Typically, this percentage is determined by the XY DAO.

$$
ProtocolFee= amount \cdot rate
$$

* There are **lower bound** and **upper** **bound** in the Protocol Fee.&#x20;

$$
\begin{equation}
\left{
\begin{array}{lr}
ProtocolFee=minimum, & minimum > ProtocolFee \\
ProtocolFee = amount \cdot rate, & minimum < ProtocolFee < maximum\\
ProtocolFee=maximum, & ProtocolFee > maximum \\
\end{array}
\right.
\end{equation}\notag
$$

{% hint style="info" %}
If the trading volume multiplied by ***rate*** is less than the ***minimum***, then XY Finance will still charge the ***minimum*** as a basic commission.

If the trading volume multiplied *by **rate*** is more than the ***maximum***, then XY Finance will only charge the ***maximum*** as a basic commission.
{% endhint %}

{% hint style="info" %}
`protocolFeeRate & minimumProtocolFee & maximumProtocolFee are determined by XY`[`DAO`](broken://pages/xInosIqsU9Fb0JrCkjfE)`.`
{% endhint %}

## How much does the fee cost?

### BaseFee

The fee charged to cover the gas cost on the destination chain will be influenced by several factors. For instance, the ***BaseFee*** will be determined by fluctuations in the gas price on the destination chain. Furthermore, if users request a swap process on the destination chain, it may also incur additional transaction fees.

{% hint style="info" %}
For the actual amount that we charge for ***BaseFee***, please refer to our [fee structure API](/single-bridge-integration/ybridge-api/get-fee-structure).
{% endhint %}

### ProtocolFee

The protocolFee is calculated as **the product of the srcBridgeTokenAmount and rate**. This fee is then allocated to reward yBridge liquidity providers and XY DAO.

{% hint style="info" %}
For the actual amount that we charge for ***ProtocolFee***, please refer to our [fee structure API](/single-bridge-integration/ybridge-api/get-fee-structure).
{% endhint %}

### xAsset Bridge Fee

* `rate`: 0.1%
* `maximum`:  $1,000
* `minimum`: The following values represent the reference minimumFee ranges for different chains. However, it is important to note that actual prices may be subject to adjustment based on market conditions.&#x20;
  * `Ethereum`: $50
  * `Avalanche, Cronos, BNB Chain, Optimism, Arbitrum, zkSync Era, Polygon zkEVM, Linea, Base, Mantle, Scroll, Blast, Taiko, OX Chain, Cronos zkEVM`: $0.6 - $2.3
  * `Others`: $0.15 - $0.285

{% hint style="info" %}
**The actual fee charged for the xAsset Bridge may fluctuate based on the real-time market gas conditions.** Please refer to the real-time display on app.xy.finance for the final fee. We apologize for any inconvenience this may cause
{% endhint %}


# (Legacy) XY Bridge Fee Information

## How is the bridge fee calculated?

Users are able to roughly estimate the cost of a transaction depending on the formulae given below as reference.

* A small portion of fees is taken as a basic commission. Note that one can imagine the ***feeRate*** in the formula below as a constant, or a percentage figure by which any transaction amount (trading volume) should multiply, usually determined by XY DAO.

$$
BridgeFee = Amount \*feeRate
$$

* There are **lower bound** and **upper** **bound** in the Fee Structure to ensure that XY Finance can afford gas fees and will not impose any surcharges upon users.&#x20;

$$
\begin{equation}
\left{
\begin{array}{lr}
BridgeFee=minimumFee, & minimumFee > BridgeFee \\
BridgeFee=Amount \cdot feeRate, & minFee < BridgeFee < maximumFee\\
BridgeFee=maximumFee, & BridgeFee > maximumFee \\
\end{array}
\right.
\end{equation}\notag
$$

{% hint style="info" %}
If the trading volume multiplied by ***feeRate*** is less than the ***minimumFee***, then XY Finance will still charge the ***minimumFee*** as a basic commission.

If the trading volume multiplied *by **feeRate*** is more than the ***maximumFee***, then XY Finance will only charge the ***maximumFee*** as a basic commission.
{% endhint %}

{% hint style="info" %}
`feeRate, minimumFee & maximumFee are determined by XY`[`DAO`](broken://pages/xInosIqsU9Fb0JrCkjfE)`.`
{% endhint %}

## How much does the fee cost?

### General Cross-Chain&#x20;

When you perform cross-chain transactions of your assets through mainstream token pools (e.g., USDC/USDT/ETH), the following fees will be charged:

* `feeRate`: 0.050% - 0.400%
* `maximumFee` : $1,000
* `minimumFee`: The following value represent reference minimumFee for different chains; however, it is important to note that the actual prices may be subject to adjustment based on market conditions:
  * `Ethereum`: $15
  * `Avalanche, Cronos, BNB Chain, Optimism, Arbitrum, zkSync Era, Polygon zkEVM, Linea, Base, Mantle, Scroll`: $0.4 - $1.5
  * `Others`: $0.1 - $0.19

### xAsset Bridge&#x20;

The xAsset Bridge helps projects deploy their tokens onto different chains. When you perform cross-chain transactions involving these specific protocol tokens (e.g., XY/NUM), the following fees will be charged:

* `feeRate`: 0.1%
* `maximumFee`:  $1,000
* `minimumFee`: The following values represent the reference minimumFee ranges for different chains. However, it is important to note that actual prices may be subject to adjustment based on market conditions.&#x20;
  * `Ethereum`: $22.5
  * `Avalanche, Cronos, BNB Chain, Optimism, Arbitrum, zkSync Era, Polygon zkEVM, Linea, Base, Mantle`: $0.6 - $1.35
  * `Others`: $0.15 - $0.285

{% hint style="info" %}
Please note that bridge fees are subject to **change based on fluctuations in the market gas price**. If you are interested in integrating our service and **would like to know the current actual price, please feel free to contact us.**
{% endhint %}


# Bridge Aggregator : XY Finance

An algorithm-driven trading platform that creates functionality to make swaps and add/remove liquidity with ease.

### Overview

We believe all crypto users should be able to trade and swap as they want even if the transaction is going to involve different chains. As previously noted, XY Finance serves as an atomic-swap-based aggregator that supports different token swaps between unique blockchains ecosystem with the minimum disruption possible (no intermediary or central authority involved).&#x20;

Users only need to enter the token they wish to trade and then submit the transaction on the *source chain* box; the following cross-chain proceedings will take place automatically good and proper, and then the swap to the *target chain* will be submitted by our protocol shortly thereafter. The whole transaction will be completed between nodes (participants) in a quick and prompt fashion (more often than not, the transaction only requires one stop to go through).

<figure><img src="/files/dN1TqRYIIM5hxS4Nnt7J" alt=""><figcaption></figcaption></figure>

### Trade WITHOUT limits

The sky is the limit when it comes to the token types you wish to select/place in the source chain and the target chain box respectively, where users are much welcome to provide any token they intend to swap. The source-chain token will be first swapped to sort of a *medium* stablecoin, technically termed "<mark style="color:blue;">**bridge token**</mark>" under our definition and usually USDT or USDC, and then go through a succession of cross-chain steps and be swapped via the target chain DEX at the end. Below is the **`circle`** (or route if you like) that demonstrates how users' funds flow during a transaction:

Note that the above circle is merely a simple swap flow to showcase how a swap is dealt with in our ecosystem. Each step or transaction (TX) is not arranged in chronological order. For example, the TX on the source chain DEX and the one on the target chain DEX usually happen at the same time.

### Nail it with just ONE transaction

With projects and platforms around Web3 proliferating, trading with cryptos seems to become a problem of complexity for many. That being the case, *simplicity* is the key vibe of XY Finance&#x20;

In the course of the swapping process, there is only one transaction that requires users to submit, and the remainder will be handled automatically during the cross-chain trading proceedings by our inbuilt robot (*told ya! we're algorithm-driven*). Users are only required to configure their trade settings ONCE and submit/send the transaction, which, though seemingly straightforward and intuitive, includes not just the swap information of the source chain token to the bridge token, but the swap information on the target chain as well.

All the related details within this transaction will be *logged* on the blockchain, such as the bridge token address, the amount swapped, and the minimum amount of the target chain token to receive in your browser wallet, just to name a few. Then, our bot will follow the instructions users provide from the beginning and pass down these source-chain logs amidst the following trade proceedings, and, finally, activate the transaction on the target chain.

{% hint style="info" %}
`Note that if the trade on the target chain fails, XY Finance (the inbuilt robot) will return bridge tokens to users instead.`
{% endhint %}

### Dodge indirect routing for the BEST price

Trading on the chains we support with XY Finance ensures that our routing algorithm will only route the logs to liquidity pools between the two tokens in the trading pair users choose and will automatically ignore any routes that will take more effort and trading costs to complete.

Our Protocol will calculate and pick out the best swapping route to offer the best price and at the same time the least slippage possible to users. Practically speaking, we do help simplify and minimize the "complexity" of token-to-token swap in general that most users would have to experience. By the time we've ascertained that the token that users wish to obtain is available on our platform, we've also had the route and liquidity necessary all set.&#x20;

{% hint style="info" %}
`Note that if the difference between the market price and the quoted price from our liquidity sources for tokens you wish to swap exceeds the slippage tolerance on the interface, the trade will fail.`
{% endhint %}


# Gasless Transaction

At this point, it's a well-known fact that managing and paying gas tokens for your on-chain transactions has always been a pain. While the account abstraction method in EIP-4337 can help abstract away gas completely, not all users or ecosystems have adopted EIP-4337. Given that more than 80% of users are still using EOAs instead of a smart contract accounts, XY Finance is now ready to support Gasless Transaction to bring a better UX to our cross-chain swap service for everyone.

### What Is Gasless Transaction?

Gasless Transaction is an optional method added to our token swap interface that enables users to swap certain tokens without paying gas on-chain.

### How Does It Work?

To allow EOAs to perform transactions gaslessly,

* Permit (EIP-2612) is used to collect an off-chain token approval signature from user EOAs
* EIP-712 is used to collect an off-chain transaction signature from user EOAs
* A Relayer EOA will send the transaction on-chain by paying gas itself
* User EOA signatures are still mandatory in this process, all transactions can only be processed on-chain if proper signatures are provided
  * Our smart contracts will revert the transactions if the signatures are invalid

When Gasless is enabled, our platform covers the network gas cost using our native tokens. In return, a corresponding fee is deducted from the original token used in the swap to offset that cost. For example, if a user swaps USDC on Arbitrum to a meme token on Base, the fee is taken directly from the USDC amount being swapped, no additional tokens are spent from the user EOA. Refer to [Fee Structure](/fee-structure) for more details on the fee structure.

### How Can I Use Gasless Transaction?

{% tabs %}
{% tab title="Token Selection" %}

<figure><img src="/files/Yd3Oely8YV88TJaPQrZl" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Route Selection" %}

<figure><img src="/files/5grXeSEMxEKvTX0JcE33" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Enable Gasless" %}

<figure><img src="/files/STG8Z2GG7dm8PFZI9ObR" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Token Approval" %}

<figure><img src="/files/DOZ2XOULWlHwIiRZN4pn" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Tx Signature" %}

<figure><img src="/files/RmVxX5cJoK3VBPkcvLfq" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Track Status" %}

<figure><img src="/files/75e0qOkcoAvjBtyv5xox" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

1. Select a token labeled with  `Gasless` next to its symbol
2. Proceed with your swap configuration, click `Review Route` to continue
3. At the Confirmation page, you can enable Gasless with  `Pay Fees With <Token>` toggle
4. Upon clicking `Transfer`, you will be asked to sign a token approval
5. After token approval is signed, you will still be asked to sign a transaction
6. Once the approvals are signed, your transaction will be sent on-chain for processing &#x20;


# Bridge : yBridge

### Mechanism

There will be at most three transactions involved in the `circle` of the swapping process. Under normal circumstances and as previously noted, users will only have to engage in ONE transaction (hereinafter abbreviated as "*TX*") for the swap to get closed, which is **TX1**. However, it's worth noting that there is still one TXs pertinent to whether users' funds could be transferred onto the target chain with success.

* **TX1**: Users send assets (quoted price) via the yBridge on Chain A (the source chain DEX).
* **TX2**: yBridge (our executor) helps swap on Chain B (the target chain DEX) and transfers tokens back to users. This TX will be conducted using a proof of [consensus](broken://pages/-Mf2CmT5CnIATIVo90EA), and by so doing the whole swap can be closed, good and proper.

### Example

Suppose Bob would like to swap 1 **`wBTC on ETH`** for some **`CAKE on BSC`**. With the assistance of yBridge, Bob simply needs to give us permission to access their assets in his wallet (i.e. TX 1 as  ➀ below), and the rest of the swap process will thenceforth be well taken care of. From his viewpoint, he will be able to receive his desired CAKE on BSC with only two TXs that are pertinent to his swap (➀ & ➄). The next section will give the breakdown of the full swapping process.&#x20;

![ A simple flow chart of a swap](/files/-Mgsi4Vw00fColmmlcpu)

### Swap Breakdown

Please refer to the flow chart above for reference.

➀ Firstly, Bob will receive a quotation by interacting with our APIs, which have been instructed to search for and single out the best route for Bob. For instance, `1 wBTC (ETH)` could be swapped for 3000 CAKE (BNB) in return and with a **1%** slippage tolerance. If Bob accepts the quoted price, he can file a TX request, namely **TX1**, by sending `1 wBTC` to yBridge

➁ Our **yBridge** on Ethereum will trade `1 wBTC` on Chain A (Dex1) for the best offer **30000 USDT**.

➂ yBridge will charge some fees, say **20 USDT**, and then submits a transaction request to swap **29980** **USDT** to yBridge for `CAKE on BNB`. Should you wish to learn more about how the fees are calculated, feel free to check the section attached below.

{% content-ref url="/pages/R6ZNeJGabWH2sUpAkY3H" %}
[yBridge Fee Information](/fee-structure/ybridge-fee-information)
{% endcontent-ref %}

➃ ➄ yBridge on BNB will swap USDT for CAKE via DEXs such as *Pancake*. Once successfully traded, CAKE will be transferred to Bob right after. However, if, unfortunately, the price of `CAKE on BNB` suddenly fluctuates following **TX1** and a trading failure results, which means the swap fails to swap **2970** **CAKE** (at least) to Bob, then yBridge will instead transfer **29980 USDT** (BSC) from yBridge to Mr. Bob, who still gets his assets back, safe and sound.

{% hint style="info" %}
If yBridge is unable to successfully complete the transaction on the destination chain due to force majeure, yBridge and/or the Validator Set will reach a consensus that one of them is required to initiate a new transaction in which the equivalent amount of "30000 minus gas fees" USDT (ETH) will be returned to Bob.
{% endhint %}


# Yield Farming

When LPs deposit their funds to incentivize yBridge Pool and provide liquidity, they will earn the *yield* that consists of swap fees and liquidity mining (farming) rewards. Each pool has its specific token (only USDT or USDC are available for the time being), and the liquidity they provide is the token in that pool, hence USDT, USDC or ETH.

<figure><img src="/files/Te6fAw9wnIRUbJeQJykL" alt=""><figcaption></figcaption></figure>

The mechanism of our Pool, like that of *Multichain*, which focuses on the provision of bridging services, is designed as a **single-asset** liquidity pool where users provide only one type of token (USDC/USDT/ETH for now) as liquidity so that LPs never have to be exposed to the well-known risk called impermanent loss that LPs of DEXs (such as *UniSwap*) are facing and the risks such as price swings/fluctuations or the likelihood of high slippage.&#x20;

### Key Points to Know Before Joining yBridge Yield Farming

Due to the pool being built on the OmniChain, there are several key features you should be aware of when engaging in Yield Farming:

#### **yBridge LPs Earn Bridge Fee automatically**

The gains are distributed to be included in the deposit certificate, which is like an interest-bearing token but earning from bridge fees, not from interests. Feel free to dilute my position. More TVL can generate more bridge fees and keep the APY maintaining good. A month ago, there were only 350 ETH in pools, but there are almost 590 right now, 65% MoM.&#x20;

#### Before depositing into yBridge you must know the “Withholding Fee”&#x20;

Why will yBridge have a Withholding Fee? Because yBridge is using its own OmniChain Solution to run the bridge pools on 16 EVM chains (more are coming on zkrollups). **Therefore, the deposit and withdrawal of yBridge will have been completed in two transactions. To cover the gas fee used for the second transaction, yBridge will charge a withholding fee.**&#x20;

#### Why does yBridge use “OmniChain” to build bridge liquidity pools?&#x20;

By doing so, all assets deposited in yBridge will be calculated together. That’s to say, 1 xyETH on Arbitrum is equal to 1 xyETH on Poylgon zkEVM. Both are equal to 1.034675 ETH (current price.)&#x20;

#### How long does Deposit and Withdraw in/from yBridge take?&#x20;

On average, **it takes around 1 mins to complete the deposit and withdrawal**. When you deposit assets into yBridge, the system will send your deposit certificates such as xyUSDC, xyUSDT, and xyETH in the second transaction.&#x20;

#### How to withdraw your assets in yBridge?&#x20;

It’s simple as long as you click the withdrawal and the system will process it. If the liquidity isn’t enough, please wait for a while, and the team will inject more liquidity into it.

#### How to Deposit (Provide Liquidity) on yBridge <a href="#how-to-deposit-provide-liquidity-on-xy-finance-y-pool" id="how-to-deposit-provide-liquidity-on-xy-finance-y-pool"></a>

To deposit and provide liquidity on the yBridge you can follow these [step-by-step instructions](https://blog.xy.finance/ethpool/)


# Omnichain Settlement

Enables greater speed, low transaction costs, and features higher capacity for better interoperability and decentralized user experience.

### Settlement Chain

Within the yBridge system, a crucial component is the settlement chain. This can be envisaged as a digital ledger, documenting the transaction details of users. Furthermore, this layer is vital within the entire ecosystem for establishing liquidity across each chain; it listens to and records the activities of all peripheral chains supported by yBridge.

Firstly, a settlement is defined as a payment or transaction that is conclusive and executed. In the cryptocurrency sector, a transaction is only considered settled once it is recorded on the blockchain, ensuring the irreversibility of the exchanged cryptocurrencies.

Consequently,  we have established the yBridge settlement chain, which supports EVM-compatible smart contracts, thereby enabling code execution in an environment akin to EVMs. This eliminates the need for yBridge to develop solutions from the ground up. Additionally, this approach enhances transaction speed, increases capacity, and reduces gas fees

And on the settlement chain, we will deploy a smart contract to record the pool token balance on each chain and also keep track of the liquidity balance of each user, which makes the settlement chain an arbitrator. The following flow chart demonstrates how different chains interact with the settlement chain and users.

Furthermore, on the settlement chain, a smart contract will be deployed to monitor the pool token balance on each chain and track each user's liquidity balance, positioning the settlement chain as a mediator. The subsequent flowchart illustrates the interaction between different chains and the settlement chain, along with user involvement.en balance on each chain and also keep track of the liquidity balance of each user, which makes the settlement chain an arbitrator.&#x20;

### Validators

To smooth the process of decentralized transactions and to ensure the mechanism function normally, we have several validators set to keep information on each chain updated constantly. They are used to check the validity or syntactical correctness of a fragment of code or document. Not only will the validators help verify whether our web pages are correctly coded, but they are also furnished with a consensus algorithm to prevent malicious attacks, keeping the network security and efficiency up to standard 24/7. You can learn more about the details of consensus and validators at [Consensus](/products/y-pool/consensus)

### Settlement Contract (yBridge)

Once we confirm the completion of a user's source chain transaction, the executor initiates a request on the settlement chain's contract. After our validators complete the verification, the executor, with the signature, is authorized to issue a transaction on the destination chain to fulfill the bridge request. Upon the transaction's completion on the destination chain, the executor returns to the contract on the settlement chain to settle the original request. This process ensures that all behaviors on the peripheral chains are accounted for and error-free.

### Settlement Contract (yBridge Vault)

When users deposit yBridge-supported tokens (i.e. USDT or USDC) into a chain, they will receive `xyUSDT/xyUSDC` (obviously depending on what stablecoins they put into the pool) as proof of deposit or their shares. In contrast, as users withdraw the tokens from a chain, they will return `xyUSDT/xyUSDC` as their shares, as ➀ and ➂ in the following illustrations.

Validators will thus interact with the settlement contract to update the balance of the corresponding chain as well as that of users, as ➁ in the following illustration.

<div data-full-width="false"><img src="/files/-MgtGBYAS8sVJLcIOBCC" alt=""></div>

As time goes by, users' deposits will pay off. They may choose to withdraw their funds using `xyUSD` and get `xyToken` (`&XY`) in return, and that's where the settlement contract calculates or "settles" the corresponding quantity of reward distributed to users, as ➁ shown below.

![User Withdraw Liquidity](/files/-MgtGGDwcL3BpvmhfYlm)


# Consensus

A fault-tolerant mechanism to achieve agreement, assurance, and security in the blockchain system across the decentralized network.

## Basics

An easy way to interpret the notion of our consensus is to imagine it as a prevalent record-keeping mechanism in the crypto space that helps keep all contributing nodes (or you may call them participants or transactors as you like) in the network *honest*.

Hundreds of thousands of users work on authentication/verification of transactions on the blockchain every day and with such a dynamically changing status of the blockchain, it is then essential for these publicly-shared ledgers to have a secure and real-time consensus algorithm to ensure that all the trade happening on our network are genuine and all participants agree on a *consensus* on the status of the ledger. Thus, we brought about this consensus to determine the *legitimacy* of contributions made by the users on the chain.

Consensus is playing an important role in the protocol security of users' funds in cross-chain transactions. There will be two roles involved in our consensus mechanism:&#x20;

➊ **Executor**: the one that executes the target chain transaction\
➋ **Validator**: the one that validates the data of the executor's target transaction and signs/approves&#x20;

## Roles

![The flow chart that demonstrates the roles involved in the proof of consensus](/files/bNOIAHA8bz1yiRwAwd79)

### Executor

For the time being, there will be only one executor within our consensus, which will continually check and process transactions according to the set routine as follows. However, in the future, we plan to open up to more verified partners and institutions to become executors. This will help enhance the stability of the entire system and further diversify risks.

#### ➀ Parse and check the request information from the source blockchain

The executor keeps monitoring cross-chain swaps on each of our supported blockchains, and then parses and validates the events with regard to the transactions. Events in the transactions contain the source and the target chain swap information, which includes the amount of the bridge token, the amount being swapped, the minimum of target tokens to be received, etc.&#x20;

It is also responsible for checking the validity of the orders of the events, and whether the desired amount (the quoted price) within the event tallies with users' funds on the source chain. If the events within transactions are found *invalid*, the executor will require the validators to sign a refund request and submit a source chain refund transaction to refund the swap request from users along with their assets.

#### ➁ Execute swap transaction on the target chain

Once the events are validated and with the prerequisite that the liquidity on the target chain is sufficient, the executor will apply the best route on the target chain to swap bridge tokens to the target tokens. If liquidity is insufficient to underpin the swap, the executor might require the validators to sign the refund request and submit a source chain refund transaction for the swap request from users along with their assets.

### Validator

Within our consensus, there will be multiple validators, predominantly sourced from investors of XY Finance currently. They will support and constantly validate the data of the requests from the executors where necessary. In return, each validator will receive corresponding rewards at each cycle.

#### ➀ Validate requests from source chain and transactions

The validators will continue to validate the executor's requests to ensure they meet the requirements of users, such as the target-chain token amount for closing or the amount of bridge token given to users in case of a failed swap.

#### ➁ Put signatures to transactions for the executors

Upon validating transactions, the validators are responsible for providing signatures to the executor for executing transactions on the destination chain

Validators ensure to only listen to specific events from our particular contract, ensuring the correctness of user requests before issuing the corresponding signature, to avoid exposure to false events and maintain the system's security

## Prospect&#x20;

In the future, we will further optimize our consensus based on the following plans to maintain and enhance overall stability and security

1. We plan to invite 1-2 external executors to enhance system stability, throughput, and mitigate risks
2. We will dynamically adjust the number of reliable validators based on system transaction volume and user count to mitigate the risk of single validator failure or dysfunction, ensuring uninterrupted operation.


# Refuel

Managing native or gas tokens across multiple blockchains can be cumbersome and frustrating, especially when a cross-chain swap is required just to get enough gas for your main transaction. If you've ever felt this pain, Refuel is here to help.

### What Is Refuel?

Refuel is an instant bridge that allows users to swap gas tokens from one chain for gas tokens on other chains. Since gas swaps are typically small transactions meant to facilitate larger ones, processing speed and convenience are crucial. To ensure quick and efficient swaps, we've chosen a centralized approach for Refuel to make gas-to-gas swaps as fast as possible.

### How Does It Work?

1. **Deployment**: [Refuel contracts](/smart-contract/addresses) are deployed on supported chains. In the first wave, Refuel will be available on Ethereum, Arbitrum, Base, and zkSync Era, with plans to expand support to all chains supported by XY Finance
2. **Transaction Creation**: When users interact with Refuel on [XY Finance](https://app.xy.finance/refuel), a transaction is initiated (after your approval) to transfer gas tokens from your wallet to our Refuel contract on the source chain.
3. **Confirmation**: We monitor the contracts for successful transfers on the source chain to confirm these transfers are indeed completed on the source chain
4. **Completion**: Upon confirmation, the contracts will initiate a corresponding transaction on the destination chain, transferring the appropriate amount of gas tokens to your address.

### How Can I Use Refuel?

Here's a quick step-by-step guide.

{% tabs %}
{% tab title="Navigate" %}

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfzISkeSI2_eDwHWugZk2MdwGkFlvuBu7RSfTDmY8T2uSAgXvpRL3YsYj4kv50S0pzSt22iLxTm_soQbdrBnUyJqfzq-awpWZznvMg4J_uXFHxvny4HDzAPr3VezuefFlTj4NcLFMqTKrzVNG4Btq6KQNM?key=kk0iTRrTQS9Lb5BZ2oAFZg" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Input" %}

<figure><img src="/files/rM1AKbTphXYw5AjXesvc" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Confirm" %}

<figure><img src="/files/V2afewXYS5AJvG1iO0x4" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Track" %}

<figure><img src="/files/1qwxYrGrElf7bbyS9owO" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="History" %}

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXewVu9TNy2mb7knUcUKNJWqAJ9oiH8YFz3d3LRodk4zkttRKauTWjr_SOKZVdMvyoMmf2chKhCUjvHQx5xlgxU_r8huQHFeHdeaynjRpAVVune0TkHKF_-bSrukm-CIyTFqLoikWMkUWjjmqwKYeyCgrtQ?key=kk0iTRrTQS9Lb5BZ2oAFZg" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

1. **Navigate**: Click the "[Refuel](https://app.xy.finance/refuel)" button in the upper navigation bar.
2. **Connect Wallet**: Connect your wallet.
3. **Select Chains**: Choose the source and destination chains for your gas tokens.
4. **Input Amount**: Enter the token amount to swap or use the "5x Gas" / "10x Gas" buttons for pre-defined amounts based on estimated gas price.
5. **Refuel**: Click the "Refuel" button to proceed.
6. **Confirm:** Click the "Refuel" button again to confirm & approve the transaction.
7. **Track**: After approval, monitor your transaction status on the same page.
8. **Tips**: If you switched to a different page, you may find your Refuel transactions under "Transaction -> Refuel"


# Proxy Bridge

Transferring assets across different blockchains is challenging; moving them between exchanges on different chains can feel overwhelming. To make this seamless and accessible, XY Finance introduces the <mark style="color:blue;">Proxy Bridge</mark>, a solution that eliminates complex steps and enables fast, easy asset movement across exchanges & any application chain.

### What Is Proxy?

A Proxy is a unique address created and operated by XY Finance, serving as a user’s personalized gateway to partner exchanges. When a user interacts with a supported exchange, Proxy provides a simplified pathway for transactions, bypassing the usual multi-step processes.

### How Does It Work?

Once a user receives their unique Proxy address, transferring assets becomes simple and intuitive:

* **Deposit Flexibility**: Users can transfer supported assets to their Proxy address from any source, including wallets and other exchanges.
* **Automated Cross-Chain Transfer**: Upon successful deposit, XY Finance captures and verifies the transaction.
* **Seamless Delivery**: After confirmation, XY Finance completes the cross-chain transfer in the background, directly depositing the corresponding amount into the user’s exchange account.

<figure><img src="/files/5ga0wE4VCBH6I57Ixvsz" alt="" width="563"><figcaption><p>Simplified Proxy Bridge Diagram</p></figcaption></figure>

### Use Case: [Hybrid Derivatives Exchange - GRVT](https://grvt.io/)

GRVT is a self-custodial hybrid exchange. As the [first official appchain on zkSync’s Hyperchain](https://t.co/KlxIeo4VbS), GRVT leverages advanced zk technology to deliver fast, low-cost transactions while ensuring user autonomy and asset control, setting a new standard for secure, scalable DeFi solutions.

As XY Finance’s latest application chain partner, GRVT will leverage XY's cutting-edge Proxy Bridge technology to offer a user-friendly solution, bridging mass crypto users into decentralized ecosystems. This integration combines the speed of CEXs with the security and control of DeFi, ensuring seamless cross-chain transfers and a smooth user experience.

This collaboration introduces:

* **XY Finance’s Proxy Bridge**: offering users a frictionless way to deposit funds directly from a CEX into GRVT’s smart contract.
* **Gas-Free Transactions**: Eliminates gas fees, streamlining the user experience.
* **Single-Step Process:** No need for multiple wallet transactions, simplifying cross-chain transfers.
* **Industry First for DEXs**: Pioneering frictionless, gas-free bridging for decentralized exchanges.
* **Enhanced Speed and Security**: Ensures faster, more secure cross-chain transactions.
* **User-Friendly**: Accessible for both crypto newcomers and experienced users alike.

{% embed url="<https://grvt.io/>" %}


# Cross Chain Infrastructure

A Toolkit That Makes Going Cross-Chain Easier

## 1. What is our Cross Chain Infrastructure

### 1-1. API

Our API is highly versatile and can be easily integrated into any service. You can design your interface around our bridge and swap functionalities.

We now offers two types of APIs:

* **XY Finance API (Multiple Bridges Aggregator)**: This is our newly launched aggregation API where we have integrated various bridges (cBridge/Synapse/CCTP and more) and DEXs (1inch/OpenOcean and more) to provide you with the best quotes. Additionally, it offers you more new features like Monetization (Additional Fee).

  If you don't want to integrate those DEXs and Bridges on your own but still want to offer bridge services within your Dapp and wallet, you can choose **XY Finance API (Multiple Bridges Aggregator)**

{% content-ref url="/pages/o7vJtps2sMrOdigVjaGL" %}
[XY Finance API (Multiple Bridges Aggregator)](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator)
{% endcontent-ref %}

* **yBridge API**: This API also provides bridge and swap services, but it is limited to our own cross-chain bridge (yBridge). If you want to integrate DEX and Bridges on your own and you want to include yBridge in your services, you can choose **yBridge API**

{% content-ref url="/pages/e9cVeZ15mr0OuwLRJ0lm" %}
[yBridge API](/single-bridge-integration/ybridge-api)
{% endcontent-ref %}

### 1-2. Widget

Our user-friendly widget can be implemented in as little as 10 minutes, offering a simple solution for onboarding users from any platform or device. We offer two different types of integration methods to suit your needs:

* Installed via an iframe.

{% content-ref url="/pages/zef4Ixeyy3RnU6BHKrmT" %}
[XY Finance Widget (iframe)](/bridge-aggregator-integration/xy-finance-widget-iframe)
{% endcontent-ref %}

* Installed via npm&#x20;

{% content-ref url="/pages/WhTOvmZWNAyJ3PDF0ci4" %}
[XY Finance Widget (NPM)](/bridge-aggregator-integration/xy-finance-widget-npm)
{% endcontent-ref %}

{% hint style="info" %}
If your intention is to integrate our widget to help users buy your token more easily, you can also refer to [Token Listing](/bridge-aggregator-integration/token-listing) to list your token on XY Finance together.
{% endhint %}

### 1-3. Custom-Built Link

Our custom-built link enables you to pre-configure your token and chain and link to our website in just a few clicks. This feature is especially useful for those with limited time or resources.

{% content-ref url="/pages/spxQT8UQJi75NwNRwpd2" %}
[Custom-Built Link](/bridge-aggregator-integration/custom-built-link)
{% endcontent-ref %}

Example : Swap <mark style="color:blue;">**1000 USDC From Ethereum**</mark> to <mark style="color:green;">**USDC on Polygon**</mark><mark style="color:green;">.</mark>

[<mark style="color:blue;">https://app.xy.finance/?amount=1000\&fromTokenAddress=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\&sourceChainId=1\&targetChainId=137\&toTokenAddress=0x2791bca1f2de4661ed88a30c99a7a9449aa84174</mark>](https://app.xy.finance/?amount=1000\&fromTokenAddress=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\&sourceChainId=1\&targetChainId=137\&toTokenAddress=0x2791bca1f2de4661ed88a30c99a7a9449aa84174)

{% hint style="info" %}
If your intention is to use a custom-built link to help users buy your token more easily, you can also refer to [Token Listing](/bridge-aggregator-integration/token-listing) to list your token on XY Finance together.
{% endhint %}

### 1-4. xAsset Bridge <a href="#which-projects-should-use-xy-finance-cross-chain-widget" id="which-projects-should-use-xy-finance-cross-chain-widget"></a>

Our xAsset Bridge helps projects **Bridge their tokens to different chains**. you can refer to the following steps to set up a bridge on XY Finance, allowing users to conveniently and securely wrap their assets on various chains.

{% content-ref url="/pages/aSHnkKnB7ACOPjFIVt3s" %}
[xAsset Bridge](/single-bridge-integration/xasset-bridge)
{% endcontent-ref %}

### 1-5. Contract Integration

If you want to integrate our smart contract directly to access our services, you can follow the guide below to understand how to interact with our own bridge, **yBridge**.

{% content-ref url="/pages/L4dfBrPIW2vo5nP2BTJF" %}
[yBridge Contract Integration](/single-bridge-integration/ybridge-contract-integration)
{% endcontent-ref %}

Currently, **we have not yet provided a guide for direct contract interaction with our aggregator service, XY Finance**. If you require such the guide, please contact us

## **2. Which Projects Should Use XY Finance Cross-Chain** Infrastructure <a href="#which-projects-should-use-xy-finance-cross-chain-widget" id="which-projects-should-use-xy-finance-cross-chain-widget"></a>

### **2-1. API** <a href="#f0-9f-8e-ae-gamefi-gamefi-management-platform" id="f0-9f-8e-ae-gamefi-gamefi-management-platform"></a>

* **Bridge/DEX Aggregator**：Leverage the API to seamlessly bridge and aggregate liquidity from multiple DEXs across 14+ chains, giving your users a wider range of options with better prices and faster transaction completion times.

<figure><img src="/files/MQM1mlSVYneE07TAW5vB" alt=""><figcaption><p>Example: <a href="https://app.rubic.exchange/">https://app.rubic.exchange/</a></p></figcaption></figure>

* **Web3 Wallet:** Customize the entry to suit your interface to provide users with a unified experience to bridge and swap any token across 14+ chains.

<figure><img src="/files/XZZ26mmEH8nifIQTAHps" alt="" width="375"><figcaption><p> Example : <a href="https://www.frontier.xyz/">https://www.frontier.xyz/</a></p></figcaption></figure>

* **DEX, Lending, Yield, Yield Aggregator, Derivative and more Dapps**: Enhance your Dapp's functionality by adding bridge and swap service through API. Allow users to swap and bridge any token across 14+ chains without leaving the Dapp.

<figure><img src="/files/yuy5K8lgX6gAOStn1E9W" alt=""><figcaption><p>DCA Project supported by XY Finance <a href="https://neonprotocol.io/v4.html">https://neonprotocol.io/v4.html</a></p></figcaption></figure>

### **2-2. Widget**  <a href="#f0-9f-8e-ae-gamefi-gamefi-management-platform" id="f0-9f-8e-ae-gamefi-gamefi-management-platform"></a>

* **GameFi/GameFi Management Platform:** Provides players a one-stop platform for everything they need to trade and manage their GameFi assets. Ultimately increase user stickiness & enhance your presence in the GameFi industry by inflowing more liquidity for game players, guilds as well as other GameFi projects. &#x20;

<figure><img src="/files/gVoI5gaK8SfczC9ZoAOl" alt=""><figcaption><p>Example: <a href="https://app.croskull.com/#/bank">https://app.croskull.com/#/bank</a></p></figcaption></figure>

* **DEX, Lending, Yield, Yield Aggregator, Derivative and more Dapps :** Whether you provide token staking, yield farming, lending, or other services, our cross-chain widget can help facilitate user onboarding and improve the user experience by enabling seamless swapping and bridging of tokens across 14+ chains without having to leave your dApp.

<figure><img src="/files/i7mbEKLJadeljseSdZat" alt=""><figcaption><p>Example: <a href="https://xy.mojitoswap.finance/">https://xy.mojitoswap.finance/</a></p></figcaption></figure>

* **Web3 Wallet:** Hot or cold, give your users a one-stop experience to manage and trade their cryptocurrencies across 14+ chains.
* **NFT Marketplace:** With the cross-chain widget, the NFT trading part just became super simple and easy. Users can get tradeable tokens from any chains on any available liquidity pool. By doing so, onboarding more NFT collectors will become easier and have a much better experience.

### **2-3.** Custom-Built Link <a href="#f0-9f-8e-ae-gamefi-gamefi-management-platform" id="f0-9f-8e-ae-gamefi-gamefi-management-platform"></a>

* **Any projects:** With Custom-Built Link, you can make it easier for users to buy your tokens, allowing them to complete their purchases with just one click across 10+ different chains.

<figure><img src="/files/IX3RU5bBWb3Q3gz5Hgs9" alt=""><figcaption><p>Example: <a href="https://app.bolide.fi/">https://app.bolide.fi/</a></p></figcaption></figure>

## 3. How to contact with us

### If you have further questions, please fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLSeJamZPxZm2oDyMGUFcEqlSHfy_WjIpuAYEqwu98rPg5xAedA/viewform) and include the services you would like to integrate. Once we receive it, we will contact you as soon as possible.


# XY Finance API (Multiple Bridges Aggregator)

XY Finance API offers developers a seamless solution for transferring liquidity and information across various chains. With this API, you can effortlessly access aggregated liquidity and information from numerous decentralized exchange networks, both on-chain and off-chain, as well as bridges, spanning multiple blockchains.

The API provides a wide range of parameters that can be tailored to suit the specific requirements of your application and users. It empowers you to effortlessly navigate the multi-chain ecosystem and interact with on-chain XY contracts on different chains. This versatility enables you to integrate and leverage the benefits of the multi-chain world with ease.

#### XY Finance **API** **(Multiple Bridges Aggregator)** Endpoint

<table><thead><tr><th width="118.33333333333331">Version</th><th width="178">Note</th><th>Endpoint</th></tr></thead><tbody><tr><td><strong>v1</strong></td><td>The latest version</td><td><a href="https://aggregator-api.xy.finance/v1/"><code>https://aggregator-api.xy.finance/v1/</code></a></td></tr></tbody></table>

{% hint style="info" %}
Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


# Get Quote

This endpoint will return currently available routes with estimated target token amount for your quote. You can also designate specific bridges or aggregator to customize the route. If there is no available route, it will return an error\_code, which you can reference [here](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/error-message) to get error detail.

{% openapi src="/files/TtIQ5kToU9bWazZWUKQj" path="/quote" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2F992nLSFootyLzNGT3OSd%2Fopenapi.json?alt=media\&token=dbdd978e-3fd3-4af0-a7aa-36ce013023ad)
{% endopenapi %}

### Parameter/Response Details

* Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the address for the native token in your parameter.
* If you would like to know more about **commissionRate** fields and fee collection function, please refer to [Monetization / Take Fees](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/monetization-take-fees)
* If you would like to know latest supported bridge provider and swap provider, please refer to [Supported Blockchains/Bridges/DEXs](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/supported-blockchains-bridges-dexs)
* The `estimatedGas` field in the API response is an estimated value. For now, please use a method similar to RPC, such as [eth\_estimateGas](https://www.quicknode.com/docs/ethereum/eth_estimateGas), to re-estimate the actual gas limit. You can refer to the following sample code to do that:

```python
from web3 import Web3
import requests
​
if __name__ == "__main__":
    # 1st: get tx data from xy aggregator api
    endpoint = 'https://aggregator-api.xy.finance/v1/buildTx?srcChainId=137&srcQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&srcQuoteTokenAmount=9000000000000000000&dstChainId=56&dstQuoteTokenAddress=0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d&slippage=1&receiver=0x9cEEEbdF49cF5DEa891C9D74f8ea03af2aCf284F&bridgeProvider=yBridge&srcBridgeTokenAddress=0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174&dstBridgeTokenAddress=0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d&srcSwapProvider=OneInch%20V4%20DexAggregator&affiliate=0x512E00f66217714BAee5F0736428b026e8c30AF5'
    resp = requests.get(endpoint)
    resp_json = resp.json()
​
    # 2nd: get estimateGas by calling web3 rpc
    rpc_endpoint = 'https://polygon.llamarpc.com'
    w3 = Web3(Web3.HTTPProvider(rpc_endpoint))
    estimate_gas = w3.eth.estimate_gas(resp_json["tx"])
​
    # 3rd: Combine the estimateGas with the tx data
    tx = resp_json["tx"]
    tx["gas"] = estimate_gas
​
    # 4th: sign the tx & send it
    priv_key = "0x"
    tx_signed = w3.eth.account.sign_transaction(tx, priv_key)
    tx_hash = w3.eth.send_raw_transaction(tx_signed.rawTransaction)
```

### Example Request

```shell
$ curl "https://aggregator-api.xy.finance/v1/quote?srcChainId=10&srcQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&srcQuoteTokenAmount=1000000000000000000&dstChainId=56&dstQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&slippage=1&bridgeProviders=yBridge
```

This request is asking a quote of **1 ETH** on **Optimism** to **ETH** on **Arbitrum Chain** and designate yBridge as bridgeProvider.

{% hint style="warning" %}
**`IMPORTANT:`**` ``Note that the amount parameter should be padded with zeroes. For example, pass`` `**`100000000`**` ``instead of`` `**`100`**` ``if the decimals of the token is 6.`
{% endhint %}

{% hint style="info" %}
Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


# Get Allowance

If source quoting asset is an ERC20 token, you should ensure that source token owner has approved sufficient token amount to spender before proceed swap operation. This endpoint provide convenient way to check ERC20 allowance amount.

{% openapi src="/files/WHsYhaZR0heNBFy7A96c" path="/allowance" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2FnbSx9SgRqHu6Fj5VWo1E%2Fopenapi.json?alt=media\&token=aa194fc4-5d6d-43c2-b4f2-e972276123f6)
{% endopenapi %}

{% hint style="info" %}
**NOTE :** The spender should be the `contractAddress` in the response of [Get Quote](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/get-quote).\
e.g. `routes[{ROUTE_INDEX}]["contractAddress"]`
{% endhint %}

{% hint style="info" %}
Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


# Build Approval Transaction

If your allowance is not sufficient, this endpoint can help you initiate an ERC20 approval transaction.

{% openapi src="/files/TtIQ5kToU9bWazZWUKQj" path="/approveTx" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2F992nLSFootyLzNGT3OSd%2Fopenapi.json?alt=media\&token=dbdd978e-3fd3-4af0-a7aa-36ce013023ad)
{% endopenapi %}

{% hint style="info" %}
**NOTE :** The spender should be the `contractAddress` in the response of [Get Quote](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/get-quote).\
e.g. `routes[{ROUTE_INDEX}]["contractAddress"]`
{% endhint %}

{% hint style="info" %}
Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


# Build Swap Transaction

{% openapi src="/files/TtIQ5kToU9bWazZWUKQj" path="/buildTx" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2F992nLSFootyLzNGT3OSd%2Fopenapi.json?alt=media\&token=dbdd978e-3fd3-4af0-a7aa-36ce013023ad)
{% endopenapi %}

When building transaction, there are 6 additional parameters along with **quote** input.

<table><thead><tr><th width="271">Field name</th><th>Requirement</th></tr></thead><tbody><tr><td><code>receiver</code></td><td>Required</td></tr><tr><td><code>srcSwapProvider</code></td><td>Required when <strong>srcSwapDescription</strong> is presented in quote result</td></tr><tr><td><code>dstSwapProvider</code></td><td>Required when <strong>dstSwapDescription</strong> is presented in quote result</td></tr><tr><td><code>bridgeProvider</code></td><td>Required when <strong>bridgeDescription</strong> is presented in quote result</td></tr><tr><td><code>srcBridgeTokenAddress</code></td><td>Required when <strong>bridgeDescription</strong> is presented in quote result</td></tr><tr><td><code>dstBridgeTokenAddress</code></td><td>Required when <strong>bridgeDescription</strong> is presented in quote result</td></tr></tbody></table>

To build transaction, please fill the corresponding fields (`srcSwapDescription`, `bridgeDescription` and `dstSwapDescription`) from **quote** response's route to **buildTx** input . If parameters are not filled properly, it may not return the desired routing result. You can review the transaction calldata route by checking `route` field in **buildTx** response.

For example, following response is **quote** result of **Arbitrum USDT** to **KCC native token**.

<pre class="language-json"><code class="lang-json">// quote response
<strong>{
</strong>    "success": true,
    "routes": [
        {
            "srcChainId": 42161,
            "srcQuoteTokenAddress": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
            "srcQuoteTokenAmount": "10000000",
            "dstChainId": 321,
            "dstQuoteTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "srcSwapDescription": null,
            "bridgeDescription": {
                "provider": "yBridge",
                // ...
            },
            "dstSwapDescription": {
                "provider": "XY DexAggregator",
                // ...
            },
            // ...
        }
    ],
}
</code></pre>

* `srcSwapDescription` is **null** because these is no source chain swap needed in this route, so we don't have to fill `srcSwapProvider` when calling buildTx.
* We have a non-empty `bridgeDescription` because it's a cross-chain quote. We need to fill corresponding `bridgeProvider`, `srcBridgeTokenAddress` and `dstBridgeTokenAddress` when calling buildTx. For single chain quote, we can skip these parameters.
* `dstSwapDescription` is needed in this route. So we need to fill `dstSwapProvider` when calling buildTx.

Therefore, we can create the following **buildTx** request from above information:

```sh
// buildTx request
curl -G \
  -d 'srcChainId=42161' \
  -d 'srcQuoteTokenAddress=0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9' \
  -d 'srcQuoteTokenAmount=10000000' \
  -d 'dstChainId=321' \
  -d 'dstQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' \
  -d 'slippage=1' \
  -d 'receiver=YOUR_DESTINATION_CHAIN_RECEIVER_ADDRESS' \
  -d 'bridgeProvider=yBridge' \
  -d 'srcBridgeTokenAddress=0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9' \
  -d 'dstBridgeTokenAddress=0x0039f574eE5cC39bdD162E9A88e3EB1f111bAF48' \
  -d 'dstSwapProvider=XY%20DexAggregator' \
  https://aggregator-api.xy.finance/v1/buildTx
```

### Parameter/Response Details

* Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the address for the native token in your parameter.
* If you would like to know more about **commissionRate** fields and fee collection function, please refer to [Monetization / Take Fees](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/monetization-take-fees)
* If you would like to know latest supported bridge provider and swap provider, please refer to [Supported Blockchains/Bridges/DEXs](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/supported-blockchains-bridges-dexs)
* The `estimatedGas` field in the API response is an estimated value. For now, please use a method similar to RPC, such as [eth\_estimateGas](https://www.quicknode.com/docs/ethereum/eth_estimateGas), to re-estimate the actual gas limit. You can refer to the following sample code to do that:

```python
from web3 import Web3
import requests
​
if __name__ == "__main__":
    # 1st: get tx data from xy aggregator api
    endpoint = 'https://aggregator-api.xy.finance/v1/buildTx?srcChainId=137&srcQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&srcQuoteTokenAmount=9000000000000000000&dstChainId=56&dstQuoteTokenAddress=0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d&slippage=1&receiver=0x9cEEEbdF49cF5DEa891C9D74f8ea03af2aCf284F&bridgeProvider=yBridge&srcBridgeTokenAddress=0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174&dstBridgeTokenAddress=0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d&srcSwapProvider=OneInch%20V4%20DexAggregator&affiliate=0x512E00f66217714BAee5F0736428b026e8c30AF5'
    resp = requests.get(endpoint)
    resp_json = resp.json()
​
    # 2nd: get estimateGas by calling web3 rpc
    rpc_endpoint = 'https://polygon.llamarpc.com'
    w3 = Web3(Web3.HTTPProvider(rpc_endpoint))
    estimate_gas = w3.eth.estimate_gas(resp_json["tx"])
​
    # 3rd: Combine the estimateGas with the tx data
    tx = resp_json["tx"]
    tx["gas"] = estimate_gas
​
    # 4th: sign the tx & send it
    priv_key = "0x"
    tx_signed = w3.eth.account.sign_transaction(tx, priv_key)
    tx_hash = w3.eth.send_raw_transaction(tx_signed.rawTransaction)
```

### Example Request

<pre class="language-shell"><code class="lang-shell"><strong>$ curl https://aggregator-api.xy.finance/v1/buildTx?srcChainId=10&#x26;srcQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&#x26;srcQuoteTokenAmount=1000000000000000000&#x26;dstChainId=56&#x26;dstQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&#x26;slippage=1&#x26;receiver=0xb6EFA1C3679f1943f8aC4Fc9463Cc492435c6C92&#x26;bridgeProvider=yBridge&#x26;srcBridgeTokenAddress=0x94b008aA00579c1307B0EF2c499aD98a8ce58e58&#x26;dstBridgeTokenAddress=0x55d398326f99059fF775485246999027B3197955&#x26;affiliate=0x90d67a9eaC7324A1a2942D6Dea9f6174Ad6048c9&#x26;commissionRate=100000&#x26;srcSwapProvider=OKX+DEX&#x26;dstSwapProvider=OKX+DEX
</strong></code></pre>

This request is asking to bridge **1** **ETH** from **Optimism** for **ETH** on the **BNB Chain**

{% hint style="warning" %}
**`IMPORTANT:`**` ``Note that the amount parameter should be padded with zeroes. For example, pass`` `**`100000000`**` ``instead of`` `**`100`**` ``if the decimals of the token is 6.`
{% endhint %}

{% hint style="info" %}
Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


# Get Cross-Chain Status

After cross-chain transaction sent, you can check the current cross-chain status using this endpoint.

## Get Cross Chain Status

<mark style="color:blue;">`GET`</mark> `https://aggregator-api.xy.finance/v1/crossChainStatus`&#x20;

#### Query Parameters

| Name                                         | Type    | Description                   |
| -------------------------------------------- | ------- | ----------------------------- |
| srcChainId<mark style="color:red;">\*</mark> | Integer | Source chain ID               |
| srcTxHash<mark style="color:red;">\*</mark>  | String  | Source chain transaction hash |

{% tabs %}
{% tab title="200: OK Done" %}

```json
{
  "success": true,
  "status": "Done",
  "msg": "Transaction has been completed.",
  "tx": "<transaction hash on target chain>"
}
```

{% endtab %}

{% tab title="200: OK Processing" %}

```json
{
  "success": true,
  "status": "Processing",
  "msg": "Source chain transaction detected, destination chain transaction pending.",
  "tx": null
}
```

{% endtab %}

{% tab title="200: OK Not found" %}

```json
{
  "success": false,
  "status": "Not found",
  "msg": "No transaction found in the system.",
  "tx": null
}
```

{% endtab %}

{% tab title="200: OK Receive bridge token" %}

```json
{
  "success": true,
  "status": "Receive bridge token <symbol>",
  "msg": "Transaction reverted, bridge token received.",
  "tx": "<transaction hash on target chain>"
}
```

{% endtab %}

{% tab title="200: OK Receive synapse token" %}

```json
{
  "success": true,
  "status": "Receive synapse bridge token <symbol>",
  "msg": "Transaction reverted, Synapse token received.",
  "tx": "<transaction hash on target chain>"
}
```

{% endtab %}

{% tab title="200: OK Pending refund" %}

```json
{
  "success": true,
  "status": "Pending refund",
  "msg": "Transaction cannot be executed on destination chain, refund pending.",
  "tx": null
}
```

{% endtab %}

{% tab title="200: OK Refunded" %}

```json
{
  "success": true,
  "status": "Refunded",
  "msg": "Transaction cannot be executed on destination chain, refunded.",
  "tx": "<transaction hash of source chain refund>"
}
```

{% endtab %}
{% endtabs %}

There are seven possible statuses: **Not found, Processing, Done, Receive bridge token, Receive synapse token, Pending refund, and Refunded.**

| Status                                                                                                                                                                                                                     | Msg                                                                       | Discription                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Not found**                                                                                                                                                                                                              | No transaction found in the system.                                       | No matching system record or source chain transaction detected.                                                                                                                                                       |
| **Processing**                                                                                                                                                                                                             | Source chain transaction detected, destination chain transaction pending. | System record exists; source transaction complete, destination pending.                                                                                                                                               |
| **Done**                                                                                                                                                                                                                   | Transaction has been completed.                                           | There is a system record, and the destination transaction has been completed.                                                                                                                                         |
| <p><strong>Receive bridge token (TOKEN\_NAME)</strong></p><p></p><p><strong>For example :</strong></p><ul><li>Receive bridge token (USDT)</li><li>Receive bridge token (USDC)</li><li>Receive bridge token (ETH)</li></ul> | Transaction reverted, bridge token received.                              | Due to price change over the slippage tolerance or other unforeseen issues, the transaction has been reverted on the destination chain and received bridge token instead.                                             |
| <p><strong>Receive synapse token ( TOKEN\_NAME )</strong></p><ul><li>Receive synapse token (nUSD)</li><li>Receive synapse token (nETH)</li></ul>                                                                           | Transaction reverted, Synapse token received.                             | Due to price swap over the slippage tolerance or other unforeseen issues, your transaction was reverted on the destination chain and received Synapse's bridge token instead.                                         |
| **Pending refund**                                                                                                                                                                                                         | Transaction cannot be executed on destination chain, refund pending.      | Transaction encountered an error and cannot be executed on the destination chain, we will refund the bridge token on the source chain. Once the refund transaction has been completed, it will be marked as Refunded. |
| **Refunded**                                                                                                                                                                                                               | Transaction failed on destination chain, refunded.                        | Refund completed, pool token sent to source chain sender's address.                                                                                                                                                   |

{% hint style="info" %}
Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


# Get MinimumSwapAmount

{% openapi src="/files/MzPUh2zZX7pVgpcroUKz" path="/info/minimumSwapAmount" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2FuliN2Fmxbutd9Ej5RST4%2Fopenapi.json?alt=media\&token=3f444dcb-a8e6-432c-b79d-d602068dd4a5)
{% endopenapi %}

```json
{
  "success": true,
  "chainMinimumSwapAmount": {
    "1": {
      "minimumSwapAmountUsdValue": 37,
      "expiredAt": 1708329600
    },
    "56": {
      "minimumSwapAmountUsdValue": 1.16,
      "expiredAt": 1708329600
    }
  }
}
```

For the provided example response, the keys '10' and '137' represent the chain IDs of the destination chains you intend to bridge to. Within this structure, the information indicates the minimum required amount in USD Value for a seamless transaction, along with its expiration time.

* `minimumSwapAmount`: Please ensure that your source bridge token amount is greater than this amount; otherwise, the response may result in an error.
* `expiryAt`: Each chain has its own expiry time. The details in the object will **no longer be usable** once the expiry time has passed.

{% hint style="info" %}
Please confirm the expiration time before it's due. The **quickest** we update is **every 20 minutes,** but it can vary.
{% endhint %}


# Recommended Tokens

{% openapi src="/files/WHsYhaZR0heNBFy7A96c" path="/recommendedTokens" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2FnbSx9SgRqHu6Fj5VWo1E%2Fopenapi.json?alt=media\&token=aa194fc4-5d6d-43c2-b4f2-e972276123f6)
{% endopenapi %}

{% hint style="info" %}
&#x20;Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


# Supported Blockchains/Bridges/DEXs

Full list of supported blockchain networks

#### 1. Supported Blockchains

{% openapi src="/files/TtIQ5kToU9bWazZWUKQj" path="/supportedChains" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2F992nLSFootyLzNGT3OSd%2Fopenapi.json?alt=media\&token=dbdd978e-3fd3-4af0-a7aa-36ce013023ad)
{% endopenapi %}

#### 2. Supported Bridges Providers

{% openapi src="/files/TtIQ5kToU9bWazZWUKQj" path="/supportedBridgeProviders" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2F992nLSFootyLzNGT3OSd%2Fopenapi.json?alt=media\&token=dbdd978e-3fd3-4af0-a7aa-36ce013023ad)
{% endopenapi %}

#### 3. Supported Swap Providers (DEXs)

{% openapi src="/files/TtIQ5kToU9bWazZWUKQj" path="/supportedSwapProviders" method="get" %}
[openapi.json](https://3694085950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mcs9EhDrgbKHodtcAT6%2Fuploads%2F992nLSFootyLzNGT3OSd%2Fopenapi.json?alt=media\&token=dbdd978e-3fd3-4af0-a7aa-36ce013023ad)
{% endopenapi %}

* XY Finance has currently integrated several DEX Aggregators. The `supported dexes` field may vary with updates to the DEX Aggregator. If the field is empty, it indicates that the DEX Aggregator has not provided this information.

{% hint style="info" %}
Here you can find our full [API reference](https://aggregator-api.xy.finance/v1/docs)
{% endhint %}


# Error Message

```
// error response schema
{
    success: boolean
    errorCode: integer
    errorMsg: string
}
```

<table><thead><tr><th width="228">Description</th><th width="466">errorMsg</th><th>errorCode</th></tr></thead><tbody><tr><td>Unknown error.</td><td>Unknown error.</td><td>10000</td></tr><tr><td>System maintenance.</td><td>System under maintenance. Please wait and check our Twitter for updates.</td><td>10001</td></tr><tr><td>Parameter 'affiliate' is invalid.</td><td>Affiliate is required if commission_rate is provided.</td><td>20001</td></tr><tr><td>Parameter 'slippage" is invalid.</td><td>Slippage must be within the range [0, 50]</td><td>20003</td></tr><tr><td>Parameter 'swapProviders' is required.</td><td>If 'srcQuoteTokenAddress' differs from 'srcBridgeTokenAddress' or 'dstQuoteTokenAddress' differs from 'dstBridgeTokenAddress', API request parameter 'swapProviders' is required.</td><td>20004</td></tr><tr><td>Parameter 'bridgeProvider', 'srcBridgeTokenAddress' and 'dstBridgeTokenAddress' are required.</td><td>If 'srcChainId' differs from 'dstChainId', API request parameters 'bridgeProvider', 'srcBridgeTokenAddress' and 'dstBridgeTokenAddress' are required.</td><td>20005</td></tr><tr><td>Address is invalid.</td><td>Address {address} is invalid.</td><td>20006</td></tr><tr><td>Cannot apply parameter 'swap provider'.</td><td>{Source/Destination} 'swapProviders' is not allowed {reason}.</td><td>20007</td></tr><tr><td>Cannot apply parameter 'bridge provider'.</td><td>If 'srcChainId' equals 'dstChainId', API request parameter 'bridgeProviders' is not allowed.</td><td>20008</td></tr><tr><td>Parameter 'sourceQuoteToken' ≤ 0</td><td>API request parameter 'srcTokenAmount' must be greater than 0.</td><td>20009</td></tr><tr><td>Not supported network.</td><td>Chain {chain_id} is not supported.</td><td>30001</td></tr><tr><td>No available route found.</td><td>No available route found, please try again later.</td><td>30002</td></tr><tr><td>Not supported 'bridgeProviders'</td><td>'bridgeProvider' : {bridgeProvider} is not supported.</td><td>30003</td></tr><tr><td>Invalid 'commisionRate'</td><td>API request parameter 'commission_rate' {value} is not in the range [{lower_bound}, {upper_bound}].</td><td>30004</td></tr><tr><td>Not supported 'swapProviders'</td><td>'swapProvider' : {swapProvider} is not supported on chain {chain_id}.</td><td>30005</td></tr><tr><td>Network under maintenance.</td><td>The network chain id : {chain_id} is under maintenance, please follow our update.</td><td>30006</td></tr><tr><td>Applied dex aggregator currently no route.</td><td>Applied DEX aggregator is currently unable to provide available route for requested swap pair, please try again later.</td><td>30007</td></tr><tr><td>Not supported bridge token amount; amount is too low.</td><td>Bridge token amount below minimum threshold. Please try a higher amount. Minumum threshold : {Threshold_bridge_token_amount: int} {src_bridge_token_symbol: int} Threshold bridge token address : {src_bridge_token_address: int}</td><td>30008</td></tr><tr><td>Not supported bridge token amount; amount is too high.</td><td>Bridge token amount exceeds maximum threshold. Please try a lower amount. Maximum threshold : {Threshold_bridge_token_amount: int} {src_bridge_token_symbol: int} Threshold bridge token address : {src_bridge_token_address: int}</td><td>30009</td></tr><tr><td>[yBridge] requested bridge token is not a yBridge token</td><td>Requested bridge token is invalid and not supported by yBridge.</td><td>31003</td></tr><tr><td>[cBridge] API fail</td><td>cBridge API error.</td><td>32004</td></tr></tbody></table>


# Monetization / Take Fees

Integrate [XY Finance API (Multiple Bridges Aggregator)](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator) to enable fee collection from transaction volumes in your dApp

### How it works

By integrating XY Finance API to request transaction quotes, dApps can now include a fee parameter to specify the percentage of the transaction volume they wish to collect as fees. This percentage fee will be deducted from the user's initial asset in the transaction and directly distributed to the designated wallet address. XY Finance will receive a percentage share of the collected fees based on the specific use case and transaction volume.

### How to set up

To configure the fee collection, there are two relevant parameters that you can adjust: `affiliate` and `commission rate` during the execution of [Get Quote](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/get-quote) and [Build Swap Transaction](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/build-swap-transaction)

* `commission rate` represents the fee you wish to collect. It is an integer between 0 and 100,000. In this range, 100,000 corresponds to 10%, 10,000 represents 1%, and so on in a similar fashion.
* `affiliate` parameter represents the address where you want to receive the fees. The collected fee in every transaction will be directly transferred to this address. Before proceeding, please ensure that the provided address is under your management and capable of receiving assets correctly.

Below are examples demonstrating how to configure the fee setup.

**API Example**

```
// quote request with affiliate and commissionRate
curl -G \
  -d 'srcChainId=42161' \
  -d 'srcQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' \
  -d 'srcQuoteTokenAmount=10000000000000000' \
  -d 'dstChainId=59144' \
  -d 'dstQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' \
  -d 'slippage=1' \
  -d 'affiliate=YOUR_AFFILIATE_ADDRESS' \
  -d 'commissionRate=1000' \
  https://aggregator-api.xy.finance/v1/quote
```

```bash
// buildTx request with affiliate and commissionRate
curl -G \
  -d 'srcChainId=42161' \
  -d 'srcQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' \
  -d 'srcQuoteTokenAmount=10000000000000000' \
  -d 'dstChainId=59144' \
  -d 'dstQuoteTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' \
  -d 'slippage=1' \
  -d 'affiliate=YOUR_AFFILIATE_ADDRESS' \
  -d 'commissionRate=1000' \
  -d 'receiver=YOUR_DESTINATION_CHAIN_RECEIVER_ADDRESS' \
  -d 'bridgeProvider=Synapse' \
  -d 'srcBridgeTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' \
  -d 'dstBridgeTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' \
  https://aggregator-api.xy.finance/v1/buildTx
```

#### Transaction example

Here is the link of the transaction where you can actually know how the affiliate fee is collected and distributed

{% embed url="<https://arbiscan.io/tx/0x68dd9397dec679660ec8c50be1c9f18dcbfb36abc9fd6a11ea9fa88f3eb73d20>" %}

In this case, the quote parameters are as follows:

* **commisionRate** = 1000&#x20;
  * it means the transaction will take 1000/1000000 = 0.1% as the affiliate fee.
* **srcQuoteTokenAmount** = 10000000000000000
  * it represents 0.01 without decimals.
* **srcQouteTokenAddess** = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&#x20;
  * it represents as native token in our API&#x20;

You can find the following process executed in this transaction:

* **XY router** (0x062.....08c) will distribute 0.1 % of the volume as the affiliate fee (0.00001 ETH)
  * Transfer 0.000008 ETH to the designated affiliate address (0xBF.....362)
  * Transfer 0.000002 ETH to XY fee collector (0x46.....29d)


# Change Log

### \[2023-09-22]

#### Features

* New API :  [Supported Bridges Providers](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/supported-blockchains-bridges-dexs)
* New API :  [Supported Swap Providers (DEXs)](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/supported-blockchains-bridges-dexs)

### \[2023-07-19]

#### Features

* Public Release [XY Finance API (Multiple Bridges Aggregator)](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator)
* [Build Swap Transaction](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/build-swap-transaction) supports bridgeProvider, srcSwapProvider and dstSwapProvider.
* Support [Monetization / Take Fees](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/monetization-take-fees) for API
* New API : [Supported Blockchains API ](/bridge-aggregator-integration/xy-finance-api-multiple-bridges-aggregator/supported-blockchains-bridges-dexs)


# XY Finance Widget (iframe)

XY Finance Widget is easy to embed into your apps and sites alike, helping engage and retain your users.

XY Finance team has been wracking our brains just to come up with a powerful engagement tool to help strengthen your user retention, making them want to come back more for a satisfying user experience that this widget provides for your website and reducing friction by letting them fast-forward into your app's/site's key functionality. Note that this Widget will be constantly renewed as we're also gathering more resources and collecting feedback from users along the way.&#x20;

## Get Started

Place the `<iframe>` tag where you want the widget to appear, and you’re all set!

```tsx
export default function App() {
  // You can change the iframe size. Recommended settings: width 480, height 700.
  return (
    <>
      <iframe width={480} height={700} src="https://widget.xy.finance" />
    </>
  )
}
```

{% hint style="info" %}
List of environments we've tested so far:

* React ([Example](https://github.com/XY-Finance/examples/tree/main/widget-iframe/v1/vite-react))
* Vue ([Example](https://github.com/XY-Finance/examples/tree/main/widget-iframe/v1/vite-vue))
* Next.js ([Example](https://github.com/XY-Finance/examples/tree/main/widget-iframe/v1/nextjs))

For more detailed examples, please refer to our [example repository](https://github.com/XY-Finance/examples/?tab=readme-ov-file) where you can find additional information.
{% endhint %}

***

## Configuring Default Settings for the Widget

If you’d like to set default values for the widget, simply add search parameters to the URL.&#x20;

For example:

```
https://widget.xy.finance/?amount=1&fromTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&lockmode=none&referrer=0x856ebdc948afFCc6E24FCe08458051B19de652F6&commissionRate=2000&slippage=1&sourceChainId=1&targetChainId=1&theme=light&toTokenAddress=0x77777777772cf0455fB38eE0e75f38034dFa50DE
```

```tsx
import queryString from 'query-string'

export default function App() {
  const config = {
    // The address '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' stands for the native token.
    fromTokenAddress: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
    sourceChainId: '1',
    toTokenAddress: '0x77777777772cf0455fB38eE0e75f38034dFa50DE',
    targetChainId: '1',
    amount: 1,
    slippage: '1',
    theme: 'dark',
    lockmode: 'none',
    referrer: '0x856ebdc948afFCc6E24FCe08458051B19de652F6',
    commissionRate: 2000
  }
  const searchParams = queryString.stringify(config)
  // amount=1&fromTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&lockmode=none&referrer&slippage=1&sourceChainId=1&targetChainId=1&theme=dark&toTokenAddress=0x77777777772cf0455fB38eE0e75f38034dFa50DE

  return (
    <div>
      <iframe
        width={480}
        height={700}
        src={`https://widget.xy.finance/?${searchParams}`}
      />
    </div>
  )
}
```

## Configuration

<table><thead><tr><th width="196">Key</th><th width="179">Type</th><th width="140">Default</th><th>Note</th></tr></thead><tbody><tr><td>fromTokenAddress</td><td>String</td><td>'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'</td><td>Use <code>0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE</code> as the address for a native token in your configuration.</td></tr><tr><td>sourceChainId</td><td>String</td><td>'1'</td><td>Please check <a data-mention href="/pages/FCnq6AObtaH5cMqaWYl9">/pages/FCnq6AObtaH5cMqaWYl9</a></td></tr><tr><td>toTokenAddress</td><td>String</td><td>'0x77777777772cf0455fB38eE0e75f38034dFa50DE'</td><td></td></tr><tr><td>targetChainId</td><td>String</td><td>'1'</td><td>Please check <a data-mention href="/pages/FCnq6AObtaH5cMqaWYl9">/pages/FCnq6AObtaH5cMqaWYl9</a></td></tr><tr><td>amount</td><td>Number</td><td>1</td><td></td></tr><tr><td>slippage</td><td>String</td><td>'1'</td><td>If the difference between the estimated quote and execution price exceeds the rate (default rate 1%), the tx will be revoked.</td></tr><tr><td>theme</td><td><code>dark</code> | <code>light</code></td><td><code>dark</code></td><td></td></tr><tr><td>lockmode</td><td><code>none</code> or <code>both</code> or <code>fromToken</code> or <code>toToken</code></td><td><code>none</code></td><td>Disable user select Token </td></tr><tr><td>referrer</td><td>String or null</td><td>null</td><td>For the details, please check <a data-mention href="#how-do-referrer-and-commissionrate-work">#how-do-referrer-and-commissionrate-work</a></td></tr><tr><td>commissionRate</td><td>Number</td><td>0</td><td><p>min: <code>0</code><br>max: <code>20000</code></p><p></p><p>For the details, please check <a data-mention href="#how-do-referrer-and-commissionrate-work">#how-do-referrer-and-commissionrate-work</a></p></td></tr></tbody></table>

## How do referrer and commissionRate work?

Setting the commissionRate will collect a fee percentage from the user's swap amount, which is then directly distributed to the specified wallet address. XY Finance will receive a share of these fees, varying according to the use case and transaction volume.

* `commissionRate` represents the fee you wish to collect. It is an integer between 0 and 20,000. In this range, 20,000 corresponds to 2%, 1,000 represents 0.1%, and so on in a similar fashion.
* `referrer` parameter represents the address where you want to receive the fees. The collected fee in every transaction will be directly transferred to this address. Before proceeding, **please ensure that the provided address is under your management and capable of receiving assets correctly.**

{% tabs %}
{% tab title="Theme: Dark" %}
![](/files/chWclxZTCVx1c7wd7zO7)
{% endtab %}

{% tab title="Theme: Light" %}

<figure><img src="/files/yO41obliqNiHM6w2cqgK" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}


# (Legacy) XY Finance Widget (iframe)

XY Finance Widget is easy to embed into your apps and sites alike, helping engage and retain your users.

XY Finance team has been wracking our brains just to come up with a powerful engagement tool to help strengthen your user retention, making them want to come back more for a satisfying user experience that this widget provides for your website and reducing friction by letting them fast-forward into your app's/site's key functionality. Note that this Widget will be constantly renewed as we're also gathering more resources and collecting feedback from users along the way.&#x20;

The "Get Started" section below gives a step-by-step walkthrough as to how you're supposed to do to complete the embedding process and personalize your web/app experience, making transactions on your protocol way easier and interfaces look gracefully effortless! The "Configuration" section, however, categorizes the elements (keys) in the code, providing a clearer picture with regard to the website embedded.

## Get Started

Step 1. Paste this code as high in the **\<head>** of the page as possible

```html
<script defer type="text/javascript" src="https://widget.xy.finance/js/bundle.min.js"></script> 
```

Step 2. Paste this **\<div>** tag to the place where you need Widget to display in `body`&#x20;

```html
<div id="xy-finance-widget-root"></div>
```

Step 3. Paste this **\<script>** to the bottom of `body`

```html
<script defer>
  setTimeout(() => {
    // set default config
    const config = {
      fromTokenAddress: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
      sourceChainId: '1',
      toTokenAddress: '0x77777777772cf0455fB38eE0e75f38034dFa50DE',
      targetChainId: '1',
      amount: 1,
      slippage: '1',
      orientation: 'portrait',
      theme: 'dark',
      lockmode: 'none',
      pagecolor: null,
      referrer: '0x856ebdc948afFCc6E24FCe08458051B19de652F6'
    }

    // use widget
    xyFinanceWidget.init(config);
  }, 2000)
</script>
```

### Configuration

<table><thead><tr><th width="196">Key</th><th width="179">Type</th><th width="140">Default</th><th>Note</th></tr></thead><tbody><tr><td>fromTokenAddress</td><td>String</td><td>'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'</td><td></td></tr><tr><td>sourceChainId</td><td>String</td><td>'1'</td><td></td></tr><tr><td>toTokenAddress</td><td>String</td><td>'0x77777777772cf0455fB38eE0e75f38034dFa50DE'</td><td></td></tr><tr><td>targetChainId</td><td>String</td><td>'1'</td><td></td></tr><tr><td>amount</td><td>Number</td><td>1</td><td></td></tr><tr><td>slippage</td><td>String</td><td>'1'</td><td>If the difference between the estimated quote and execution price exceeds the rate(default rate 1%),the tx will be revoked.</td></tr><tr><td>orientation</td><td><code>portrait</code> | <code>landscape</code></td><td><code>portrait</code></td><td>For now, only support 'portrait'</td></tr><tr><td>theme</td><td><code>dark</code> | <code>light</code></td><td><code>dark</code></td><td></td></tr><tr><td>lockmode</td><td><code>none</code> or <code>both</code> or <code>fromToken</code> or <code>toToken</code></td><td><code>none</code></td><td>Disable user select Token </td></tr><tr><td>pagecolor</td><td>String or null</td><td>null</td><td>Only use HexColor without <code>#</code></td></tr><tr><td>referrer</td><td>String or null</td><td>null</td><td>Address of the referrer, this address will be used uniformly for any future partner incentive programs</td></tr></tbody></table>

The "sourceChainId" and "targetChainId" in the configuration can be found in the page below.

{% content-ref url="/pages/FCnq6AObtaH5cMqaWYl9" %}
[Supported Blockchains/Bridges/DEXs](/supported-blockchains-bridges-dexs)
{% endcontent-ref %}

**Theme : Dark**

![](/files/VdfFS3uJ3CuF6k00jNog)

**Theme : Light**

<figure><img src="/files/c5Gp7QpwQ2eTwZrRZNVf" alt=""><figcaption></figcaption></figure>


# XY Finance Widget (NPM)

Starting from NPM version 4.0, we have officially migrated from wagmi v1 to wagmi v2. ( Learn more information about version change in Change Log )

XY Finance team has been wracking our brains just to come up with a powerful engagement tool to help strengthen your user retention, making them want to come back more for a satisfying user experience that this widget provides for your website and reducing friction by letting them fast-forward into your app's/site's key functionality. Note that this XY Finance Widget will be constantly renewed as we're also gathering more resources and collecting feedback from users along the way.&#x20;

## Compatibility

* React 18&#x20;
* Vite ([Example](https://github.com/XY-Finance/examples/tree/main/widget-npm/v4/vite))
* Next.js ([Example](https://github.com/XY-Finance/examples/tree/main/widget-npm/v4/nextjs))

{% hint style="info" %}
If you have specific compatibility requirements or need further assistance, please [reach out to us](https://docs.google.com/forms/d/e/1FAIpQLSeJamZPxZm2oDyMGUFcEqlSHfy_WjIpuAYEqwu98rPg5xAedA/alreadyresponded).
{% endhint %}

## Let's get started!

* Begin by installing the widget using the example provided in the "[**Getting Started**](/bridge-aggregator-integration/xy-finance-widget-npm/install-the-widget)" section.
* [**Configure the Widget**](/bridge-aggregator-integration/xy-finance-widget-npm/configure-the-widget): Customize the **default settings** that appear on the widget, including **disabling undesired tokens/chains** and **featuring the tokens** you want to promote.
* [**Customize the Theme**](/bridge-aggregator-integration/xy-finance-widget-npm/customize-the-theme): Modify the widget's **border-radius**, **color**, and **font-family** to match your website's style.
* Explore the full [**API Reference**](/bridge-aggregator-integration/xy-finance-widget-npm/widget-api-reference): Find detailed information about the configuration options we provide.
* Stay updated with the [**Change Log**](/bridge-aggregator-integration/xy-finance-widget-npm/change-log): Stay informed about the latest changes and updates we have made.


# Install the Widget

## Installation

To use XY Finance widget in your project, run the following command in your terminal:

* For React 18, Vite, Next.js

{% tabs %}
{% tab title="npm" %}

```bash
npm install @xyfinance/widget
```

{% endtab %}

{% tab title="pnpm" %}

```bash
pnpm install @xyfinance/widget
```

{% endtab %}

{% tab title="bun" %}

```bash
bun install @xyfinance/widget
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
We use the latest versions of popular web3 libraries such as [Viem](https://viem.sh/) and [Wagmi](https://wagmi.sh/). If you can't install our widget due to an outdated project, please [contact us](https://discord.com/channels/874214080272007200/951113229902442496) or try installing our v3 version widget via `npm install @xyfinance/widget@legacy-v3` instead.
{% endhint %}

```tsx
import { Widget } from '@xyfinance/widget'

const config = {
  disabledChains: [],
  fromInput: '0.1',
  fromToken: {
    address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
    chainId: '1'
  },
  toToken: {
    address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
    chainId: '56'
  },
  referrer: '0xFD19727868A8197F42e7a52d024374598F62953B',
  featuredTokens: [
    {
      address: '0x666666661f9B6D8c581602AAa2f76cbead06C401',
      chainId: '56'
    }
  ]
}

const theme = {
  mode: 'light',
  fontFamily: 'proxima-nova',
  borderRadius: {
    container: '12px',
    inner: '8px',
    button: '32px'
  },
  colors: {
    primary: '#277EEC',
    gradient: ['#277EEC', '#1499E4']
  },
  components: {
    button: {
      variant: 'gradient'
    }
  }
}

export default function App() {
  return (
    <div
      style={{
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        height: '100vh',
        margin: '0px auto'
      }}
    >
      <div
        style={{
          width: '480px'
        }}
      >
        <Widget config={config} theme={theme} />
      </div>
    </div>
  )
}
```

<figure><img src="/files/Z59EtmoSlIaQmLu0D67b" alt=""><figcaption></figcaption></figure>

## **TypeScript**

For users of TypeScript, you can import both the `Config` and `Theme` type to understand what properties are available for configuration:

```tsx
import { Widget, type Config, type Theme } from '@xyfinance/widget'

const config: Config = {
  ...,
  fromInput: '12.345',
}

const theme: Theme = {
  ...,
  mode: 'light'
}

function App() {
  return (
    <div>
      <Widget config={config} theme={theme} />
    </div>
  )
}
```

## Example

Check out our [**examples repository**](https://github.com/XY-Finance/examples).

{% hint style="info" %}
Please refer to our [Widget API Reference](/bridge-aggregator-integration/xy-finance-widget-npm/widget-api-reference) for a comprehensive overview of available configuration options.
{% endhint %}


# Configure the Widget

Our widget offers a range of variable features for you to customize according to the specific needs of your project. You can begin by configuring the fundamental settings, such as the default source and destination chains, tokens, and the input amount in the default setting.

```tsx
const config = {
  fromInput: '0.1',
  fromToken: {
    address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
    chainId: '1'
  },
  toToken: {
    address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
    chainId: '56'
  },
  referrer: '0xFD19727868A8197F42e7a52d024374598F62953B'
}

function App() {
  return (
    <div>
      <Widget config={config} />
    </div>
  )
}
```

### Disabling the specific chains

```jsx
const config = {
  ...,
  disabledChains: ['108', '1285', '8127', '592', '10507']
}
```

XY Finance offers services across multiple chains, and our partners can choose to disable certain chains by configuring the **`disabledChains`** setting. This results in a simpler and more streamlined interface for users, allowing them to quickly find the information they need. Here's an example with a few disabled chains to demonstrate this.

<figure><img src="/files/XE87q4vFzgIhfkhuIavB" alt=""><figcaption></figcaption></figure>

### Disabling the specific tokens

```jsx
const config = {
  ...,
  disabledTokens: [
    {
      address: '0x77777777772cf0455fb38ee0e75f38034dfa50de',
      chainId: '1'
    }
  ],
}
```

If you choose to disable a particular token from appearing on their widget, it will no longer be searchable by its symbol name or address. This provides customers with an easy way to block tokens they may dislike or not trust. To illustrate this, we'll use our $XY token as an example.

<figure><img src="/files/mHNNZ6Al18wOztFxvmKJ" alt=""><figcaption></figcaption></figure>

### Featuring the tokens you wish to promote

```jsx
const config = {
  ...,
  featuredTokens: [
    {
      address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
      chainId: '321'
    },
    {
      address: '0x2ca48b4eea5a731c2b54e7c3944dbdb87c0cfb6f',
      chainId: '321'
    }
  ]
}
```

To make it easy for customers to promote a token to their partners, we offer a 'featured token' function. With this feature, you can pin the token you want to display at the top of the list, giving it greater exposure.

<figure><img src="/files/XGkYjQw4nmIvOT4TsdHv" alt=""><figcaption></figcaption></figure>

### Configure the referrer

```tsx
const config = {
  ...,
  referrer: '0xFD19727868A8197F42e7a52d024374598F62953B'
}
```

This option requires you to provide a web3 wallet address or smart contract address. Please complete the [form](https://docs.google.com/forms/d/e/1FAIpQLSeJamZPxZm2oDyMGUFcEqlSHfy_WjIpuAYEqwu98rPg5xAedA/viewform). If the `commissionRate` is not configured, the referrer parameter will solely be utilized for tracking the traffic linked to your account.

### Set the commission rate

```typescript
const config = {
  ...,
  referrer: '0xFD19727868A8197F42e7a52d024374598F62953B',
  commissionRate: 1000
}
```

Setting the commissionRate will collect a fee percentage from the user's swap amount, which is then directly distributed to the specified wallet address. XY Finance will receive a share of these fees, varying according to the use case and transaction volume.

* `commission rate` represents the fee you wish to collect. It is an integer between 0 and 20,000. In this range, 20,000 corresponds to 2%, 1,000 represents 0.1%.
* `referrer` parameter represents the address where you want to receive the fees. The collected fee in every transaction will be directly transferred to this address. Before proceeding, please ensure that the provided address is under your management and capable of receiving assets correctly.

{% hint style="info" %}
For additional information, please refer to our [Widget API Reference](/bridge-aggregator-integration/xy-finance-widget-npm/widget-api-reference).
{% endhint %}


# Customize the Theme

Customize the widget to best match your web’s design.

We offer a range of customization options to help you create a widget that matches your preferred style. Please refer to the guide below and our [Widget API reference](/bridge-aggregator-integration/xy-finance-widget-npm/widget-api-reference) for detailed instructions.

```tsx
const theme = {
  ...,
  mode: 'light'
}

function App() {
  return (
    <div>
      <Widget theme={theme} />
    </div>
  )
}
```

## mode

When customizing your website-style widget, start by selecting a mode that suits your preference and proceed with the following customization. We offer two modes: `dark` and `light`.

```tsx
const theme = {
  ...,
  mode: 'dark'
}
```

{% tabs %}
{% tab title="dark mode" %}

<figure><img src="/files/i4Ynr1vrYYEO7dfnxP3X" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="light mode" %}

<figure><img src="/files/maPNvTPJf3D7IPHAN1p9" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## font-family

This option sets the font display for the widget, and works in compatibility with [**css font-family property**](https://www.w3schools.com/cssref/pr_font_font-family.php).

```tsx
const theme = {
  ...,
  fontFamily: 'ui-sans-serif, system-ui, -apple-system'
}
```

{% hint style="info" %}
Please note that you need to install the font that you want to use in your frontend project by yourself.
{% endhint %}

## border-radius

You have the option to customize the border-radius of three different components based on your preference.

```tsx
const theme = {
  ...,
  borderRadius: {
    container: '12px',
    inner: '8px',
    button: '32px'
  }
}
```

Please refer to the image below to see the areas that are affected by each border-radius class:

{% tabs %}
{% tab title="container" %}

<figure><img src="/files/g5LrBnKDvvvniS1cZu1z" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="inner" %}

<figure><img src="/files/B0IDeFjrUpqDF3qFLF2S" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="button" %}

<figure><img src="/files/hjjQ7mUsCAaklIbUYHGJ" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## colors

First and foremost, customize the colors that will be used in our widget to create a unified appearance. You have the option to select a primary color and a gradient color to personalize the components.

Secondary, the primary color represents the main color style of the entire widget. As shown in the example below, the primary color will be applied throughout the widget whenever it is used by users.

```tsx
const theme = {
  ...,
  colors: {
    primary: '#277EEC',
    gradient: ['#277EEC', '#1499E4']
  }
}
```

{% tabs %}
{% tab title="primary" %}

<figure><img src="/files/iY6qcFLEvDx9XPQ7Pjru" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="primary changed" %}

<figure><img src="/files/cS9QLDRACoR0fcf9TDng" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

Additionally, assign the chosen colors to the respective components. Currently, the button is the only component that supports gradient colors.

```tsx
const theme = {
  ...,
  colors: {
    primary: '#277EEC',
    gradient: ['#277EEC', '#1499E4']
  },
  components: {
    button: {
      variant: 'gradient' // 'filled' | 'gradient' | 'grey' | 'neutral'
    }
  }
}
```

If you prefer to have a single color for your button component, you can refer to the example code provided below to see the desired result.

```tsx
const theme = {
  ...,
  components: {
    button: {
      variant: 'filled' // The color will be determined by the primary color configuration as it is set to 'filled'.
    }
  }
}
```

{% tabs %}
{% tab title="gradient" %}

<figure><img src="/files/gzP446YMYdMXHfr3OEU3" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="filled" %}

<figure><img src="/files/ylQUD2pqGCAl5IncP8bR" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

Last but not least, we also offer two additional styles for the button: 'grey' and 'neutral'. You can choose the style that best fits your preferences and design aesthetics.

{% tabs %}
{% tab title="grey" %}

<figure><img src="/files/VOKmZOAC44Byi6zPvwCw" alt=""><figcaption><p>grey</p></figcaption></figure>
{% endtab %}

{% tab title="neutral" %}

<figure><img src="/files/4LQQxYglT0orC4VH26SE" alt=""><figcaption><p>neutral</p></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
For additional information, please refer to our [Widget API Reference](/bridge-aggregator-integration/xy-finance-widget-npm/widget-api-reference).
{% endhint %}


# Widget API Reference

There are two props you can pass to `XY Finance Widget`:

1. `config`: This property allows you to specify the configuration for the widget. It must be an object that follows the structure of the `Config` interface.
2. `theme`: This property lets you specify a custom UI theme for the widget. It must be an object that follows the structure of the `Theme` interface.

{% hint style="info" %}
These two properties are optional. If not provided, they will default to predefined values.
{% endhint %}

Here's an example of how to use these properties in `TypeScript`:

```tsx
import { Widget, Config, Theme } from '@xyfinance/widget'

const config: Config = {
  disabledChains: ['137', '42161'],
  slippage: '1',
  fromInput: '0.1',
  ...
}

const theme: Theme = {
  mode: 'light',
  fontFamily: 'proxima-nove, ui-sans-serif, system-ui, -apple-system',
  borderRadius: {
    container: '12px',
    inner: '8px',
    button: '32px'
  },
  colors: {
    primary: '#277EEC',
    gradient: ['#277EEC', '#1499E4']
  },
  components: {
    button: {
      variant: 'gradient'
    }
  }
}

function App() {
  return (
    <div>
      <Widget theme={theme} config={config} />
    </div>
  )
}
```

## Theme

```tsx
interface Theme {
  mode?: 'light' | 'dark'

  fontFamily?: string

  borderRadius?: {
    container?: string
    inner?: string
    button?: string
  }

  colors?: {
    primary?: string
    gradient?: [string?, string?]
  }

  components?: {
    button?: {
      variant?: 'gradient' | 'neutral' | 'filled' | 'grey'
    }
  }
}
```

### `mode`

* type: `'light'` | `'dark'`
* default: `'light'`

This option allows you to toggle the widget's mode between light and dark, depending on your preference.

### **`fontFamily`**

* type: `string`
* default: `'ui-sans-serif, system-ui, -apple-system'`

This option sets the font display for the widget, and works in compatibility with [**css font-family property**](https://www.w3schools.com/cssref/pr_font_font-family.php).

```tsx
const theme = {
  ...,
  fontFamily: 'ui-sans-serif, system-ui, -apple-system'
}
```

Please note that you need to install the font that you want to use in your frontend project by yourself, such as:

```html
<head>
  ...
  <link rel="stylesheet" href="https://use.typekit.net/pws4fmb.css" />
</head>
```

### `borderRadius`

* type: `IBorderRadius`

```tsx
interface IBorderRadius {
  container?: string
  inner?: string
  button?: string
}
```

* default:

```typescript
{
  container: '12px',
  inner: '8px',
  button: '32px'
}
```

This option controls the border radius of certain components. You can specify the radius in pixels.

### `colors`

* type: `IColors`

```tsx
interface IColors {
  primary?: string
  gradient?: [string?, string?]
}
```

* default:

```tsx
{
  primary: '#277EEC',
  gradient: ['#277EEC', '#1499E4']
}
```

This option defines the colors used in this widget. You can specify the color using valid color strings such as RGBA, Hex, or HSL values.

{% hint style="info" %}
**`gradient[0]`** represents the initial color, while **`gradient[1]`** signifies the final color in the gradient.
{% endhint %}

### `components`

* type: `IComponents`

```tsx
interface IComponents {
  button?: IButton
}

interface IButton {
  variant?: 'gradient' | 'neutral' | 'filled' | 'grey'
}
```

* default:

```tsx
{
  button: {
    variant: 'gradient'
  }
}
```

This option controls the behavior and appearance of the components.

{% hint style="info" %}
This option will be expanded over time as we extend our support.
{% endhint %}

## C**onfig**

```tsx
interface Config {
  disabledChains?: string[]

  fromToken?: UserToken | null
  toToken?: UserToken | null

  fromInput?: string

  slippage?: string
  referrer?: string

  featuredTokens?: UserToken[]
  disabledTokens?: UserToken[]

  disableTokenSelection?: 'from' | 'to' | 'both' | 'none'

  enableReport?: boolean
}

interface UserToken {
  chainId: string
  address: string
}
```

### **`disabledChains`**

* type: `Array<string>`
* default: `[]`

You can hide chains that you don't want to display. Here's our current list of [supported chains](/supported-blockchains-bridges-dexs).

For example, if you wish to disable `BNB` and `Polygon` from appearing in your widget, you can set:

```jsx
const config = {
  ...,
  disabledChains: ['56', '137']
}
```

{% hint style="info" %}
For security purposes, **`Ethereum`** cannot be disabled.
{% endhint %}

### **`slippage`**

* type: `string`
* default: `'1'`

This option allows you to set the slippage rate for swapping, which can only be set to values with two decimal places between 0.01 and 49.99.

```jsx
const config = {
  ...,
  slippage: '2'
}
```

{% hint style="warning" %}
If the difference between the estimated quote and execution price exceeds the default rate of 1%, the transaction will be cancelled.
{% endhint %}

### **`referrer`**

* type: `string`
* default: `'0xFD19727868A8197F42e7a52d024374598F62953B'`

This option requires you to provide a web3 wallet address or smart contract address. Please complete the [form](https://docs.google.com/forms/d/e/1FAIpQLSeJamZPxZm2oDyMGUFcEqlSHfy_WjIpuAYEqwu98rPg5xAedA/viewform). If the `commissionRate` is not configured, the referrer parameter will solely be utilized for tracking the traffic linked to your account.

```jsx
const config = {
  ...,
  referrer: '0xFD19727868A8197F42e7a52d024374598F62953B'
}
```

### **`commissionRate`**

* type: `number`
* default: `0`
* min: `0`
* max: `20000`

Setting the commissionRate will collect a fee percentage from the user's swap amount, which is then directly distributed to the specified wallet address. XY Finance will receive a share of these fees, varying according to the use case and transaction volume.

* `commissionRate` represents the fee you wish to collect. It is an integer between 0 and 20,000. In this range, 20,000 corresponds to 2%, 1,000 represents 0.1%, and so on in a similar fashion.
* `referrer` parameter represents the address where you want to receive the fees. The collected fee in every transaction will be directly transferred to this address. Before proceeding, **please ensure that the provided address is under your management and capable of receiving assets correctly.**

```jsx
const config = {
  ...,
  referrer: '0xFD19727868A8197F42e7a52d024374598F62953B',
  commissionRate: 1000
}
```

### **`fromInput`**

* type: `string`
* default: `''`

This option sets the initial value in your widget's source chain input.

For example, if you want to set the initial value to be `100.99`, you can use the following code snippet:

```jsx
const config = {
  ...,
  fromInput: '100.99'
}
```

### **`fromToken`**

* type: `{ chainId: string, address: string }` | `null`
* default: `null`

This option allows you to set the initial token for the source chain section of your widget.

For example, if you want to set your source chain token as `ETH` on the Ethereum network, you can use the following code snippet:

```jsx
const config = {
  ...,
  fromToken: {
    chainId: '1',
    address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
  }
}
```

You should use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the address for a native token in your configuration. Alternatively, you can also import `NATIVE_TOKEN_ADDRESS` from the widget package and use it as follows:

```jsx
import { NATIVE_TOKEN_ADDRESS } from '@xyfinance/widget';

const config = {
  ...,
  fromToken: {
    chainId: '1',
    address: NATIVE_TOKEN_ADDRESS
  }
}
```

This allows you to use a constant value for the native token address in your code, which can make it easier to manage and modify in the future.

### **`toToken`**

* type: `{ chainId: string, address: string }` | `null`
* default: `null`

This option allows you to set the initial token for the destination chain section of your widget.

For example, if you want to set your destination chain token as `BNB` on the BNB chain, you can use the following code snippet:

```jsx
const config = {
  ...,
  toToken: {
    chainId: '56',
    address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
  }
}
```

***

### **`featuredTokens`**

* type: `Array<{ chainId: string, address: string }>`
* default: `[]`

This option highlights the tokens that you provide in the token selection page.

For example, if you want to highlight `USDT` on Ethereum and `USDC` on Polygon, you can use the following code snippet:

```jsx
const config = {
  ...,
  featuredTokens: [
    {
      address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
      chainId: '1'
    },
    {
      address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
      chainId: '137'
    }
  ]
}
```

{% hint style="info" %}
Please remember to fill out the [form](<https://docs.google.com/forms/d/e/1FAIpQLSeJamZPxZm2oDyMGUFcEqlSHfy_WjIpuAYEqwu98rPg5xAedA/viewform >) provided if you would like to highlight a token that is not listed in our token list. This will allow us to add it and ensure that the token icon is displayed correctly.
{% endhint %}

### **`disabledTokens`**

* type: `Array<{ chainId: string, address: string }>`
* default: `[]`

This option allows you to hide specific tokens from the token selection page. This can be useful if you want to limit the number of tokens available to the user.

For example, if you want to hide `USDT` on Ethereum and `USDC` on Polygon, you can use the following code snippet:

```jsx
const config = {
  ...,
  disabledTokens: [
    {
      address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
      chainId: '1'
    },
    {
      address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
      chainId: '137'
    }
  ]
}
```

{% hint style="info" %}
It's important to note that for safety reasons, native tokens cannot be disabled. Furthermore, please keep in mind that the **`disabledTokens`** option takes priority over the **`featuredTokens`** option. If a token is listed in both options, it will be hidden.
{% endhint %}

### **`disableTokenSelection`**

* type: `'from'` | `'to'` | `'both'` | `'none'`
* default: `'none'`

This option allows you to disable the swap token selection, which can be helpful if you want to limit your users to swapping tokens with a specific token.

```jsx
const config = {
  ...,
  disableTokenSelection: 'to'
}
```

### **`enableReport`**

* type: `boolean`
* default: `true`

Enabling the `enableReport` feature allows us to collect and analyze error messages from users on our server. This helps us to identify and resolve potential issues with the widget, ensuring a better user experience.

```jsx
const config = {
  ...,
  enableReport: true
}
```

### **Examples**

Check out our [**examples repository**](https://github.com/XY-Finance/examples).


# Change Log

### v4.5.7

#### Patch Changes

* Chore: update MATIC to POL
* Update chain order

### v4.5.6

* Refine CICD max memory size.

### v4.5.5

* Remove @uidotdev/usehooks from packages

### v4.5.4

* Support cronos zkevm

### v4.5.3

* Add `.umd` back to build output for supporting Next.js user.

### v4.5.2

* Add refetchInterval in `useAllowance`(default: 5s).
* Support Gate.io wallet.

### v4.5.1

* Remove ssr render.

### v4.5.0

* Upgrade internal WalletConnect package from `@walletconnect/modal` to `@web3moddal/wagmi`.

### v4.4.8

* Add `.css` file exports path.

### v4.4.7

* Add `yBridge_Amount_Exceeds_Cap_Limit` (31001) error code in `DisplayHelper`.

### v4.4.6

* Update package dependencies.

### v4.4.5

* Feat: add tooltip if chain name is too long
* Support Owlto Finance.

### v4.4.4

* Remove `refetchInterval` in `RouterQuoteProvider` to fix unexpected `/quote` request across different pages issue.

### v4.4.3

* Add `MinReceived`, `WithholdingFee` UI on Transfer page.

### v4.4.2

* Refine turbo repo v2 CICD settings.

### v4.4.1

* Upgrade wagmi version to `2.10.10`, fixing Coinbase connector unable to connect issue.
* Upgrade turbo version to `2.0.6`.

### v4.4.0

* Update and enhance the transaction tracking feature.

### v4.3.0

* Support Taiko mainnet.

### v4.2.0

* Imporve widget size.

### v4.1.2

* Update discord url.

### v4.1.1

* Add `connectorsDisplayFilter` in `WidgetInternalConfig` to customize connectors display.

### v4.1.0

* Replace `@xyfinance/widget` 4.x tag from `next` to `latest`.

### v4.0.10

* Fix user cannot infer `Config`, `Theme`, `InternalConfig` type from `@xyfinance/core` issue.
* Rename `widgetConfig` to `swapWidgetConfig`.
* Decouple `WidgetConfig`, `WidgetTheme` type from `@xyfinance/core`.

### v4.0.9

* Fix `useQuoteErrorMessageDisplay` wording in error\_code `30001` and `30006`.

### v4.0.8

* Fix `provider not found` issue when try to connect via Metamask.

### v4.0.7

* Prevent `getRawToken` return value `symbol` & `decimals` from `undefined`.

### v4.0.6

* Hotfix USDT on Ethereum is not ERC20 compatible.

### v4.0.5

* Refine nodePolyfill in vite.config.ts.

### v4.0.4

* Fix `useConfig` must be used within `WagmiProvider` issue.

### v4.0.3

* Upgrade vite to v5.

### v4.0.2

* Downgrade WalletConnect v3 to WalletConnect v2.

### v4.0.1

* Rename widget export variables, such as `XSwapWidget` to `Widget`.
* Add "exports" options in `package.json` to explicitly tell user how to import (only for node.js > 14).

### v4.0.0 #Major Change

* Release `@xyfinance/widget` v4 with `next` tag.
* Migrate from Wagmi v1 to Wagmi v2

### v3.16.5

* UI wording update

### v3.16.4

* Fix native token balance image display error.
* Fix errorMessage display padding.

### v3.16.3

* Refine `xy-router` API `/quote` and `/build_tx` error message display.
* Refine `RouterBuilxTxProvider` to `@xyfinance/react` make it reusable.

### v3.16.2

* Fix unknown bridge & Replace imtoken logo

### v3.16.1

* Fix widget configs

### v3.16.0

* Remove Chakra UI

### v3.15.1

* Add X Layer to EIP-1559 Unsupported list.

### v3.15.0

* Support new chain x Layer

### v3.14.6

* &#x20;Add Browser Wallet (EIP-1193 compatible).

### v3.14.5

* Remove prelaunch in `@xyfinance/widget`

### v3.14.4

* Fix UI issues

### v3.14.3

* Hotfix: `/quote` & `/build_tx` slippage no decimal issue.

### v3.14.2

* Set 1rpc RPC node to last because they don't support some EVM method will lead `GET_TOKENS_BALANCE_ERROR` errors.

### v3.14.1

* Replace token.symbol to token.name
* Replace getTokenByChainIdAndAddress by getTokenByChainIdAndAddressKey method.

### v3.14.0

* Refactor: decouple @xyfinance/core and @xyfinance/react.

### v3.13.5

* Replace `token.symbol` to `token.name` .

### v3.13.4

* Fix: should use token name to desplay

### v3.13.3

* Migrate token list API.

### v3.13.2

* Update avax/cronos/zkEVM explorer link

### v3.13.1

* Fix custom token error by replace `Promise.allSettled`.

### v3.13.0

* Support Blast.

### v3.12.3

* Add binance wallet connector

### v3.12.2

* Add a component to handle component runtime error.
* Fix `src_quote_token_amount` runtime error.

### v3.12.1

* Fix dependencies

### v3.12.0

* &#x20;Add double confirm step for the widget

### v3.11.5

* Hide Min. Received column
  * update slippage setting wording

### v3.11.4

* Support commissionRate config.

### v3.11.3

* Add zod as validator library.

### v3.11.2

* Fix cannot select 2 custom token at once issue

### v3.11.1

* Upgrade @web3modal/wagmi to fix `useWeb3Modal` hook issue.

### v3.11.0

* Hot fix ledge conpromised issue.

### v3.10.8

* Updage kcc mainnet explorer url
* Refine NOT\_SUPPORT\_EIP\_1559\_CHAIN\_LIST

### v3.10.7

* Remove MaxUInt256 approve amount.

### v3.10.6

* Fix gradient button disabled text color.

### v3.10.5

* Fix internal packages dependency issue.

### v3.10.4

* @xyfinance/react\@0.0.10

### v3.10.3

* Remove widget internal config `iframeUrl` default value.

### v3.10.2

* Add internalConfig prop in `@xyfinance/widget` ( This is for internal usage, please don't write this in [https://docs.xy.finance](https://docs.xy.finance/) ).
* Add x.com logo and refine favicon image.
* Updated dependencies

### v3.10.1

* Update WalletConnect project id.

### v3.10.0

* Upgrade wagmi to 1.4.8 to fix WalletConnect and web3modal/v3 issue.

### v3.9.6

* Refactor default widget config and theme.

### v3.9.5

* Remove `fetchingUserTokenMap` state for preventing duplicate re-render.

### v3.9.4

* Make sure send swap transaction chainId must match with the chainId of the `build_tx`.

### v3.9.3

* cde5925: Refine `getErrorMessageDisplayFromErrorCode` from `ViemHelper` to `DisplayHelper`.

### v3.9.2

* Add CircleUSDCMap and hoisting USDC by Circle in token list.

### v3.9.1

* Fix swap switch button don't switch `fromToken` input and `toToken` number.

### v3.9.0

* Upgrade `wagmi`, `next`, `codemirror` dependencies.
* Upgrade `react` from `18.0.0` to `18.2.0` in `@xyfinance/widget`.

### v3.8.1

* Refine fetching custom token list from `queryClient.setQueryData` in `useCustomToken` hook.
* Add `debounceInput` from `input` in `useSearchToken` hook for peventing too many requests.
* Refine `scrollbar` rounded from `1.25rem` to `8px`.

### v3.8.0

* Refactor storing `selectedChainId` from state to URL in select token page
* Refine all tokens order in select-token page
* Support `All` tokens in `SelectTokenPage` in `@xyfinance/widget`.

### v3.7.4

* Refactor token sorting logic.

### v3.7.3

* Refine `/quote` fetching `<Button>` display order.
* Fix native token reminder token name display error in `@xyfinance/widget`.

### 3.7.2

* Refactor Approving mechanism to `useERC20TokenApprove` from `AllowanceProvider` ( not use context anymore ).
* Refactor Approving mechanism from interval to "watch blockNumber update".
* Upgrade `@tanstack/react-query` to `5.4.3`.
* Upgrade `wagmi` to `1.4.5`.
* Add default bridge and dex aggregator name.

### v3.7.1

* Fix Wallet UI issue.
* Show different avatar depends on verified status.
* Add `tailwind-scrollbar` library.
* Add Native token balance to nav dropdown.
* Upgrade `vite-plugin-svgr` to `4.1.0`.
* Upgrade `vite` to `4.5.0`.

### v3.7.0

* Support `Scroll` chain.

### v3.6.3

* Refactor `@/lib/helpers.ts` to `ViemHelper` in `@xyfinance/core`.
* Refactor `@/lib/helpers.ts` to `NestViemHelper` in `@xyfinance/app`.
* Refactor `@/lib/helpers.ts` to `ViteViemHelper` in `@xyfinance/widget`.
* Add History, Watcher functionality to `@xyfinance/app`.
* Remove `Skeleton` from `@xyfinance/app`. ( import it from `@xyfinance/ui`)

### v3.6.2

* Captue `receiver` in `@xyfinance/widget` for future use.
* Refine FE Server POST API from `/history/swap-transactions` to `/swap-transactions`.
* Refine Swap `RouteList` component key.

### v3.6.1

* Refine receiptStatus type from `1` || `0` to `1` || `0` || `success` || `reverted`.

### v3.6.0

* Add `ClientSideEVMServer`, this is a virtual server in frontend. It will be used to get balances from different chains.
* Add RPC fallback list in `viem` config.
* Rename `WatcherProvider` to `PollingProvider` in case of misunderstanding with `Wacher` in Frontend Server.
* Refine some UI display in `@xyfinance/app`.

### v3.5.0

* Support Mantle Network.
* Add input/output token price unknown display after quote.

### v3.4.3

* Fixed Coinbase Wallet cannot do `wallet_addEthereumChain` method issue.
* Fixed Trust Wallet cannot work in mobile app web view issue.

### v3.4.2

* Add chains to `CoinbaseWalletConnector`.

### v3.4.1

* Support Coinbase, OKX, Trust, imToken, Bitget, Halo, Brave Wallet.
* Refactor `createWagmiConifg` to `createAppWagmiConfig` and `createNPMWagmiConfig`.

### v3.4.0

* Fix double Wagmi WalletConnect QRcode Modal cannot open issue.

  > By initing WalletConnect from Wagmi to Web3Modal as React component.

### v3.3.0

* Support Base network.
* Error code refine.

### v3.2.0

* Fix double wagmi issue. When projects use wagmi as their dApp connection system, they will have to make an extra wagmiConfig instance for our widget.
* Update wagmi store prefix from default to `xy`.

### v3.1.0

* Support Linea chain.
* Adjust order of networks in token-selection page.
* Add version tracking.

### v3.0.2

* Update devDependencies.

### v3.0.1

* Updated dependencies

### v3.0.0 #Major Changes

* Refactor API from `xy api` to `xy router api`.

### v2.2.1

* Rename zkSync to zkSyncEra.
* Native token not enough hint.
* Skeleton UI improvements.
* Updated dependencies

### v2.2.0

* Support Polygon zkEVM chain.
* Disable zkSync supporting token hint.

### v2.1.0

* Extract widget-testground to [testground repository](https://github.com/XY-Finance/testground).
* Add custom widget theme functionality.
* Refactor widget-playground with codermirror.

### v2.0.0 #Major Changes

* Upgrade CSS engine from TailwindCSS to Chakra UI (CSS-in-JS).
* Increase quote interval from 15 seconds to 60 seconds.
* Change zkSync explorer URL.

### v1.2.0

* Fix native token not getting balance bug.

### v1.1.1

* Add LIMIT\_SUPPORT\_TOKENS\_NETWORK\_LIST to env in production.

### v1.1.0

* Support zkSync chain.
* Upgrade TypeScript version to 5.

### v1.0.5

* Refine `roundToMaxDecimal` in **@xyfinance/core**
* Add fallback token logic
* Re-add search token and refine it

### v1.0.4&#x20;

* Remove redundant RPC request

### v1.0.3

* **Added RPC Error UI** to provide more information and guidance to users when they encounter errors during transactions.
* Fixed the issue of failed transactions being stuck in an **infinite processing** loop in the UI.
* Resolved the problem of **wallet involuntarily disconnects**, providing a smoother user experience.
* Added a `disableTokenSelection` feature that allows you to limit the tokens available for swapping, useful for customizing the user experience.
* Added an `enableReport` feature, which captures error messages and sends them to our server for analysis to help us improve the overall quality and stability of the platform.

### v1.0.2

* Updated dependencies


# Custom-Built Link

Builds an all-inclusive link that automatically has the amount, slippage, route, and so on all set and helps your users save time and effort.

The XY Finance front-end technologies support URL query parameters to allow for the possibility of custom-designed links on XY Finance. Users will be able to take full advantage of this link to simplify the process of bridging tokens and save lots of time spent on prior arrangements for a bridging activity.\
\
This design is thoughtful in this seemingly complicated crypto trading world in that all you need to do is redefine the set of parameters attached to the end of a URL, which are extensions used to help define specific content or actions based on the data being passed.&#x20;

Appending query parameters to the end of the link that defaults to the standard style (trading pairs, the amount, etc.) each time you open it is, though not the first-of-its-kind in this sector, the necessity that helps your project/platform pre-determine the bridge and the swapping route for users and allows you to get the most our of token swaps with XY Finance

### Usage Example

Take a swap from <mark style="color:blue;">**USDC on Ethereum**</mark> to <mark style="color:green;">**USDC on Polygon**</mark><mark style="color:green;">.</mark>

Click the link below and view carefully the URL on the top of the webpage.

{% embed url="<https://app.xy.finance/?amount=1000&fromTokenAddress=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&sourceChainId=1&targetChainId=137&toTokenAddress=0x2791bca1f2de4661ed88a30c99a7a9449aa84174>" %}

The token on the source/target chain, slippage tolerance rate, the routes picked out for the best user experience, everything is all set within this custom-made link. Most importantly, it saves your users from human errors which could stem from operating the system manually by themselves.

### Query Parameters

| Parameter        | Description            | Example                                    |
| ---------------- | ---------------------- | ------------------------------------------ |
| sourceChainId    | Chain ID               | 1                                          |
| targetChainId    | Chain ID               | 137                                        |
| fromTokenAddress | Token Contract Address | 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 |
| toTokenAddress   | Token Contract Address | 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 |
| amount           | Float Value            | 50.5                                       |

* The bespoke link only works if at least a valid chain id exists.&#x20;
* If the address provided is empty or invalid, the default token will be the native token.

The "sourceChainId" and "targetChainId" in the configuration can be found in the page below.

{% content-ref url="/pages/FCnq6AObtaH5cMqaWYl9" %}
[Supported Blockchains/Bridges/DEXs](/supported-blockchains-bridges-dexs)
{% endcontent-ref %}


# Token Listing

Lists your token as the default token on XY Finance to gain more exposure.

![](/files/vK8bxazUvxCkR1noDBKV)

### **📣 To be listed, please give details for listing via** [**this form**](https://docs.google.com/forms/d/e/1FAIpQLSeJamZPxZm2oDyMGUFcEqlSHfy_WjIpuAYEqwu98rPg5xAedA/viewform)**, and we shall reach you as we finish the token evaluation.**&#x20;

Please have the following items ready to complete the form given above. Your coin's use case might require a bit of significant research by our staff to determine suitability, so please stay tuned!

1. Project Details
2. Token Details
3. Contact Information

{% hint style="info" %}
**No Fees Required**

XY Finance will NOT require any compliance fee for listing. As we mentioned earlier, the main purpose for the moment is to "nourish" both entities and share the user base.
{% endhint %}

### :warning: If your token has a tax, please check the details below.

### :dollar: **Trading Tax**

If the tax only applies during buying or selling, it will be covered by the slippage, so no additional action is required. For instructions on how to set the slippage on our website, please refer to our swap tutorial [here](https://blog.xy.finance/xswap-tutorial/).

{% hint style="info" %}
Tokens with trading tax will incur fees during both buying and selling. However, this won't cause any errors while swapping on our service as long as the slippage is set to an appropriate level.
{% endhint %}

### :dollar: **Transfer Tax**&#x20;

Tokens with transfer taxes are not supported. Please ensure your token does not impose any transfer taxes during transactions.


# yBridge API

The API supports generating Swap and Bridge quotes along with additional information. Some use cases that it caters to are for application front-ends integrating the cross-chain bridge.

#### **yBridge API** Endpoint&#x20;

<table><thead><tr><th width="149.33333333333331">Version</th><th width="209">Note</th><th>Endpoint</th></tr></thead><tbody><tr><td><strong>v1</strong></td><td>The latest version</td><td><a href="https://open-api.xy.finance/v1​"><code>https://open-api.xy.finance/v1​</code></a></td></tr><tr><td><strong>v0</strong></td><td>Deprecated</td><td> </td></tr></tbody></table>

{% hint style="info" %}
Original **XY API (Support Y Pool Only)** have been officially **renamed as yBridge API**
{% endhint %}


# Get Quote

Returns feasible routes and best quotations

This API returns the best quotes from yBridge

## Get the best quote for bridging tokens

<mark style="color:blue;">`GET`</mark> `endpoint/quote`

#### Query Parameters

| Name                                               | Type   | Description                           |
| -------------------------------------------------- | ------ | ------------------------------------- |
| srcChainId<mark style="color:red;">\*</mark>       | String | ID of source chain                    |
| fromTokenAddress<mark style="color:red;">\*</mark> | String | Token to be swapped from source chain |
| amount<mark style="color:red;">\*</mark>           | String | Amount of tokens to be swapped.       |
| destChainId<mark style="color:red;">\*</mark>      | String | ID of target chain                    |
| toTokenAddress<mark style="color:red;">\*</mark>   | String | Token to be received on target chain  |
|                                                    |        |                                       |

{% tabs %}
{% tab title="200: OK Swap amount not enough" %}

```javascript
{
    "isSuccess": false,
    "msg": "The minimum swap amount for this trading pair should be equivalent to {min_amount} {token_symbol}."
    "statusCode": "6",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}
```

{% endtab %}

{% tab title="200: OK Success" %}

```javascript
{
  "isSuccess": true,
  "msg": "Quotation success.",
  "statusCode": "0",
  "destChainId": "137",
  "fromTokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
  "toTokenAddress": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
  "fromTokenAmount": "1000000000",
  "toTokenAmount": "512870365878922641408",
  "fromTokenValue": 199.5,
  "toTokenValue": 199,
  "contractAddress": "0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1",
  "srcChainId": "1",
  "crossChainFee": null,
  "xyFee": {
    "amount": 0.9,
    "symbol": "USDT"
  },
  "quote": {
    "sourceChainSwaps": null,
    "crossChainSwap": {
      "dexNames": [
        "yBridge"
      ],
      "fromToken": {
        "tokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
        "chainId": "1",
        "symbol": "USDT",
        "decimals": 6
      },
      "toToken": {
        "tokenAddress": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
        "chainId": "137",
        "symbol": "USDT",
        "decimals": 6
      }
    },
    "destChainSwaps": {
      "dexNames": [
        "SushiSwap"
      ],
      "fromToken": {
        "tokenAddress": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
        "chainId": "137",
        "symbol": "USDT",
        "decimals": 6
      },
      "toToken": {
        "tokenAddress": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
        "chainId": "137",
        "symbol": "WMATIC",
        "decimals": 18
      }
    },
    "toTokenAmount": "512.8703658789226",
    "estimatedTransferTime": 270,
    "transactionCounts": 2
  }
}
```

{% endtab %}

{% tab title="200: OK No routes available" %}

```javascript
{
    "isSuccess": false,
    "msg": "Token unsupported or liquidity insufficient."
    "statusCode": "3",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}
```

{% endtab %}

{% tab title="200: OK Bridge liquidity not enough" %}

```javascript
{
    "isSuccess": false,
    "msg": "yBridge liquidity insufficient."
    "statusCode": "4",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}
```

{% endtab %}

{% tab title="200: OK Route engine temporary timeout" %}

```javascript
{
    "isSuccess": false,
    "msg": "Request for route-fetching has timed out. Please try again."
    "statusCode": "5",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}
```

{% endtab %}
{% endtabs %}

### Parameter/Response Details

* Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the address for the native token in your parameter.
* Note that the amount parameter should be padded with zeroes. For example, pass **100000000** instead of **100** if the decimal digits of the token are 6.

### Example Request

<pre class="language-shell"><code class="lang-shell"><strong>$ curl https://open-api.xy.finance/v1/quote?srcChainId=1&#x26;fromTokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&#x26;amount=500000000000000000&#x26;destChainId=56&#x26;toTokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
</strong></code></pre>

This request is asking a quote of **0.5 ETH** on **Ethereum** to **BNB** on **BSC**.

{% hint style="warning" %}
**`IMPORTANT:`**` ``Note that the amount parameter should be padded with zeroes. For example, pass`` `**`100000000`**` ``instead of`` `**`100`**` ``if the decimals of the token is 6.`
{% endhint %}


# Get Allowance

Returns the token spend allowed by an address on behalf of the crypto holder.

Before making use of yBridge, you must approve the contract first to proceed with the token spend. You could get the allowance and see whether you are willing to approve yBridge to execute swaps on your behalf via this API.

## Get the allowance of token

<mark style="color:blue;">`GET`</mark> `endpoint/approval`

#### Query Parameters

| Name                                           | Type   | Description             |
| ---------------------------------------------- | ------ | ----------------------- |
| chainId<mark style="color:red;">\*</mark>      | String | chain ID                |
| owner<mark style="color:red;">\*</mark>        | String | Address of token holder |
| spender<mark style="color:red;">\*</mark>      | String | Address of the spender  |
| tokenAddress<mark style="color:red;">\*</mark> | String | Token address           |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "isSuccess": true,
    "msg": '',
    "chainId": "1",
    "tokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "owner": "0x0000000000000000000000000000000000000000",
    "spender": "0x0000000000000000000000000000000000000000",
    "allowance": 0
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**`NOTE :`**` ``The spender should be the contractAddress in the response of` [`Get Quote`](https://app.gitbook.com/s/-Mcs9EhDrgbKHodtcAT6/~/changes/HTPvqHWDmiwzKo005mtN/xswap-api/v1/get-quote)`.`
{% endhint %}


# Build Approval Transaction

Returns the transaction data for the approval of token spend

This API returns the transaction data so you get to decide whether to approve yBridge to spend your tokens.

## Get the approve transaction

<mark style="color:blue;">`GET`</mark> `endpoint/approve`

#### Query Parameters

| Name                                           | Type   | Description                                                |
| ---------------------------------------------- | ------ | ---------------------------------------------------------- |
| chainId<mark style="color:red;">\*</mark>      | String | chain ID                                                   |
| spender<mark style="color:red;">\*</mark>      | String | Address of the spender                                     |
| tokenAddress<mark style="color:red;">\*</mark> | String | Token address                                              |
| amount                                         | String | Amount of tokens to be approved. If not given, approve max |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "isSuccess": true,
    "msg": "",
    "tokenAddress": "<tokenAddress>",
    "spender": "<spender>",
    "amount": "<amount>",
    "tx": {
        "to": "<tokenAddress>",
        "data": "<data>",
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**`NOTE :`**` ``The spender should be the contractAddress in the response of` [`Get Quote`](https://app.gitbook.com/s/-Mcs9EhDrgbKHodtcAT6/~/changes/HTPvqHWDmiwzKo005mtN/xswap-api/v1/get-quote)`.`
{% endhint %}

{% hint style="warning" %}
&#x200B;**`IMPORTANT :`**` ``Note that the amount parameter should be padded with zeroes. For example, pass`` `**`100000000`**` ``instead of`` `**`100`**` ``if the decimal digits of the token are 6.`
{% endhint %}


# Build Swap Transaction

Returns the swap data for bridging tokens

This API returns the details about the quote and the transaction that will trigger a single-chain or cross-chain swap request according to the quotation.

## Get the swap transaction from the quote

<mark style="color:blue;">`GET`</mark> `endpoint/swap`

Parameters

#### Query Parameters

| Name                                               | Type   | Description                                                                                                                                                                              |
| -------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| srcChainId<mark style="color:red;">\*</mark>       | String | ID of source chain                                                                                                                                                                       |
| fromTokenAddress<mark style="color:red;">\*</mark> | String | Token to be swapped from source chain                                                                                                                                                    |
| amount<mark style="color:red;">\*</mark>           | String | Amount of tokens to be swapped and please consider the decimal and pad with zeroes for the amount. For example, pass **100000000** instead of **100** if the token has 6 decimal digits. |
| destChainId<mark style="color:red;">\*</mark>      | String | ID of target chain                                                                                                                                                                       |
| toTokenAddress<mark style="color:red;">\*</mark>   | String | Token to be received on target chain                                                                                                                                                     |
| receiveAddress<mark style="color:red;">\*</mark>   | String | Receiver of the swapped token on target chain                                                                                                                                            |
| slippage                                           | String | Percentage of slippage tolerance ex: 1% you need to input 1 in the field                                                                                                                 |
| referrer                                           | String | Address of the referrer, this address will be used uniformly for any future partner incentive programs                                                                                   |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "isSuccess": true,
  "msg": "Swap success.",
  "statusCode": "0",
  "destChainId": "137",
  "fromTokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
  "toTokenAddress": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
  "fromTokenAmount": "1000000000",
  "toTokenAmount": "512870365878922641408",
  "fromTokenValue": 199.5,
  "toTokenValue": 198,
  "srcChainId": "1",
  "receiveAddress": "0x351B18b4f84CBCc700F4e30a15854745F400f08b",
  "minimumReceived": "46.5370365878922641408",
  "crossChainFee": {},
  "estimatedGas": 300000,
  "xyFee": {
    "amount": 1.2,
    "symbol": "USDT"
  },
  "quote": {
    "sourceChainSwaps": null,
    "crossChainSwap": {
      "dexNames": [
        "yBridge"
      ],
      "fromToken": {
        "tokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
        "chainId": "1",
        "symbol": "USDT",
        "decimals": 6
      },
      "toToken": {
        "tokenAddress": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
        "chainId": "137",
        "symbol": "USDT",
        "decimals": 6
      }
    },
    "destChainSwaps": {
      "dexNames": [
        "SushiSwap"
      ],
      "fromToken": {
        "tokenAddress": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
        "chainId": "137",
        "symbol": "USDT",
        "decimals": 6
      },
      "toToken": {
        "tokenAddress": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
        "chainId": "137",
        "symbol": "WMATIC",
        "decimals": 18
      }
    },
    "toTokenAmount": "512.8703658789226"
  },
  "tx": {
    "to": "0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1",
    "data": "0x3fc8ef10000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000351b18b4f84cbcc700f4e30a15854745f400f08b000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000890000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf127000000000000000000000000000000000000000000000001bcd81907695ce0000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
    "value": 0
  },
  "estimatedTransferTime": 270,
  "transactionCounts": 2
}
```

{% endtab %}

{% tab title="200: OK No routes available" %}

```javascript
{
    "isSuccess": false,
    "msg": "Token unsupported or liquidity insufficient."
    "statusCode": "3",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}
```

{% endtab %}

{% tab title="200: OK Bridge liquidity not enough" %}

```javascript
{
    "isSuccess": false,
    "msg": "yBridge liquidity insufficient."
    "statusCode": "4",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}
```

{% endtab %}

{% tab title="200: OK Swap amount not enough" %}

```javascript
{
    "isSuccess": false,
    "msg": "The minimum swap amount for this trading pair should be equivalent to {min_amount} {token_symbol}."
    "statusCode": "6",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}
```

{% endtab %}

{% tab title="200: OK Route engine temporary timeout" %}

```javascript
{
    "isSuccess": false,
    "msg": "Request for route-fetching has timed out. Please try again."
    "statusCode": "5",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}
```

{% endtab %}
{% endtabs %}

### Parameter/Response Details

* Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the address for the native token in your parameter.
* Note that the amount parameter should be padded with zeroes. For example, pass **100000000** instead of **100** if the decimal digits of the token are 6.
* Before submitting a transaction, please make sure that the chain you are on and the selected srcChainId are the same, to avoid sending the transaction to an unknown contract address&#x20;
* The destChainId must be one of the chains supported by yBridge. If your destChainId is not supported by yBridge, the funds may be temporarily locked in the system. you could use [Supported Blockchains](/single-bridge-integration/ybridge-api/supported-blockchains) to get latest list

### Example Request

```shell
$ curl https://open-api.xy.finance/v1/swap?srcChainId=1&fromTokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&amount=500000000000000000&destChainId=56&toTokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&slippage=1&referrer=0x8c6bDCb8c66fe5BFAa82510413665833FCFa08Ee&receiveAddress=0xbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef
```

This request is for a quote of **0.5 ETH** on **Ethereum** to **BNB** on BNB Chain, with a **1%** slippage and a referrer of **0x8c6bDCb8c66fe5BFAa82510413665833FCFa08Ee**. The asset on the target chain will be eventually sent to **0xbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef**.


# Get Cross-Chain Status

Returns the status of cross-chain transactions

You can look over the status of a cross-chain swap via this API.

## Get the status of a cross -chain transaction

<mark style="color:blue;">`GET`</mark> `endpoint/crossChainStatus`

#### Query Parameters

| Name                                              | Type   | Description                           |
| ------------------------------------------------- | ------ | ------------------------------------- |
| srcChainId<mark style="color:red;">\*</mark>      | String | ID of source chain                    |
| transactionHash<mark style="color:red;">\*</mark> | String | Transaction hash of source chain swap |

{% tabs %}
{% tab title="200: OK Done" %}

```javascript
{
  "isSuccess": true,
  "status": "Done",
  "msg": "Transaction has been completed.",
  "txHash": "<transaction hash of target chain swap>"
}
```

{% endtab %}

{% tab title="200: OK Processing" %}

```json
{
  "isSuccess": true,
  "status": "Processing",
  "msg": "Source chain transaction detected, destination chain transaction pending.",
  "txHash": null
}
```

{% endtab %}

{% tab title="200: OK Not found" %}

```json
{
  "isSuccess": false,
  "status": "Not found",
  "msg": "No transaction found in the system.",
  "txHash": null
}
```

{% endtab %}

{% tab title="200: OK Receive bridge token" %}

```json
{
  "isSuccess": true,
  "status": "Receive bridge token <symbol>",
  "msg": "Transaction reverted, bridge token received.",
  "txHash": "<transaction hash of target chain swap>"
}
```

{% endtab %}

{% tab title="200: OK Pending refund" %}

```json
{
  "success": true,
  "status": "Pending refund",
  "msg": "Transaction cannot be executed on destination chain, refund pending.",
  "txHash": null
}
```

{% endtab %}

{% tab title="200: OK Refunded" %}

```json
{
  "success": true,
  "status": "Refunded",
  "msg": "Transaction cannot be executed on destination chain, refunded.",
  "txHash": "<transaction hash of source chain refund>"
}
```

{% endtab %}
{% endtabs %}

There are six possible statuses: **Not found, Processing, Done, Receive bridge token, Pending refund, and Refunded.**

| Status                                                                                                                                                                                                                     | Msg                                                                       | Discription                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Not found**                                                                                                                                                                                                              | No transaction found in the system.                                       | No matching system record or source chain transaction detected.                                                                                                                                                       |
| **Processing**                                                                                                                                                                                                             | Source chain transaction detected, destination chain transaction pending. | System record exists; source transaction complete, destination pending.                                                                                                                                               |
| **Done**                                                                                                                                                                                                                   | Transaction has been completed.                                           | There is a system record, and the destination transaction has been completed.                                                                                                                                         |
| <p><strong>Receive bridge token (TOKEN\_NAME)</strong></p><p></p><p><strong>For example :</strong></p><ul><li>Receive bridge token (USDT)</li><li>Receive bridge token (USDC)</li><li>Receive bridge token (ETH)</li></ul> | Transaction reverted, bridge token received.                              | Due to price change over the slippage tolerance or other unforeseen issues, the transaction has been reverted on the destination chain and received bridge token instead.                                             |
| **Pending refund**                                                                                                                                                                                                         | Transaction cannot be executed on destination chain, refund pending.      | Transaction encountered an error and cannot be executed on the destination chain, we will refund the bridge token on the source chain. Once the refund transaction has been completed, it will be marked as Refunded. |
| **Refunded**                                                                                                                                                                                                               | Transaction failed on destination chain, refunded.                        | Refund completed, pool token sent to source chain sender's address.                                                                                                                                                   |


# Get Pool Liquidity

## Get Pool Liquidity

<mark style="color:blue;">`GET`</mark> `endpoint/liquidityPools`

#### Path Parameters

| Name                                      | Type   | Description                                     |
| ----------------------------------------- | ------ | ----------------------------------------------- |
| chainId<mark style="color:red;">\*</mark> |        | Chain ID of pools                               |
| symbol                                    | String | Symbol name of pool token (e.g., USDC/USDT/ETH) |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "isSuccess": true,
    "data": {
        "USDC": {
            "tokenAddress": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",
            "liquidityAmount": "97.72524912"
        }
    }
}
```

{% endtab %}
{% endtabs %}


# Get Fee Structure

## Get Fee Structure

<mark style="color:blue;">`GET`</mark> `endpoint/yBridgeConfigs`

#### Query Parameters

| Name       | Type   | Description          |
| ---------- | ------ | -------------------- |
| srcChainId | String | source chain ID      |
| dstChainId | String | destination chain ID |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "isSuccess": true,
  "msg": "",
  "config": {
    "1": {
      "56": {
        "USDC": {
          "bridge": {
            "minimumAmount": 0.7,
            "baseFee": 0.58,
            "protocolFee": {
              "minimum": 0.1,
              "maximum": 1000,
              "rate": 0.0005
            },
            "expiredAt": 1882312672
          },
          "bridgeWithDstSwap": {
            "minimumAmount": 0.3,
            "baseFee": 0.18,
            "protocolFee": {
              "minimum": 0.1,
              "maximum": 1000,
              "rate": 0.0005
            },
            "expiredAt": 1882312672
          }
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

```json
//quote response
{
  "isSuccess": true,
  "msg": "",
  "config": {
    "1": {  // source chain
      "56": {  // destination chain
        "USDC": {  // bridge & bridge token
          "bridge": {  
            "minimumSwapAmount": 0.7, // in bridge token
            "baseFee": 0.58, // in bridge token
            "protocolFee": {
              "minimum": 0.1, // in bridge token
              "maximum": 1000, // in bridge token
              "rate": 0.0005 
            },
            "expiredAt": 1882312672  // unix timestamp
          },
          "bridgeWithDstSwap": {  // in bridge token
            "minimumSwapAmount": 0.3, // in bridge token
            "baseFee": 0.18, // in bridge token
            "protocolFee": {
              "minimum": 0.1, // in bridge token
              "maximum": 1000, // in bridge token
              "rate": 0.0005 
            },
            "expiredAt": 1882312672  // unix timestamp
          }
        }
      }
      "10": {  // destination chain
        ...,
      }
      ...,
    }
    "56": {  // source chain
      ...,
    }
  }
}
```

{% hint style="info" %}
Discover more about how yBridge fees are calculated at [yBridge Fee Information](/fee-structure/ybridge-fee-information)
{% endhint %}

The "configs" object is organized in a hierarchical structure, where "1" represents the chain ID of the source chain. Underneath the source chain, there are multiple chain ID of destination chains, such as "10," "56," "137," and others. All fee-related configurations for each bridges are disclosed under each chain pair.

Within different bridges, there are two additional scenarios to consider. The first scenario is purely a bridge operation without any DEX swaps on the destination chain, indicated as "bridge" in the response. The second scenario involves DEX swaps on the destination chain and is represented as "bridgeWithDstSwap". Both of these situations contain detailed fee configuration information, and the fee calculation follows the formula below:&#x20;

$$
BridgeFee = BaseFee + ProtocolFee
$$

* `minimumSwapAmount`: Please ensure that your source bridge token amount is greater than this amount; otherwise, the response may result in an error.
* `baseFee`: Is charged to cover the gas costs incurred when our service transfers tokens to the user's receiving address.
* `protocolFee`: The protocolFee is calculated as **the product of the srcBridgeTokenAmount and rate**. This fee is then allocated to reward yBridge liquidity providers and XY DAO.
  * `minimum`: Will be charged when the product is **less** than the specified minimum.
    * For example: `minimum`: 0.5U, `srcBridgeTokenAmount`: 10 USDC, `rate` 0.0005&#x20;
    * The fee amount in this case would be 0.5U, since 10\*0.00050 = **0.005** is **less** than the `minimumFee`: 0.5U.
  * `maximum`: Will be charged when the product is **more** than the specified maximum.
    * For example: `maximum`: 1000U, `srcBridgeTokenAmount`: 2500000 USDC, `rate` 0.0005
    * The fee amount in this case would be 1000U, since 2500000\*0.00050 = **1250** is **more** than the `maximumFee`: 1000U.
  * `rate`: Represents the proportion of the transaction amount that is charged as a fee.
    * rate: 0.00050 = 0.050%
* `expiryAt`: Each pair has its own expiry time. The details in the object will **no longer be usable** once the expiry time has passed.

{% hint style="info" %}
Please confirm the expiration time before it's due. The **quickest** we update is **every 20 minutes,** but it can vary.
{% endhint %}

#### Example:

```json
{
  "1": {  // source chain
    "56": {  // destination chain
      "USDC": {
        "bridge": {
          "minimumSwapAmount": 0.7,
          "baseFee": 0.58,
          "protocolFee": {
            "minimum": 0.1,
            "maximum": 1000,
            "rate": 0.0005
          },
          "expiredAt": 123223241
        },
        "bridgeWithDstSwap": {
            ...
          },
          ...
        }
      }
    }
  }
}   
```

For instance, consider a user transferring 580 USDC from Ethereum (chainId: 1) to USDC on BNB (chainId: 56), using the USDC pool from yBridge. This transfer does not involve any DEX swap on the BNB Chain (the destination chain). According to the previous API response, the "srcBridgeTokenAmount" is more than 0.7U.

Fee details are as follows:

* Base fee: 0.58U
* Protocol fee: 580 \* 0.0005 = 0.29U
* Total fee: 0.58U + 0.29U = 0.87U

The final charge will be 0.87U, taken as pool tokens valued at 0.87 USD.


# Recommended Tokens

Allows any third party that capitalizes on our open APIs to access a list of tokens that we support via our endpoint

The crypto and dApps space used to be all about the Ethereum platform only a couple of years ago. While this monopoly is still fresh in our minds, things have drastically changed today thanks to the rise of blockchains such as Solana, Avalanche, and Polygon. They are now home to a thriving and scalable diversity of dApps and passionate communities.

But as the Ethereum ecosystem continues to evolve and expand, there's also continued exponential growth in the number of ERC20 tokens being issued. It is without doubt a good thing to witness the rate of token issuance accelerating, but meanwhile, traders seem to get more confused as to how to filter out legitimate, first-rate tokens from fakes, scams, or duplicates. The upshot is that both users and developers spend a lot of wasted effort and time processing the list, dealing with scams, and deciding which tokens are valid and high-quality. \
\
As we are very keen to extend ourselves and connect to more networks & tokens as many as possible to solve this problem, here we have an `endpoint/API` ready for your reference along with our thoughtful token analytics that returns a recommended token list. <br>

## Get recommended tokens supported by yBridge

<mark style="color:blue;">`GET`</mark> `endpoint/recommendedTokens`

#### Query Parameters

| Name    | Type   | Description |
| ------- | ------ | ----------- |
| chainId | String | ID of chain |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "isSuccess":true,
    "msg":"",
    "recommendedTokens":[
        {
            "address":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "symbol":"CRO",
            "name":"CRO",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/7310/small/oCw2s3GI_400x400.jpeg?1645172042"
        },
        {
            "address":"0x46cAe37a4C67Cba4642904cC46344B463c5A531D",
            "symbol":"$ROX$",
            "name":"$ROX$",
            "chainId":"25",
            "decimals":9,
            "logoURI":"https://storage.googleapis.com/xy-finance-images/token-list/%24ROX%24.PNG"
        },
        {
            "address":"0x47A9D630dc5b28F75d3AF3be3AAa982512Cd89Aa",
            "symbol":"ARGO",
            "name":"ARGO",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/25381/small/argo-protocol.jpeg?1651468819"
        },
        {
            "address":"0xe6801928061CDbE32AC5AD0634427E140EFd05F9",
            "symbol":"BIFI",
            "name":"BIFI",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/12704/small/token.png?1601876182"
        },
        {
            "address":"0x49ab7ca4D2Cf6777c8C56C5E9Edb7D1218AE1299",
            "symbol":"BURROW",
            "name":"BURROW",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/25492/small/BURROW.png?1652075351"
        },
        {
            "address":"0xaAd00d36Dbc8343C3505Ba51418a43D3622D2964",
            "symbol":"CLMRS",
            "name":"CLMRS",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://storage.googleapis.com/xy-finance-images/token-list/CLMRS.png"
        },
        {
            "address":"0x065DE42E28E42d90c2052a1B49e7f83806Af0e1F",
            "symbol":"CRK",
            "name":"CRK",
            "chainId":"25",
            "decimals":9,
            "logoURI":"https://assets.coingecko.com/coins/images/22667/small/Logo_200x200.png?1642403624"
        },
        {
            "address":"0x8174BaC1453c3AC7CaED909c20ceaDeb5E1CDA00",
            "symbol":"CRN",
            "name":"CRN",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/22548/small/Zy4D1gfB_400x400.jpg?1642051190"
        },
        {
            "address":"0xC4a174cCb5fb54a6721e11e0Ca961e42715023F9",
            "symbol":"CROGE",
            "name":"CROGE",
            "chainId":"25",
            "decimals":9,
            "logoURI":"https://assets.coingecko.com/coins/images/24903/small/transparent.png?1649335022"
        },
        {
            "address":"0xa0C3c184493f2Fae7d2f2Bd83F195a1c300FA353",
            "symbol":"CROISSANT",
            "name":"CROISSANT",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/22751/small/croissant200x200.png?1642572059"
        },
        {
            "address":"0xadbd1231fb360047525BEdF962581F3eee7b49fe",
            "symbol":"CRONA",
            "name":"CRONA",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/21098/small/logox200.png?1638324977"
        },
        {
            "address":"0xDB2Bb0A1481FCF0df33720d80A660dD4d060B6c0",
            "symbol":"CRONEX",
            "name":"CRONEX",
            "chainId":"25",
            "decimals":9,
            "logoURI":"https://storage.googleapis.com/xy-finance-images/token-list/Cronex.png"
        },
        {
            "address":"0x10faae6A25354544081D1aa3438e66086218d851",
            "symbol":"CROSHI",
            "name":"CROSHI",
            "chainId":"25",
            "decimals":9,
            "logoURI":"https://storage.googleapis.com/xy-finance-images/token-list/CROSHI.png"
        },
        {
            "address":"0x4c76a10A658d71AdB6431765a0a3cA13B6e2D491",
            "symbol":"CROTAMA",
            "name":"CROTAMA",
            "chainId":"25",
            "decimals":2,
            "logoURI":"https://assets.coingecko.com/coins/images/24923/small/crotamalogo-200x200.png?1651745551"
        },
        {
            "address":"0xe243CCab9E66E6cF1215376980811ddf1eb7F689",
            "symbol":"CRX",
            "name":"CRX",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/21771/small/j9UTZnAh_400x400.jpg?1639996557"
        },
        {
            "address":"0xF2001B145b43032AAF5Ee2884e456CCd805F677D",
            "symbol":"DAI",
            "name":"DAI",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/9956/small/4943.png?1636636734"
        },
        {
            "address":"0x83b2AC8642aE46FC2823Bc959fFEB3c1742c48B5",
            "symbol":"DARK",
            "name":"DARK",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/22456/small/DARK_bgWhite.png?1641870873"
        },
        {
            "address":"0x6582C738660bf0701f05b04DcE3c4E5Fcfcda47a",
            "symbol":"DUSD",
            "name":"DUSD",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/24319/small/DUSD_Logo.png?1647355734"
        },
        {
            "address":"0x212331e1435A8df230715dB4C02B2a3A0abF8c61",
            "symbol":"MAD",
            "name":"MAD",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/24770/small/mmt_200x200.png?1648817945"
        },
        {
            "address":"0xB8Df27c687c6af9aFE845A2aFAD2D01e199f4878",
            "symbol":"METF",
            "name":"METF",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/24282/small/METF_Token-svg.png?1647221647"
        },
        {
            "address":"0x97749c9B61F878a880DfE312d2594AE07AEd7656",
            "symbol":"MMF",
            "name":"MMF",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/22273/small/g7GDg3bv_400x400.jpg?1641344286"
        },
        {
            "address":"0x50c0C5bda591bc7e89A342A3eD672FB59b3C46a7",
            "symbol":"MMO",
            "name":"MMO",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/22367/small/MMO.png?1641763762"
        },
        {
            "address":"0xf8b9facB7B4410F5703Eb29093302f2933D6E1Aa",
            "symbol":"MSHARE",
            "name":"MSHARE",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/24035/small/SVN_LOGO_%281%29.png?1646117686"
        },
        {
            "address":"0x95aEaF383E2e86A47c11CffdE1F7944eCB2C38C2",
            "symbol":"MUSD",
            "name":"MUSD",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/25480/small/musd.png?1652010034"
        },
        {
            "address":"0xE727240728C1a5f95437b8b50AFDd0EA4AE5F0c8",
            "symbol":"NESS",
            "name":"NESS",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/24247/small/ness.png?1647094614"
        },
        {
            "address":"0x57d06bB1e3B60C875cD3A4445a53217F9B44d390",
            "symbol":"PHNX",
            "name":"PHNX",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/24551/small/pf-200.png?1648134213"
        },
        {
            "address":"0x0804702a4E749d39A35FDe73d1DF0B1f1D6b8347",
            "symbol":"SINGLE",
            "name":"SINGLE",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/22616/small/single.png?1642313588"
        },
        {
            "address":"0x9D3BBb0e988D9Fb2d55d07Fe471Be2266AD9c81c",
            "symbol":"SKY",
            "name":"SKY",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/22517/small/logo-token-2.e9c15b63.png?1641968423"
        },
        {
            "address":"0x654bAc3eC77d6dB497892478f854cF6e8245DcA9",
            "symbol":"SVN",
            "name":"SVN",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/23692/small/SVN_LOGO.png?1645080153"
        },
        {
            "address":"0xDD73dEa10ABC2Bff99c60882EC5b2B81Bb1Dc5B2",
            "symbol":"TONIC",
            "name":"TONIC",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/21982/small/TONIC_logo.png?1640575290"
        },
        {
            "address":"0xc21223249CA28397B4B6541dfFaEcC539BfF0c59",
            "symbol":"USDC",
            "name":"USDC",
            "chainId":"25",
            "decimals":6,
            "logoURI":"https://assets.coingecko.com/coins/images/6319/small/USD_Coin_icon.png?1547042389"
        },
        {
            "address":"0x66e428c3f67a68878562e79A0234c1F83c208770",
            "symbol":"USDT",
            "name":"USDT",
            "chainId":"25",
            "decimals":6,
            "logoURI":"https://assets.coingecko.com/coins/images/325/small/Tether-logo.png?1598003707"
        },
        {
            "address":"0x00D7699b71290094CcB1a5884cD835bD65a78c17",
            "symbol":"VERSA",
            "name":"VERSA",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/25491/small/versa_token_96_96.png?1652074785"
        },
        {
            "address":"0x2D03bECE6747ADC00E1a131BBA1469C15fD11e03",
            "symbol":"VVS",
            "name":"VVS",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/20210/small/8glAYOTM_400x400.jpg?1636667919"
        },
        {
            "address":"0x062E66477Faf219F25D27dCED647BF57C3107d52",
            "symbol":"WBTC",
            "name":"WBTC",
            "chainId":"25",
            "decimals":8,
            "logoURI":"https://assets.coingecko.com/coins/images/7598/small/wrapped_bitcoin_wbtc.png?1548822744"
        },
        {
            "address":"0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23",
            "symbol":"WCRO",
            "name":"WCRO",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/7310/small/oCw2s3GI_400x400.jpeg?1645172042"
        },
        {
            "address":"0xe44Fd7fCb2b1581822D0c862B68222998a0c299a",
            "symbol":"WETH",
            "name":"WETH",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://assets.coingecko.com/coins/images/2518/small/weth.png?1628852295"
        },
        {
            "address":"0xeBAceB7F193955b946cC5dd8f8724a80671a1F2F",
            "symbol":"bCRO",
            "name":"bCRO",
            "chainId":"25",
            "decimals":18,
            "logoURI":"https://storage.googleapis.com/xy-finance-images/token-list/bcro.png"
        }
    ]
}
```

{% endtab %}
{% endtabs %}


# Supported Blockchains

Lists a good selection of  blockchains that are currently supported by yBridge

You can access the chains which you desire to support via this API.

## Get the supported chains of yBridge

<mark style="color:blue;">`GET`</mark> `endpoint/supportedChains`

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "isSuccess": true,
  "chainIds": [
    "250",
    "137",
    "56",
    "1"
    ...
  ]
}
```

{% endtab %}
{% endtabs %}


# Error Message

| input chain id unsupported         | "Invalid chain id"                                                                                     | “10” |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------ | ---- |
| other input args invalidated       | "Invalid input argument"                                                                               | “10” |
| no route                           | "Token unsupported or liquidity insufficient."                                                         | “3”  |
| route engine timeout               | "Request for route-fetching has timed out. Please try again."                                          | “5”  |
| yBridge liquidity not enough       | "yBirdge liquidity insufficient."                                                                      | “4”  |
| input amount not enough            | "The minimum swap amount for this trading pair should be equivalent to {min\_amount} {token\_symbol}." | “6”  |
| Network temporarily not supported. | "The network chain id {chain id} has been paused, please follow our update."                           | "7"  |
| unknown error                      | “API error"                                                                                            | “99” |
| quote api success                  | "Quotation success."                                                                                   | “0”  |
| swap api success                   | "Swap success."                                                                                        | “0”  |


# Change Log

Keeps you updated with the most recent slight changes to our API at regular intervals

### \[2023-11-22]

**Descriptions**

* Original **XY API (Support Y Pool Only)** have been officially **renamed as yBridge API**
* Update Fee API [Get Fee Structure](/single-bridge-integration/ybridge-api/get-fee-structure) (<https://open-api.xy.finance/v1/yBridgeConfigs>)
  * Keep the previous version here [Broken mention](broken://pages/wKhwXeV4UPM8kAXRZV4w)(<https://open-api.xy.finance/v1//xyBridgeConfigs>)

### \[2023-09-28]

#### Features

* New API: [Get Fee Structure](/single-bridge-integration/ybridge-api/get-fee-structure)&#x20;
* New API: [Get Pool Liquidity](/single-bridge-integration/ybridge-api/get-pool-liquidity)

### \[2023-10-04]

#### Features

* New API: [Supported Blockchains](/single-bridge-integration/ybridge-api/supported-blockchains)

### \[2023-09-28]

#### Features

* New API: [Get Fee Structure](/single-bridge-integration/ybridge-api/get-fee-structure)&#x20;
* New API: [Get Pool Liquidity](/single-bridge-integration/ybridge-api/get-pool-liquidity)

### \[2022-08-10]

#### Features

* New API: [**Recommended Tokens**](/single-bridge-integration/ybridge-api/recommended-tokens)

### \[2022-06-01]

#### Features

* [**Build Swap Transaction**](/single-bridge-integration/ybridge-api/build-swap-transaction) supports custom slippage.

**Formulae**

* **Y Pool routes:**\
  The minimum of `toTokenAmount` is "<mark style="color:blue;">quote \* (1 - slippage)</mark>".
* **Multi-chain routes:**\
  The minimum `toTokenAmount` is calculated as "<mark style="color:blue;">(fromTokenAmount - slippage) - XY fee - (toTokenAmount - slippage)</mark>".

**Descriptions**

* After getting a quote (1 ETH of Ethereum to 6 BNB of BSC for instance) with the slippage tolerance at 1%, the minimum of `toTokenAmount` is 6 \* 99% = 5.94 BNB.
* As the X Swap detects the minimum of `toTokenAmount` is less than `quote*(1-slippage)`, in this case, 5.94 BNB as calculated above, the transaction itself will be revoked and then the *bridge token* will be returned to user.


# yBridge Contract Integration

Original bridge service will be upgraded to v3 and officially renamed as yBridge from November 22, 2023.

* The original **XSwapper** Contract will be renamed to **YBridge**
* The original **YPoolVault** Contract will be renamed to **YBridgeVault**.

In v3, in addition to the original bridge and swap functionalities, we have further enhanced security and upgraded the fee mechanism to a real-time dynamic fee structure. If you want to understand our new real-time fee structure, you can refer to [yBridge Fee Information](/fee-structure/ybridge-fee-information)

### If you want to integrate yBridge v3 through contracts

Please refer to the following docs&#x20;

* [Integrate YBridge Contract](/single-bridge-integration/ybridge-contract-integration/integrate-ybridge-contract) : You could learn how to send the bridge transaction and how to check the status of your transaction on the source chain and destination chain.
* [Integrate YBridgeVault Contract](/single-bridge-integration/ybridge-contract-integration/integrate-ybridgevault-contract) : You could learn how to deposit or withdraw into/from the liquidity vault.

### If you have integrated yBridge v3 before 2024/07/17, please check our latest upgrade notice

We have implemented a new upgrade, we compatible with the previous interface, so the original function and interface will not be affected. However we strongly urge the partners to review the  [Latest Upgrade ( 2024/07/17 )](/single-bridge-integration/ybridge-contract-integration/integrate-ybridge-contract/latest-upgrade-2024-07-17) to transition to new interface to gain full support for the latest aggregated DEXes and Bridges

### If you have previously integrated v2 contracts and want to migrate to v3

Please refer to this documentation to understand the migration of the [bridge contract ](/single-bridge-integration/ybridge-contract-integration/integrate-ybridge-contract/migrate-from-v2-to-v3)or [vault contract](/single-bridge-integration/ybridge-contract-integration/integrate-ybridgevault-contract/migrate-from-v2-to-v3)

### If you still need access to v2 documentation

You could still refer the following docs, but the current contract has been upgraded to v3 since November 22, 2023.

* [(Legacy) Integrate X Swap Contract](/single-bridge-integration/ybridge-contract-integration/smart-contract): It corresponds to the current YBridge
* [(Legacy) Integrate Y Pool Contract](/single-bridge-integration/ybridge-contract-integration/legacy-integrate-y-pool-contract): It corresponds to the current YBridgeVault


# Integrate YBridge Contract

XY Finance deploys smart contracts on most mainstream chains and benefits all types of users in terms of secure cross-chain swaps.

## Integration Notice

Before starting the integration, please note the following points for your input parameters:

* The dstChainId must be one of the chains supported by yBridge. If your dstChainId is not supported by yBridge, the funds may be temporarily locked in the system. you could use [Supported Blockchains](/single-bridge-integration/ybridge-api/supported-blockchains) to get latest list
* Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the address for the native token in your parameter.

## yBridge

## State-Changing Functions

Here are two state-changing functions provided by our YBridge Contract:

* **swapWithReferrer**: The function itself offers a service that combines bridge and destination chain swap. However, please note that the destination chain swap is intended for internal use. Nevertheless, **you can perform a bridge request through this function. For more details, you can refer to the** [(Legacy) Bridge Example](/single-bridge-integration/ybridge-contract-integration/smart-contract/legacy-bridge-example)
* **singleChainSwapWithReferrer**: This function is also intended for internal use. If you require a same chain swap function, you may consider using services such as 1inch or OpenOcean.

### swapWithReferrer

```solidity
function swapWithReferrer(
    address aggregatorAdaptor,
    IDexAggregatorAdaptor.SwapDescription memory swapDesc,
    bytes memory aggregatorData,
    PreviousDstChainDescription calldata dstChainDesc, ## Renamed after 2024/7/17
    address referrer
) 
```

Initiate a cross-chain request and execute desired source chain side swap and leave a record of the referrer. Please contact us for more information about referral program.

The `swapDesc` contains the information of the source chain side swap.

```solidity
struct SwapDescription {
    IERC20 srcToken;
    IERC20 dstToken;
    address receiver;
    uint256 amount;
    uint256 minReturnAmount;
}
```

The `dstChainDesc` would be emitted in event to record destination chain swap path and slippage. Note that the slippage would be seen as BP (1223 slippage equals to 12.23%).&#x20;

```solidity
struct PreviousDstChainDescription ## Renamed after 2024/7/17 {
    uint32 dstChainId;
    IERC20 dstChainToken;
    address dstAggregatorAdaptor;
    uint256 expectedDstChainTokenAmount;
    uint32 slippage;// denominator = 10**4
}
```

The `aggregatorAdaptor` is to adapt to the DEX aggregator involved in the `aggregatorData`.

The `aggregatorData` is generated by server containing source chain part of best routing path.&#x20;

If you simply want to bridge, please follow the guidelines below to fill in the parameters for `aggregatorAdaptor` and `aggregatorData`

* `aggregatorAdaptor` should be `0x0000000000000000000000000000000000000000`
* `aggregatorData` should be `0x`

### singleChainSwapWithReferrer

```solidity
function singleChainSwapWithReferrer(
    address aggregator,
    IDexAggregatorAdaptor.SwapDescription memory swapDesc,
    bytes memory aggregatorData,
    address referrer
)
```

Execute a same-chain swap and leave a record of the referrer. Please contact us for more information about referral program.

The `aggregator` is the DEX aggregator involved in the `aggregatorData`.

The `swapDesc` contains the information of the swap.

```solidity
struct SwapDescription {
    IERC20 fromToken;
    IERC20 toToken;
    address receiver;
    uint256 amount;
    uint256 minReturnAmount;
}
```

The `aggregatorData` is generated by server containing source chain part of best routing path.&#x20;

## View Functions

### getEverClosed

```solidity
function getEverClosed(uint32 _srcChainId, uint256 _srcChainSwapId) returns (bool)
```

Check whether a swap request is closed (processed) on destination chain by the swap ID on the source chain and the source chain ID.

### getTokenBalance

```solidity
function getTokenBalance(IERC20 _token, address _account) returns (uint256)
```

Get balance of an account of a token.

## Events

### System Setting Related Events

#### StartSwapIdSet

```solidity
event StartSwapIdSet(uint256 _swapId);
```

This event will be emitted when the starting swap ID is set.

#### YBridgeVaultSet

```solidity
event YBridgeVaultSet(address _supportedToken, address _vault, bool _isSet);
```

This event will be emitted when a yBridge Vault (liquidity pool) is set.

#### AggregatorAdaptorSet

```solidity
event AggregatorAdaptorSet(address _aggregator, bool _isSet);
```

This event will be emitted when an aggregator adaptor is set.

#### AggregatorSet

```solidity
event AggregatorSet(address _aggregator, bool _isSet);
```

This event will be emitted when an aggregator is set.

#### AcceptSwapRequestSet

```solidity
event AcceptSwapRequestSet(bool _isSet);
```

This event will be emitted when the acceptSwapRequest is set. If true, yBridge accepts swap request.

***

### User Related Events

#### SwapRequested

```solidity
struct DstChainDescription {
    uint32 dstChainId;
    IERC20 dstChainToken;
    address dstAggregatorAdaptor;
    uint256 expectedDstChainTokenAmount;
    uint32 slippage; // denominator = 10**4
}
event SwapRequested(uint256 _swapId, address indexed _aggregatorAdaptor, DstChainDescription _dstChainDesc, IERC20 _srcToken, IERC20 indexed _vaultToken, uint256 _vaultTokenAmount, address _receiver, uint256 _srcTokenAmount, uint256 _expressFeeAmount, address indexed _referrer);
```

This event will be emitted whenever a cross-chain swap request is initiated.

#### AggregatorSwapped

```solidity
event AggregatorSwapped(address indexed aggregator, address sender, IERC20 srcToken, IERC20 dstToken, address receiver, uint256 srcTokenAmount, uint256 dstTokenAmount, address indexed referrer);
```

This event will be emitted whenever a same-chain swap is completed.

#### CloseSwapCompleted

```solidity
event CloseSwapCompleted(CloseSwapResult _swapResult, uint32 _srcChainId, uint256 _srcChainSwapId);
```

This event will be emitted by the time all a cross-chain swap request is processed at the destination chain so as to keep a record of the request. &#x20;

#### SwappedForUser

```solidity
event SwappedForUser(address indexed _aggregatorAdaptor, IERC20 indexed _srcToken, uint256 _srcTokenAmount, IERC20 _dstToken, uint256 _dstTokenAmountOut, address _receiver);
```

This event will be emitted also by the time all a cross-chain swap request is processed at the destination chain. However, this event records more information of the swap details than the `CloseSwapCompleted` event.

#### SwapRefunded

```solidity
event SwapRefunded(uint256 _swapId, address _receiver, address _gasFeeReceiver, address _vaultToken, uint256 _refundAmount, uint256 _refundGasFee);
```

This event will be emitted when a request is refunded on the source chain.


# Bridge Example

This is a simple bridge request (without invoking swap on the source chain) example

## Integration Notice

* The dstChainId must be one of the chains supported by yBridge. If your dstChainId is not supported by yBridge, the funds may be temporarily locked in the system. you could use [Supported Blockchains](/single-bridge-integration/ybridge-api/supported-blockchains) to get latest list
* Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the address for the native token in your parameter.
* Please note that directly interacting with the smart contract means your bridge request may not be completed on the destination chain since you are initiating a request regardless of the liquidity on the other side. If unfortunately you found your transaction hasn't been processed for more than 30 minutes, please contact us via telegram or discord!

  See more detail of [available liquidity](/single-bridge-integration/ybridge-contract-integration/integrate-ybridgevault-contract/maximum-available-liquidity)

## Start from the Source Chain

In this example, we are going to bridge **100 USDT** from **Ethereum** to **Polygon**.

The function we're going interact with is the `swapWithReferrer` of the `YBridge` on **Ethereum**.

From [Integrate YBridge Contract](/single-bridge-integration/ybridge-contract-integration/integrate-ybridge-contract), we can find the interface of `swapWithReferrer`:

```solidity
function swapWithReferrer(
    address aggregatorAdaptor,
    IDexAggregatorAdaptor.SwapDescription memory swapDesc,
    bytes memory aggregatorData,
    DstChainDescription calldata dstChainDesc
)
```

There are four parameters we need to prepare:\
\- **`aggregatorAdaptor`**\
\- **`swapDesc`**\
\- **`aggregatorData`**\
\- **`dstChainDesc`**

### aggregatorAdaptor

Since we're just bridging **`USDT`**, no swap actions would be involved. That is, we don't need aggregator and so is its adaptor `aggregatorAdaptor`. In this kind of situation, **`aggregatorAdaptor`** should be `0x0000000000000000000000000000000000000000`

### aggregatorData

Normally, we put the data that is going to be executed by the aggregator to this field. However in this case we're not going to swap tokens,  so the **`aggregatorData`** we put is `0x`.

### swapDesc

```solidity
struct SwapDescription {
    IERC20 srcToken;
    IERC20 dstToken;
    address receiver;
    uint256 amount;
    uint256 minReturnAmount;
}
```

A `SwapDescription` describes the swap happening on the source chain. In this case, we don't need to swap **USDT** to something else so both the **`srcToken`** and **`dstToken`** should be the address of **USDT** on **Ethereum**, which is `0xdAC17F958D2ee523a2206206994597C13D831ec7`.

The **`receiver`** is the one who's going to receive the **USDT** on destination chain (**Polygon**).

The **`amount`** is the swap amount with padding zeroes. In this case it should be `100000000` since the decimals of **USDT** on **Ethereum** is `6`**.**

The **minReturnAmount** is used to make sure the return amount of the swap happening on the source chain. In this case we could just put the same amount as **`amount`**.

### &#x20;dstChainDesc

```solidity
struct DstChainDescription {
    uint32 dstChainId;
    IERC20 dstChainToken;
    uint256 expectedDstChainTokenAmount;
    uint32 slippage;
}
```

As for `DstChainDescription`,  it describes what should be achieved on the destination chain.

The **`dstChainId`** is the ID of the destination chain, `137` in this case.&#x20;

The **`dstChainToken`** represents the desired token on the destination chain, the **USDT** address on **Polygon** in this case, which is `0xc2132D05D31c914a87C6611C10748AEb04B58e8F`

The **`expectedDstChainTokenAmount`**  will be used for the swap on the destination chain. To keep it simple, we could put the same value as the amount of the **`swapDesc`**. In this case it would be `100000000` since the decimals of **Polygon** **USDT** is also `6`.\
However, please note that the amount you're going to received will be a bit less owing to the XY Fee.

The **`slippage`** will be used to calculate the minimum received amount from **`expectedDstChainTokenAmount`** and it's as well only used when a swap is happening on the destination chain. In this case, again, there's no swap involved therefore we put `0` in this field.

### To Sum up

The parameters we need to bridge **100 USDT** from **Ethereum** to **Polygon** would look like:

```solidity
swapWithReferrer(
    0x0000000000000000000000000000000000000000, // aggregatorAdaptor
    (0xdAC17F958D2ee523a2206206994597C13D831ec7, 0xdAC17F958D2ee523a2206206994597C13D831ec7, receiver, 100000000, 100000000), // swapDesc
    0x, // aggregatorData
    (137, 0xc2132D05D31c914a87C6611C10748AEb04B58e8F, 100000000, 0) // dstChainDesc
)
```

## Check on the Destination Chain

After sending a swap request from the source chain, we can get the **SwapRequested** event from logs. The `_swapId` in the event is the ID of the swap request. We can check whether a swap request is processed or not on the destination chain by invoking `getEverClosed(_srcChainId, _srcChainSwapId)`.

If you are looking for more details of the request such as the amount, you should monitor the **SwappedForUser** event emitted from the `YBridge` on the destination chain.

See more of events and functions of `YBridge` [here](/single-bridge-integration/ybridge-contract-integration/integrate-ybridge-contract).\
See addresses of `YBridge` across all chains [here](/smart-contract/addresses).


# Latest Upgrade ( 2024/07/17 )

There will be additional charge imposed by some DEX aggregators which provide swapping service. Therefore, the YBridgeV3 contract is upgraded to reflect such expense.

**New functions**

* `adaptorForAdditionalFeeBlacklist(address): bool`: Lookup DEX aggregator adaptors, which provide swapping service, that’s NOT allowed to be used by old version of function `swapWithReferrer(...)`
* `additionalFeeReceiver()`: For managing purpose
* `additionalFeeConfig(address): uint256`: Lookup the amount of native token it takes to utilize the DEX aggregator adaptor. If it returns `0`, a default value of `additionalFeeConfig(address(0))` will be charged

**Cross chain swap**

* **The old interface**, `swapWithReferrer(address,(address,address,address,uint256,uint256),bytes,(uint32,address,uint256,uint32),address): 2aac3cac`, **is kept**.
  1. **Fees** : It doesn’t apply additional fees as before but cannot go through blacklisted DEX aggregator adaptors (`adaptorForAdditionalFeeBlacklist(address): bool`).
  2. **Event** : Changed to `SwapRequested(uint256,address,(uint32,address,address,uint256,uint32),address,address,uint256,address,uint256,uint256,address): 0xb0e9a29a6096a927bd389ba0d0d1a15f82df21a331d23a33eeb7de1cf7ab2684` **from** `SwapRequested(uint256,address,(uint32,address,uint256,uint32),address,address,uint256,address,uint256,uint256,address):0x40218dc7047d6a284746d042d62140b3629db83daefcd944659e90b4c74b7eb0`
* **The new overloading interface**, `swapWithReferrer(address,(address,address,address,uint256,uint256),bytes,(uint32,address,address,uint256,uint32),address): cdc65927`, **is added.**
  1. Fees: It charges native token according to `additionalFeeConfig` for both source chain and destination chain swapping DEX aggregator adaptor used.
  2. Mechanism: Same as the old `swapWithReferrer`, but charges DEX aggregator adaptor fees according to `additionalFeeConfig`. With enough `msg.value` sent along with the transaction, **extra native token would be refunded back to the caller**.
  3. Event: The same event, `SwapRequested(uint256,address,(uint32,address,address,uint256,uint32),address,address,uint256,address,uint256,uint256,address): 0xb0e9a29a6096a927bd389ba0d0d1a15f82df21a331d23a33eeb7de1cf7ab2684`emitted as the other `swapWithReferrer`


# Migrate from V2 to V3

This document provides a detailed outline of the key changes between XSwapper (V2) and YBridge (V3) and guides you through the necessary steps to migrate your system

## Overview of Changes

The update from v2 to v3 introduces a couple of significant changes that will affect the way you interact with the system. Most notably, there have been changes in the naming convention of certain prefixes, a shift in how bridge fee settings are retrieved, and alterations to the semantics of certain event parameters.

### Parameter Naming Convention Changes

In YBridgeV3, the prefix convention has changed as follows:

* **From `from-` to `src-`**: All instances where the prefix `from-` was used are now replaced with `src-`. This change affects all contract codes.
* **From `to-` to `dst-`**: Similarly, `to-` has been replaced with `dst-`. As with `src-`, this applies to all contract codes.

### Bridge Fee Settings

The method for obtaining bridge fee settings in the contract has been moved:

* **From Blockchain to API**: In the previous version, the bridge fee settings could be retrieved directly from the blockchain. In YBridgeV3, however, these settings are no longer available on the blockchain and must be accessed via the API ( [Get Fee Structure](/single-bridge-integration/ybridge-api/get-fee-structure))since the fee setting is now managed by validators off-chain.

### Event Changes

* **event SwapRequested**

```solidity
event SwapRequested(uint256 _swapId, address indexed _aggregatorAdaptor, DstChainDescription _dstChainDesc, IERC20 _srcToken, IERC20 indexed _vaultToken, uint256 _vaultTokenAmount, address _receiver, uint256 _srcTokenAmount, uint256 _expressFeeAmount, address indexed _referrer);
```

Previously there were `_xyFee` and `_gasFee` in the place of `_srcTokenAmount` and `_expressFeeAmount.` The removal is because the fee calculation is now handled by validators off-chain.

As for the new added `_srcTokenAmount` is to log the original amount of the source token (not the bridge token).

The `_expressFeeAmount` logs the amount of express fee paid by user.

***

## Migration Steps

For developers who are interacting directly with the system's interfaces and events, the following updates are important to note:

### **Update Parameter Names to Follow New Conventions**

While the interface for initiating a swap request remains unchanged, you're suggested to update the parameter names to reflect the new prefix conventions:

* **Search** for any instances where `-from-` and `-to-` are used in the parameters of functions and events.
* **Replace** `from` with `src` and `to` with `dst` to align with the new naming convention.

  Here is an example of how to update your swap request parameters:

  ```diff
  struct SwapDescription {
  -   IERC20 fromToken;
  -   IERC20 toToken;
      address receiver;
      uint256 amount;
      uint256 minReturnAmount;
  }

  struct SwapDescription {
  +   IERC20 srcToken;
  +   IERC20 dstToken;
      address receiver;
      uint256 amount;
      uint256 minReturnAmount;
  }


  function swapWithReferrer(
      address aggregatorAdaptor,
      IDexAggregatorAdaptor.SwapDescription memory swapDesc,
      bytes memory aggregatorData,
  -   ToChainDescription calldata toChainDesc,
      address referrer
  )

  function swapWithReferrer(
      address aggregatorAdaptor,
      IDexAggregatorAdaptor.SwapDescription memory swapDesc,
      bytes memory aggregatorData,
  +   DstChainDescription calldata dstChainDesc,
      address referrer
  )
  ```

### **Monitor Swap Completion**

#### **On the Source Chain**

If you are currently monitoring a swap is successfully requested by listening to `event SwapRequested`, you should be careful that the bridge fee amount paid could no longer be retrieved in the event.

#### **On the Destination Chain**

If you are currently monitoring the completion of a swap request on the destination chain by polling `function getEverClosed`, no action is required. The method for checking whether a swap is closed remain the same in YBridgeV3:

If you are currently monitoring the completion of a swap request on the destination chain by listening to `event CloseSwapCompleted` or `event SwappedForUser`, you might need to update the parameter names as mentioned above.

### **Update Bridge Fee Retrieval Method**

* Identify any instances where bridge fee settings are being retrieved from the blockchain.
* Replace these instances with the appropriate API calls to fetch the bridge fee settings.

  Example:

  ```diff
  - // Old method: Retrieve bridge fees from blockchain
  - const bridgeFees = getBridgeFeesFromBlockchain();
  + // New method: Retrieve bridge fees from API
  + const bridgeFees = getBridgeFeesFromAPI();

  // The detail of bridge fee API can be found here:
  // *****URL GOES HERE*****
  ```


# Integrate YBridgeVault Contract

## YBridgeVaultV3

## State-Changing Functions

### deposit

```solidity
function deposit(uint256 vaultTokenAmount)
```

Initiate a deposit request.

The `vaultTokenAmount` is the desired pool token to be deposited. After deposit, the liquidity provider will receive `XYWrappedToken` (`xyUSDT`, `xyUSDC` or `xyETH)`, along with another transaction sent by YBridge worker.

### withdraw

```solidity
function withdraw(uint256 shareAmount)
```

Initiate a withdrawal request.

The `shareAmount` is the desired amount of `XYWrappedToken` to be redeemed to the underlying token.

Similar to `deposit`, you will receive the underlying vault token along with another transaction sent by YBridge worker.

## Public States

#### acceptDepositRequest

```solidity
bool public acceptDepositRequest;
```

We can tell whether a YBridgeVault accepts deposit request or not from this state.

#### acceptWithdrawRequest

```solidity
bool public acceptWithdrawRequest;
```

We can tell whether a YBridgeVault accepts withdraw request or not from this state.

#### isDepositCompleted

```solidity
mapping (uint256 => bool) public isDepositCompleted;
```

We can tell whether a deposit request is completed by giving the deposit request ID from this mapping.

#### isWithdrawCompleted

```solidity
mapping (uint256 => bool) public isWithdrawCompleted;
```

We can tell whether a withdrawal request is completed by giving the withdrawal request ID from this mapping.


# Maximum Available Liquidity

{% hint style="warning" %}
If you're going to initiate a cross-chain request, please make sure there's enough buffer liquidity on the target chain since there will always be a time gap between reading the stats and executing the request.
{% endhint %}

The major concept is that we can get the rough available liquidity by getting the balance of the `YBridgeVault` contract If the deposit token is native token. If it's ERC20-like token, we get the balance of the `YBridgeVault` contract from the vault token's ERC20 contract.

However, the balance we get directly from the contract is just a rough number since some of the balance might belong to the YBridge worker.

If you need a more accurate way to access the Maximum Available Liquidity, please use the following API ([Get Pool Liquidity](/single-bridge-integration/ybridge-api/get-pool-liquidity)) to obtain liquidity information.


# Migrate from V2 to V3

This migration guide is intended for developers working with our smart contract. This document outlines the key changes between the current and upcoming versions, including function parameter renames,

## Overview

### Function Parameter Renaming

The `deposit` and `withdraw` functions have had their parameter names updated to better represent their purpose. The interfaces for these functions remain the same; only the parameter names have changed.

* `function deposit(uint256 amount)` has been changed to

  `function deposit(uint256 vaultTokenAmount)`
* `function withdraw(uint256 xyWrappedTokenAmount)` has been changed to&#x20;

  `function withdraw(uint256 shareAmount)`

### Deprecated State Variables

The following state variables are deprecated and will no longer be used to calculate remaining liquidity:

* `uint256 public closeSwapGasFees`
* `uint256 public depositAndWithdrawFees`

### New State Variables and Mappings

New state variables and mappings have been added to provide more detailed control and tracking:

* `bool public acceptDepositRequest` indicates if the contract currently accepts deposit requests.
* `bool public acceptWithdrawRequest` indicates if the contract currently accepts withdraw requests.
* `mapping (uint256 => bool) public isDepositCompleted` tracks the completion status of deposit requests by their ID.
* `mapping (uint256 => bool) public isWithdrawCompleted` tracks the completion status of withdraw requests by their ID.

***

## Migration Steps

### Updating Function Calls

Review and update all instances where `deposit()` and `withdraw()` functions are called with the new parameter names:

For `deposit()`:

```diff
- contract.deposit(amount);
+ contract.deposit(vaultTokenAmount);
```

For `withdraw()`:

```diff
- contract.withdraw(xyWrappedTokenAmount);
+ contract.withdraw(shareAmount);
```

### Handling Deprecated Variables

Remove or refactor any code segments that reference `closeSwapGasFees` and `depositAndWithdrawFees`. Determine alternative methods to calculate liquidity, if necessary.

```diff
- // Deprecated: The following variables are no longer supported
- uint256 gasFees = contract.closeSwapGasFees;
- uint256 fees = contract.depositAndWithdrawFees;
+ // Implement new logic for liquidity calculation here
```

### Incorporating New Variables

Incorporate logic to handle the new state variables and mappings according to your contract's requirements. Ensure that you check the acceptance of deposit and withdraw requests before proceeding with the operations. Also, verify the completion status of requests using the new mappings.

Example for deposit request check:

```solidity
solidityCopy coderequire(contract.acceptDepositRequest, "Deposit requests are currently not accepted.");
```

Example for withdraw request check:

```solidity
solidityCopy coderequire(contract.acceptWithdrawRequest, "Withdraw requests are currently not accepted.");
```


# (Legacy) Integrate X Swap Contract

XY Finance deploys smart contracts of Swapper (X Swap) on most mainstream chains and benefits all types of users in terms of secure cross-chain swaps.

{% hint style="warning" %}
yBridge has been updated to version v3, and this v2 documentation is currently only for reference purposes. If you need to integrate with our new contracts, please refer to [Integrate YBridge Contract](/single-bridge-integration/ybridge-contract-integration/integrate-ybridge-contract) to get the latest information.
{% endhint %}

## XSwapper

### Code

To enable ease of access to the content of the smart contracts (its code, data, status, etc.) and ascertain how they work and how they are programmed on the network, here we give you (users and institutions alike) the APIs and custom-fit UIs to suit your needs and provide you with a sense of security.\
\
The link `XSwapper.sol` below offers a collection of our code and functions. The smart contract accounts, deployed to the network, will interact with you when you submit transactions that execute functions that are defined on the smart contracts per se. Just like a regular, typical contract, our smart contracts define rules and will automatically implement them *via the code*.&#x20;

[`XSwapper`](https://etherscan.io/address/0x47f704c91c7edaac125ba451c0f98cbd64c78340#code)

## Events

### System Setting Related Events

#### StartSwapIdSet

```solidity
event StartSwapIdSet(uint256 _swapId);
```

This will be emitted when the starting swap ID is set.

#### FeeStructureSet

```solidity
event FeeStructureSet(uint32 _toChainId, address _YPoolToken, uint256 _gas, uint256 _min, uint256 _max, uint256 _rate, uint256 _decimals);
```

This will be emitted when the fee structure of a certain liquidity pool token on a certain chain is set

#### YPoolVaultSet

```solidity
event YPoolVaultSet(address _supportedToken, address _vault, bool _isSet);
```

This will be emitted when a Y Pool (liquidity pool) is set.

#### AggregatorAdaptorSet

```solidity
event AggregatorAdaptorSet(address _aggregator, bool _isSet);
```

This will be emitted when an aggregator adaptor is set.

#### SwapValidatorXYChainSet

```solidity
event SwapValidatorXYChainSet(address _swapValidatorXYChain);
```

This will be emitted when the validator address (on settlement chain) is set.

#### AcceptSwapRequestSet

```solidity
event AcceptSwapRequestSet(bool _isSet);
```

This will be emitted when the acceptSwapRequest is set. If true, XSwapper accepts swap request.

### X Swap Related Events

#### SwapRequested

```solidity
event SwapRequested(uint256 _swapId, address indexed _aggregatorAdaptor, ToChainDescription _toChainDesc, IERC20 _fromToken, IERC20 indexed _YPoolToken, uint256 _YPoolTokenAmount, address _receiver, uint256 _xyFee, uint256 _gasFee);
```

This will be emitted whenever a cross-chain swap request is initiated.

#### CloseSwapCompleted

```solidity
event CloseSwapCompleted(CloseSwapResult _swapResult, uint32 _fromChainId, uint256 _fromSwapId);
```

This will be emitted by the time all a cross-chain swap request is processed at the target chain so as to keep a record of the request. &#x20;

#### SwappedForUser

```solidity
event SwappedForUser(address indexed _aggregatorAdaptor, IERC20 indexed _fromToken, uint256 _fromTokenAmount, IERC20 _toToken, uint256 _toTokenAmountOut, address _receiver);
```

This will be emitted also by the time all a cross-chain swap request is processed at the target chain. However, this event records more information of the swap details than the `CloseSwapCompleted` event.

#### SwapCompleted

```solidity
event SwapCompleted(CompleteSwapType _closeType, SwapRequest _swapRequest);
```

This will be emitted when a cross-chain swap request is completed at the source chain. That is, the asset is settled and claimed back to the liquidity pool.

## State-Changing Functions

### swap

```solidity
function swap(
    address aggregatorAdaptor,
    IDexAggregatorAdaptor.SwapDescription memory swapDesc,
    bytes memory aggregatorData,
    ToChainDescription calldata toChainDesc
)
```

Initiate a cross-chain request and execute source chain side swap.

The `aggregatorAdaptor` is to adapt to the DEX aggregator involved in the `aggregatorData`.

The `swapDesc` contains the information of the source chain side swap.

```solidity
struct SwapDescription {
    IERC20 fromToken;
    IERC20 toToken;
    address receiver;
    uint256 amount;
    uint256 minReturnAmount;
}
```

The `aggregatorData` is generated by server containing source chain part of best routing path.&#x20;

The `toChainDesc` would be emitted in event to record target chain swap path and slippage. Note that the slippage would be seen as BP (1223 slippage equals to 12.23%).&#x20;

```solidity
struct ToChainDescription {
    uint32 toChainId;
    IERC20 toChainToken;
    uint256 expectedToChainTokenAmount;
    uint32 slippage;
}
```

### swapWithReferrer

```solidity
function swapWithReferrer(
    address aggregatorAdaptor,
    IDexAggregatorAdaptor.SwapDescription memory swapDesc,
    bytes memory aggregatorData,
    ToChainDescription calldata toChainDesc,
    address referrer
)
```

Initiate a cross-chain request and execute source chain side swap and leave a record of the referrer. Please contact us for more information about referral program.

### singleChainSwap

```solidity
function singleChainSwap(
    address aggregator,
    IDexAggregatorAdaptor.SwapDescription memory swapDesc,
    bytes memory aggregatorData
)
```

Execute a single-chain swap.

The `aggregator` is the DEX aggregator involved in the `aggregatorData`.

The `swapDesc` contains the information of the source chain side swap.

```solidity
struct SwapDescription {
    IERC20 fromToken;
    IERC20 toToken;
    address receiver;
    uint256 amount;
    uint256 minReturnAmount;
}
```

The `aggregatorData` is generated by server containing source chain part of best routing path.&#x20;

### singleChainSwapWithReferrer

```solidity
function singleChainSwapWithReferrer(
    address aggregator,
    IDexAggregatorAdaptor.SwapDescription memory swapDesc,
    bytes memory aggregatorData,
    address referrer
)
```

Execute a single-chain swap and leave a record of the referrer. Please contact us for more information about referral program.

## View Functions

### getSwapRequest

```solidity
function getSwapRequest(uint256 _swapId) returns (SwapRequest)
```

Get a certain swap request information by swap ID

```solidity
struct SwapRequest {
    uint32 toChainId;
    uint256 swapId;
    address receiver;
    address sender;
    uint256 YPoolTokenAmount;
    uint256 xyFee;
    uint256 gasFee;
    IERC20 YPoolToken;
    RequestStatus status;
}

enum RequestStatus { Open, Closed } 
```

### getFeeStructure

```solidity
function getFeeStructure(uint32 _chainId, address _token) returns (FeeStructure)
```

Get the fee setting of a certain liquidity pool token of a certain chain.

For example, if you are using `Ethereum`, you can get the fee setting of `USDT` pool of `Ethereum` by invoking\
`getFeeStructure(1, "0xdAC17F958D2ee523a2206206994597C13D831ec7")`; \
you can also get the fee setting of `USDT` pool of `Polygon` by invoking\
`getFeeStructure(137, "0xdAC17F958D2ee523a2206206994597C13D831ec7")`.\
This way you can figure out the fee setting when you try to bridge from `Ethereum` to `Polygon` via `USDT` pool.

```solidity
struct FeeStructure {
    bool isSet;
    uint256 gas;
    uint256 min;
    uint256 max;
    uint256 rate;
    uint256 decimals;
}

// isSet: Has been set or not
// gas: gas amount
// min: minimum XY Fee amount
// max: maximum XY Fee amount
// rate: XY Fee rate
// decimals: decimals of `rate`

// Example:
// (True, 25000000, 40000000, 2000000000, 35, 5)
// Means the fee strucute is set with the following:
// The minimum XY Fee of the given chain and token is `40000000`
// The maximum XY Fee of the given chain and token is `2000000000`
// The part of gas amount (included in the XY Fee) is `25000000`
// The XY Fee rate is 35 / (10**5) == `0.035%`
```

### getEverClosed

```solidity
function getEverClosed(uint32 _chainId, uint256 _swapId) returns (bool)
```

Check whether a swap request is closed (processed) on target chain by the swap ID on the source chain and the source chain ID.

### getTokenBalance

```solidity
function getTokenBalance(IERC20 _token, address _account) returns (uint256)
```

Get balance of an account of a token.


# (Legacy) Bridge Example

This is a simple bridge request (without invoking swap) example

{% hint style="warning" %}
Please note that directly interacting with the smart contract means your bridge request may not be completed on the target chain since you are initiating a request regardless of the liquidity on the other side. If unfortunately you found your transaction hasn't been processed for more than 30 minutes, please contact us via telegram or discord!

See more detail of [available liquidity](/single-bridge-integration/ybridge-contract-integration/legacy-integrate-y-pool-contract/legacy-maximum-available-liquidity).
{% endhint %}

In this example, we try to bridge **100 USDT** from **Ethereum** to **Polygon**.

The function we're going interact with is the `swap` of the `XSwapper` on **Ethereum**.

From [(Legacy) Integrate X Swap Contract](/single-bridge-integration/ybridge-contract-integration/smart-contract) we can find the interface of `swap`:

```solidity
function swap(
    address aggregatorAdaptor,
    IDexAggregatorAdaptor.SwapDescription memory swapDesc,
    bytes memory aggregatorData,
    ToChainDescription calldata toChainDesc
)
```

There are four parameters we need to prepare:\
\- **`aggregatorAdaptor`**\
\- **`swapDesc`**\
\- **`aggregatorData`**\
\- **`toChainDesc`**

### aggregatorAdaptor

Since we're just bridging **`USDT`**, no swap actions would be involved. That is, we don't need aggregator and so is its adaptor `aggregatorAdaptor`. In this kind of situation **`aggregatorAdaptor`** should be `0x0000000000000000000000000000000000000000`

### aggregatorData

Normally, we put the data that is going to be executed by the aggregator to this field. However in this case we're not going to swap tokens,  so the **`aggregatorData`** we put is `0x`.

### swapDesc

```solidity
struct SwapDescription {
    IERC20 fromToken;
    IERC20 toToken;
    address receiver;
    uint256 amount;
    uint256 minReturnAmount;
}
```

A `SwapDescription` describes the swap happening on the source chain. In this case, we don't need to swap **USDT** to something else so both the **`fromToken`** and **`toToken`** should be the address of **USDT** on **Ethereum**, which is `0xdAC17F958D2ee523a2206206994597C13D831ec7`.

The **`receiver`** is the one who's going to receive the **USDT** on target chain (**Polygon**).

The **`amount`** is the swap amount with padding zeroes. In this case it should be `100000000` since the decimals of **USDT** on **Ethereum** is `6`**.**

The **minReturnAmount** is used to make sure the return amount of the swap happening on the source chain. In this case we could just put the same amount as **`amount`**.

### &#x20;toChainDesc

```solidity
struct ToChainDescription {
    uint32 toChainId;
    IERC20 toChainToken;
    uint256 expectedToChainTokenAmount;
    uint32 slippage;
}
```

As for `ToChainDescription`,  it describes what should be achieved on the target chain.

The **`toChainId`** is the ID of the target chain, `137` in this case.&#x20;

The **`toChainToken`** represents the desired token on the target chain, the **USDT** address on **Polygon** in this case, which is `0xc2132D05D31c914a87C6611C10748AEb04B58e8F`

The **`expectedToChainTokenAmount`**  will be used for the swap on the target chain. To keep it simple, we could put the same value as the amount of the **`swapDesc`**. In this case it would be `100000000` since the decimals of **Polygon** **USDT** is also `6`.\
However, please note that the amount you're going to received will be a bit less owing to the XY Fee.

The **`slippage`** will be used to calculate the minimum received amount from **`expectedToChainTokenAmount`** and it's as well only used when a swap is happening on the target chain. In this case, again, there's no swap involved therefore we put `0` in this field.

### To Sum up

The parameters we need to bridge **100 USDT** from **Ethereum** to **Polygon** would look like:

```solidity
swap(
    0x0000000000000000000000000000000000000000, // aggregatorAdaptor
    (0xdAC17F958D2ee523a2206206994597C13D831ec7, 0xdAC17F958D2ee523a2206206994597C13D831ec7, receiver, 100000000, 100000000), // swapDesc
    0x, // aggregatorData
    (137, 0xc2132D05D31c914a87C6611C10748AEb04B58e8F, 100000000, 0) // toChainDesc
)
```

## Check on the Target Chain

After sending a swap request from the source chain, we can get the **SwapRequested** event from logs. The `_swapId` in the event is the ID of the swap request. We can check whether the swap request is processed or not on the target chain by invoking `getEverClosed(`\_`srcChainId, _swapId)`.

If you are looking for more details of the request such as the amount, you should monitor the **SwappedForUser** event emitted from the `XSwapper` on the target chain.

See more of events and functions of `XSwapper` [here](/single-bridge-integration/ybridge-contract-integration/smart-contract).\
See addresses of `XSwapper` across all chains [here](/smart-contract/addresses).


# (Legacy) Integrate Y Pool Contract

{% hint style="danger" %}
yBridge has been updated to version v3, and this v2 documentation is currently only for reference purposes. If you need to integrate with our new contracts, please refer to [Integrate YBridgeVault Contract](/single-bridge-integration/ybridge-contract-integration/integrate-ybridgevault-contract) to get the latest information.
{% endhint %}

## YPoolVault

### Code

[`YPoolVault`](https://etherscan.io/address/0x8e921191a9dc6832C1c360C7c7B019eFB7c29B2d#code)

## State-Changing Functions

### deposit

```solidity
function deposit(uint256 amount)
```

Initiate a deposit request.

The `amount` is the desired pool token to be deposited. After deposit, the liquidity provider will receive `XYWrappedToken` (`xyUSDT`, `xyUSDC` or `xyETH)`, along with another transaction sent by XY worker.

### withdraw

```solidity
function withdraw(uint256 amountXYWrappedToken)
```

Initiate a withdrawal request.

The `amountXYWrappedToken` is the desired amount of `XYWrappedToken` to be redeemed to the underlying token.

Similar to `deposit`, you will receive the underlying token along with another transaction sent by XY worker.

## Public States

#### depositAndWithdrawFees

```solidity
uint256 public depositAndWithdrawFees;
```

We can tell how much **native token** in the Y Pool belongs to the XY worker from this state.

#### closeSwapGasFees

```solidity
uint256 public closeSwapGasFees;
```

We can tell how much **Y Pool token** in the Y Pool belongs to the XY worker from this state.


# (Legacy) Maximum Available Liquidity

{% hint style="warning" %}
If you're going to initiate a cross-chain request, please make sure there's enough buffer liquidity on the target chain since there will always be a time gap between reading the stats and executing the request.
{% endhint %}

The major concept is that we can get the rough available liquidity by getting the balance of the `YPoolVault` contract If the deposit token is native token. If it's ERC20-like token, we get the balance of the `YPoolVault` contract from the deposit token contract.

However, the balance we get directly from the contract is just a rough number since some of the balance might belong to the XY worker.

As mentioned in the **public states** in [(Legacy) Integrate Y Pool Contract](/single-bridge-integration/ybridge-contract-integration/legacy-integrate-y-pool-contract), some of the fees belong to XY worker. Therefore we should deduct those part if we are aiming higher accuracy of available liquidity.

If the deposit token of a `YPoolVault` is the native token, `depositAndWithdrawFees` should be deducted.

`closeSwapGasFees` should always be deducted whether the deposit token of a `YPoolVault` is the native token or not

The last uncertainty is the asset accidentally sent to the `YPoolVault`. This kind of asset will NOT be withdrawn immediately. Therefore, please make sure there's enough buffer when you're trying to initiate a cross-chain request directly with the smart contracts.


# xAsset Bridge

Upgrade you token into multi-chain world

xAsset Bridge helps projects **Bridge Token to Different Chains**, holders of the token could quickly and safely wrap their tokens to different chains. We supports two fungible token bridging methods for different token types

<figure><img src="/files/tXngXWF1dJAN4nZfZqkT" alt=""><figcaption></figcaption></figure>

## Token Type

* **Protocol-Owned Token**
  * XY Finance will help build an independent bridge to bridge your token to the desired chains.&#x20;
  * The protocol team can retain token ownership. (eg. LOOT, NUM, and SINGLE)
* **Non-Protocol-Owned Token**
  * XY Finance will build the shared bridge (eg. PEPE, MOG, USDC and ETH) between major chains and partnered appchains (eg. OX Chain). Any appchain can request an extension of the bridge to their appchain.
  * XY Finance will retain token ownership to ensure security across our partnered appchains.&#x20;
  * This type of token is only compatible with the Mint & Burn method
  * If you want to build an independent bridge, it is only permitted for specific tokens, such as stablecoins and major tokens like ETH and BTC.
  * The newly deployed token for shared bridge will follow the following token standard.

{% embed url="<https://github.com/XY-Finance/xy-protocol/blob/master/contracts/token-bridge/XYERC20V2.sol>" %}

## Bridging Method

* **Mint\&Burn Method:** The token will interact with xAsset Bridge by mint\&burn manner on the chain. If the mint\&burn method is adopted on the chain, while users bridge the token to other chains, the token will be transferred to the xAsset Bridge contract deployed on the chain and burned. While users bridge the token back from other chains, the token will be minted from the xAsset Bridge contract and sent to the user.
* **Pool-based Method:** The token will interact with the xAsset Bridge by lock / unlock manner on the chain. If the Pool-based method is adopted on the chain, while users bridge the token to other chains, the token will be locked to the xAsset Bridge contract deployed on the chain. While users bridge the token back from other chains, the token will be unlocked from the xAsset Bridge contract and sent to the user.

To determine the appropriate scenario and method for your project, please evaluate the following information to choose the scenario and method that best suits your needs:

* If your token is deployed only on 1 chain:&#x20;
  * And if you want to deploy token(s) to a new chain -> **Scenario1 : Mint\&Burn Method**&#x20;
* If your tokens are already deployed on N chains:&#x20;
  * And if you want to enable token cross-chain functionality on these N chains -> **Scenario2 : Pool-based**
  * And if you want to deploy tokens to a new chain and enable token cross-chain functionality on n+1 chains -> **Scenario 3: Combination of both methods.**

## Integration Flow

### Step 1: Determine Your Bridging Method and Token Type

Choose your desired bridge method and token type and contact us through[ **this form**](https://docs.google.com/forms/d/e/1FAIpQLSeJamZPxZm2oDyMGUFcEqlSHfy_WjIpuAYEqwu98rPg5xAedA/viewform)&#x20;

### Step 2: Implementation Phase&#x20;

Once you have determined step1, you can proceed with the implementation phase.

#### **Protocol-Owned Token**

Scenario 1 :  Mint\&Burn Method&#x20;

Here's what you need to do:

* Follow [How to Develop Under XY Standards](/single-bridge-integration/xasset-bridge/how-to-develop-under-xy-standards) to deploy the token contract on the desired chain(s) and send your token address to the XY team.
* XY team will provide you `relay contract` address , which you will need to set as the minter.&#x20;
* XY team will implement the cross-chain bridging mechanism (usually takes 2 weeks to complete)
* You will receive a front-end bridge that allows users to bridge your token through XY Finance.

Scenario 2 :  Pool-based

Here's what you will proceed

* Send your current token address to the XY team.
* XY team will implement cross-chain bridging mechanism (Usually takes 2 weeks to complete)
* Follow [How to Deposit / Withdraw Liquidity](/single-bridge-integration/xasset-bridge/how-to-deposit-withdraw-liquidity) to provide initial liquidity on the chain where you have deployed your token.
* You will receive a front-end bridge that allows users to bridge your token through XY Finance.

Scenario 3 (Combination of both methods) and Other Cases

* Contact us through[ **this form**](https://docs.google.com/forms/d/e/1FAIpQLSeJamZPxZm2oDyMGUFcEqlSHfy_WjIpuAYEqwu98rPg5xAedA/viewform) to know more detail&#x20;

#### **Non-Protocol-Owned Token**

It is only compatible with the Mint & Burn method, and the newly deployed token will follow the following token standard.

* Confirm the token you want to deployed
* XY team will implement the cross-chain bridging mechanism (usually takes 2-4 weeks to complete)
* You will receive a front-end bridge that allows users to bridge your token through XY Finance.

## Commonly asked questions:

### 1. How does xAsset Bridge charge fees?

The integration of xAsset Bridge does not charge any fees. However, when users utilize XY Finance in the future to bridge your project's tokens, we will charge a certain fee from it. \
\
To learn about the pricing details of the xAsset Bridge, please refer to the following page and check the **xAsset Bridge** session

{% content-ref url="/pages/R6ZNeJGabWH2sUpAkY3H" %}
[yBridge Fee Information](/fee-structure/ybridge-fee-information)
{% endcontent-ref %}

### 2. What security measures does xAsset Bridge have?

* **Validators:** The consensus mechanism of xAsset Bridge incorporates multiple validators, which support and consistently validate data requests from executors as needed.
* **Contract Independence:** The Token Contact will be deployed by the project itself, while the Relay Contract will be deployed by XY, but it will be independent and non-upgradable, ensuring the security of the entire process.

### 3. If the token has taxes, can I integrate xAsset Bridge?

In the regular integration process, once you provide your token address to the XY team, we will deploy the `relay contract` for the xAsset Bridge service. If your token involves transfer taxes, you need to whitelist the `relay contract` address as both the '**sender**' and '**receiver**' in order to exempt these taxes during the bridge process.


# How to Develop Under XY Standards

To create and deploy your own token contract, it is imperative that your contract conforms to certain standards. This ensures interoperability, security, and broad functionality. The following guide outlines how to implement key features in your token contract to ensure it aligns with the required standards.

## We offer two methods to help you deploy contracts that comply with our standards on the new chain.

1\. We currently offer two standard contracts. If your token contract does not require any additional functionalities, you can directly fork our example below.

* XY ERC20

{% embed url="<https://github.com/XY-Finance/xy-protocol/blob/master/contracts/token-bridge/XYERC20.sol>" fullWidth="false" %}
XY ERC20 token example
{% endembed %}

* XY ERC20 V2 (compatible with multichain Anyswap ERC20 standards)

{% embed url="<https://github.com/XY-Finance/xy-protocol/blob/master/contracts/token-bridge/XYERC20V2.sol>" %}
XY ERC20 V2 token example
{% endembed %}

2\. If you want to **write your own token contract** or **upgrade existing contracts**, please make sure that the contract implements mint & burn functions. You can refer to the following instruction to finish your own contract.&#x20;

{% content-ref url="/pages/YAjrjpeW51GP07otYFf1" %}
[Function Interface for Token Contract](/single-bridge-integration/xasset-bridge/how-to-develop-under-xy-standards/function-interface-for-token-contract)
{% endcontent-ref %}

Be mindful of prioritizing security and control when building smart contracts to prevent undesirable actions or consequences.&#x20;

{% hint style="info" %}
After you have completed your contract, please contact us and provide the deployed contract addres&#x73;**. We will provide our** `relay contract` **address, which you will need to set as the minter.**&#x20;
{% endhint %}

## Commonly asked questions:

**To which router address should I grant minting rights?**&#x20;

Our team will furnish you with the latest relay address that should be granted minting rights. In the future, this information will be more easily accessible through APIs.

**Whom should I designate as the token's owner?**&#x20;

You can easily designate your project admin as the owner.


# Function Interface for Token Contract

### Function: mint

Your contract should include the `mint` function. Here is the signature:

```solidity
function mint(
    address to,
    uint256 amount
) external onlyMinter;
```

This function creates new tokens and adds them to the total supply. The parameters are:

* `address to`: The address to receive the newly minted tokens.
* `uint256 amount`: The amount of tokens to be minted and sent to the designated address.

Here is a brief implementation example of the `mint` function using OpenZeppelin's ERC20 library:

```solidity
// Using OpenZeppelin's ERC20
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MyToken is ERC20 {
    // ...
    function mint(address to, uint256 amount) public onlyMinter {
        _mint(to, amount);
    }
}
```

The `onlyMinter` modifier restricts access to the `mint` function to authorized minters only, ensuring control over the creation of new tokens.

This `mint` function is key to the effective operation of cross-chain transfers within our system. By minting tokens on the destination chain that correspond tokens burnt on the source chain, the `mint` function ensures that total token supply remains consistent across all chains

### Accessing the Minter Role

In order to use the `mint` function, you will need to provide **our relay contract** with permission to pass the `onlyMinter` check. This necessitates the inclusion of a function in your contract that enables the assignment of the minter role.

Possible options are:

1. **Mapping for Minters**: Use a mapping in your contract to track the minter access of addresses.&#x20;
2. **Grant Role Function**: Use a function in your contract that allows a specific role, such as an owner or admin, to grant the minter role. This can be done using a role-based access control library like OpenZeppelin's Access Control library.

### Function: burn

Your contract should also implement a `burn` function for token destruction. We expect this function will burn/remove a certain amount of tokens. We currently support the two interfaces for burn function:

#### XYERC20 (V1)

```solidity
function burn(
    uint256 amount
) external;
```

This `burn` function should destroy a specified amount of tokens from the `msg.sender`'s balance. The parameter is:

* `uint256 amount`: The number of tokens to be burnt or destroyed.

Here is a brief implementation of the `burn` function using OpenZeppelin's ERC20 library:

```solidity
// Using OpenZeppelin's ERC20
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MyToken is ERC20 {
    // ...
    function burn(uint256 amount) external {
        _burn(msg.sender, amount);
    }
}
```

In this example, the `_burn` function, a part of OpenZeppelin's ERC20 library, is used to burn tokens. It deducts the `amount` from `msg.sender`'s balance and reduces the total supply of tokens accordingly.

#### XYERC20 (V2)

```solidity
function burn(
    address account,
    uint256 amount
) external onlyMinter;
```

This `burn` function should destroy a specified amount of tokens from the `account`'s balance. The parameters are:

* `address account`: The address of the account from which the tokens will be burned.
* `uint256 amount`: The number of tokens to be burnt or destroyed.

Make sure you add the `onlyMinter` modifier or such access control function to protect this burn function, and you will need to provide **our relay contract** with permission to pass the `onlyMinter` check as well.

***

The `burn` function empowers your contract to maintain the integrity of the token's supply when tokens are sent across different blockchains.


# How to Deposit / Withdraw Liquidity

How to add / remove liquidity using pool-based method

## Deposit / Withdrawal Methods

Currently, you have different methods available for depositing or withdrawing liquidity for your bridge:

* **Use**[ **Our Website**](https://alpha.xy.finance/pools/xasset)**:** Deposit or withdraw liquidity by interacting with website UI

<figure><img src="/files/ZNVjh90A30Q7PLVG66nZ" alt=""><figcaption></figcaption></figure>

* **Direct Contract Interaction**: Deposit or withdraw liquidity by directly interacting with the contract

{% content-ref url="/pages/Bf5KMt94rWh3Lu7ofjAE" %}
[Direct Contract Interaction](/single-bridge-integration/xasset-bridge/how-to-deposit-withdraw-liquidity/direct-contract-interaction)
{% endcontent-ref %}

* **Through the Explorer:** Deposit or withdraw liquidity via the Explore. (Please note that this feature is not supported by every explore. As of now, it's compatible with [Ethereum](https://etherscan.io/), [BNB](https://bscscan.com/), [Polygon](https://polygonscan.com/), [Polygon zkEVM](https://zkevm.polygonscan.com/), [Arbitrum](https://arbiscan.io/), [Optimism](https://optimistic.etherscan.io/), [Avalanche](https://snowtrace.io/), [Linea](https://lineascan.build/) and [Cronos](https://cronoscan.com/). If this method is unavailable, you should directly interact with the contract.)

{% content-ref url="/pages/rFdkzw04MENvgOSn2Yo9" %}
[Through the Explorer](/single-bridge-integration/xasset-bridge/how-to-deposit-withdraw-liquidity/through-the-explorer)
{% endcontent-ref %}


# Direct Contract Interaction

### Prerequisites

Ensure that Node.js and npm are installed on your machine.

### Step 1: Install Ethers.js

Use `npm` to install `ethers.js`:

```bash
npm install ethers
```

### Step 2: Connect to the Network that You'd Like to Add Liquidity to

Connect to Ethereum, for example. You can do this using a default provider from ethers, which automatically connects to the Ethereum mainnet:

```javascript
const ethers = require('ethers');
const provider = ethers.getDefaultProvider();
```

### Step 3: Import the Contract ABI and Address

The contract ABI and address will enable `ethers.js` to interact with the contract. Import these values:

```javascript
const contractABI = [
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "deposit",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "withdraw",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ]; 
const contractAddress = ''  // fill with the relay contract address
```

### Step 4: Create a Contract Instance

Now, using the provider, the contract ABI, and the contract address, you can create a contract instance:

```javascript
const contract = new ethers.Contract(contractAddress, contractABI, provider);
```

### Step 5: Create a Signer

In order to modify the blockchain state, transactions need to be signed. Create a signer from a private key:

```javascript
const privateKey = 'your-private-key';
const wallet = new ethers.Wallet(privateKey);
const signer = wallet.connect(provider);
```

Make sure to replace `'your-private-key'` with your actual private key.

### Step 6: Connect Contract to Signer

Connect the contract instance to the signer:

```javascript
const contractWithSigner = contract.connect(signer);
```

### Step 7: Interact with the Contract

Now that you have a contract instance connected to a signer, you can interact with the contract's functions.

#### Deposit:

```javascript
async function deposit(amount) {
    const transaction = await contractWithSigner.deposit(amount, { value: value });
    const receipt = await transaction.wait();
    console.log(receipt);
}
```

#### Withdraw:

```javascript
async function withdraw(amount) {
    const transaction = await contractWithSigner.withdraw(amount);
    const receipt = await transaction.wait();
    console.log(receipt);
}
```

### ❗️❗️ Please review the following information before implementation❗️❗️&#x20;

* Remember to approve `contract` before `deposit` if you're about to deposit ERC20 token.
* Remember to replace `amount` with the amount you want to deposit or withdraw.
* Remember to set `value` with the same amount as `amount` if you're about to deposit native token.


# Through the Explorer

### Before you begin adding liquidity, you must prepare several things:

* Your Wallet with the token you want to deposit
* Your Token Contract ([Example](https://bscscan.com/address/0x9a257c90fa239fba07771ef7da2d554d148c2e89#writeContract))
* Ralayer Contract for your token ([Example](https://bscscan.com/address/0x5bd40e579cb7d37784689044e6c7c333e2e300e6#writeContract))

## Deposit liquidity

### Step1 : Approve the Relayer Contract as Spender on Token Contract

* Visit the **token contract page** on the explorer.
* Navigate to the **Contract tab - Write Contract** and then connect your wallet&#x20;

<figure><img src="/files/sxneWaqTBRksbeZnCOCY" alt=""><figcaption></figcaption></figure>

* Locate the **approve** section&#x20;

<figure><img src="/files/r1Mdp5q4L9CAHd0yMMnU" alt=""><figcaption></figcaption></figure>

* Input two fields in the **approve** session to approve the Relayer Contract
  * spender (address): Fill in with **Relayer Contract** Address (do not enter your wallet address here).
  * amount  (uint256): Input the quantity you wish to approve with its corresponding decimals. For instance, if you want to approve 50 tokens and the decimal is 18, then input 50,000,000,000,000,000,000.
  * If you are not familiar with the decimal, you can locate it in the overview section of your token contract page on the explorer.

<figure><img src="/files/FA6CKWVovfCFXkwV6oHE" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/RhhFSGifWI22K8H0n8bN" alt=""><figcaption><p>Find the decimal on your token page</p></figcaption></figure>

* Complete the approval by sending the transaction.

### Step2 : Go to Relayer Contract to Execute Deposit.

* Visit the relayer contract page on the Explorer.&#x20;
* Navigate to the **Contract tab - Write Contract** and then connect your wallet&#x20;

<figure><img src="/files/RLyJEYzbYvtq2QH7T19a" alt=""><figcaption></figcaption></figure>

* Locate the **5. deposit** section&#x20;

<figure><img src="/files/d6ek5VLwEXKhLdbeFBPo" alt=""><figcaption></figcaption></figure>

* Input two fields in the **5. deposit** session to deposit your token
  * deposit: Keep 0
  * amount  (uint256): Input the quantity you want to deposit with its corresponding decimals. For instance, if you want to deposit 50 tokens and the decimal is 18, then input 50000000000000000000.
  * If you are not familiar with the decimal, you can locate it in the overview section of your token contract page on the explorer.

<figure><img src="/files/kFqgiOTzGYqJeXD3cy7L" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/RhhFSGifWI22K8H0n8bN" alt=""><figcaption><p>Find the decimal on your token page</p></figcaption></figure>

* Complete the deposit by sending the transaction.

## Withdraw liquidity

### Step1 : Approve the Relayer Contract as Spender on Relayer Contract

* Visit the **Relayer contract page** on the explorer.
* Navigate to the **Contract tab - Write Contract** and then connect your wallet&#x20;

<figure><img src="/files/RLyJEYzbYvtq2QH7T19a" alt=""><figcaption></figcaption></figure>

* Find the **2. approve** section&#x20;

<figure><img src="/files/nfD42eQ6Pw7gIcBhvlqV" alt=""><figcaption></figcaption></figure>

* Input two fields in the **2. approve** session to approve the Relayer Contract
  * spender (address) : Fill in with **Relayer Contract** Address (do not enter your wallet address here).
  * amount  (uint256) :  Input the quantity you wish to approve with its corresponding decimals. For instance, if you want to approve 50 tokens and the decimal is 18, then input 50,000,000,000,000,000,000.
  * If you are not familiar with the decimal, you can locate it in the overview section of your token contract page on the explorer.

<figure><img src="/files/xlCPNMMvmQZo1uHLNgEK" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/KAcFFn35ziRGZQnj0yzs" alt=""><figcaption></figcaption></figure>

* Complete the approval by sending the transaction.

### Step2 : Execute Withdraw on Relayer Contract

* Locate the **19. withdraw** section on relayer contract page&#x20;

<figure><img src="/files/ahGP5yOSmhogx7sxs5Hd" alt=""><figcaption></figcaption></figure>

* Input amount fields in the **19. withdraw** session to withdraw your token
  * amount  (uint256) :  Input the quantity you want to withdraw with its corresponding decimals. For instance, if you want to withdraw 50 tokens and the decimal is 18, then input 50000000000000000000.

<figure><img src="/files/D7oQhaH31CqxyuzfMJ11" alt=""><figcaption></figcaption></figure>

* Complete the withdraw by sending the transaction.


# Set up Your Own Validator

Explain how transaction verify by multiple validator

The cross-chain transfer of tokens through the xAsset Bridge is efficient and highly secure. We have multiple validators to help confirm the correctness and security of transactions, ensuring that no malicious transactions or unexpected transactions occur. In addition, xAsset Bridge are compatible with the third parties register to be one of the validators to ensure sufficient decentralization.

## Validator Registration

#### Step 1. Get latest **validator server image**

You can get latest image from [docker hub](https://hub.docker.com/r/xyfinance/cross-chain-relay-validator)

#### Step 2. Run validator server with specific **environment variables**

Server listen port: `8004`

To run validator server properly, you must pass following environment variables when starting a container:

* `TOKEN_SYMBOL`: The token you want to validate.&#x20;

  Currently available symbols are:

  * XY
* `CC_VALIDATOR_KEY`: Private keys of validator EOA wallet, will be used to sign validated transaction. For example:&#x20;

  `28f56a15aef9105893fae9f2af4d2386b0a549ebe297c00708c494f5d53871d0`

#### Step 3. Expose server **endpoint** and verify

After server starts to run, the server endpoint needs to be exposed publicly in order to receive validate request. Make sure you can access `/signatures/crossChainRequests` from your server.

To verify server works properly, you may use following command for testing. If everything went good, it will return signatures of your validator.

```bash
curl -X GET "{your_server_domain}/signatures/crossChainRequests?srcChainId=1&requestId=88&destChainId=137&receiver=0x434d20f4286711530e945957f77384649c5301a7&amount=4141700000000000000000&fee=31002734678&txHash=0xfa287bb58af4b0c0e188abe4784a9e308e7b2302733ab7296f1bac5725a112fb"
```

#### Step 4. Fill registration form

Finally, fill this [form](https://forms.gle/soHFqG7bsBZNMbvC7) to inform us about your validator server.

We will add your server to our validator list after reviewed.


# Addresses

{% content-ref url="/pages/4PxVPXoS8xMjkeCvyGXx" %}
[Ethereum (chain id : 1)](/smart-contract/addresses/ethereum-chain-id-1)
{% endcontent-ref %}

{% content-ref url="/pages/EZlwWrjDY5wREzfZlz30" %}
[BNB Chain (chain id : 56)](/smart-contract/addresses/bnb-chain-chain-id-56)
{% endcontent-ref %}

{% content-ref url="/pages/b8XMkk7FcPMi956yPHt6" %}
[Polygon (chain id : 137)](/smart-contract/addresses/polygon-chain-id-137)
{% endcontent-ref %}

{% content-ref url="/pages/SWSHlqzxE4VvLJGc6xBv" %}
[Cronos (chain id : 25)](/smart-contract/addresses/cronos-chain-id-25)
{% endcontent-ref %}

{% content-ref url="/pages/KqAMwNTo0Pl2fwMzKrUZ" %}
[Avalanche (chain id : 43144)](/smart-contract/addresses/avalanche-chain-id-43144)
{% endcontent-ref %}

{% content-ref url="/pages/rqPKjhBnuZHMKv3swU6d" %}
[Kucoin Community Chain (chain id : 321)](/smart-contract/addresses/kucoin-community-chain-chain-id-321)
{% endcontent-ref %}

{% content-ref url="/pages/Cs3p6yNz6sPUaGky3ixE" %}
[Arbitrum (chain id : 42161)](/smart-contract/addresses/arbitrum-chain-id-42161)
{% endcontent-ref %}

{% content-ref url="/pages/AxOY8LP7UZh5hjH9rwPA" %}
[Optimism (chain id : 10)](/smart-contract/addresses/optimism-chain-id-10)
{% endcontent-ref %}

{% content-ref url="/pages/yDwygERU43cyHTF0whDT" %}
[Astar (chain id : 592)](/smart-contract/addresses/astar-chain-id-592)
{% endcontent-ref %}

{% content-ref url="/pages/aWRLf3MvuGJBEasPKn3u" %}
[Kaia (chain id : 8217)](/smart-contract/addresses/kaia-chain-id-8217)
{% endcontent-ref %}

{% content-ref url="/pages/Xul7n1YEEDW5Oybw2TuH" %}
[zkSync Era (chain id : 324)](/smart-contract/addresses/zksync-era-chain-id-324)
{% endcontent-ref %}

{% content-ref url="/pages/au5T53tBlaR5Ped9QWhg" %}
[Polygon zkEVM ( chainid : 1101)](/smart-contract/addresses/polygon-zkevm-chainid-1101)
{% endcontent-ref %}

{% content-ref url="/pages/P5Ai0JiMj8iFzB7ndw7F" %}
[Linea (chain id : 59144)](/smart-contract/addresses/linea-chain-id-59144)
{% endcontent-ref %}

{% content-ref url="/pages/xXKxCrEdW5FquG3IwC9S" %}
[Base (chain id : 8453)](/smart-contract/addresses/base-chain-id-8453)
{% endcontent-ref %}

{% content-ref url="/pages/yt2hFFeQI8KdRAl1djlm" %}
[Mantle ( chain id : 5000)](/smart-contract/addresses/mantle-chain-id-5000)
{% endcontent-ref %}

{% content-ref url="/pages/xvNRKhB53F2M3ErmJyXN" %}
[Scroll (chain id : 534352 )](/smart-contract/addresses/scroll-chain-id-534352)
{% endcontent-ref %}

{% content-ref url="/pages/QvfB5siCYE3YFkUyKJ5P" %}
[Blast (chain id : 81457)](/smart-contract/addresses/blast-chain-id-81457)
{% endcontent-ref %}

{% content-ref url="/pages/y5dm8dzgo5XoofDh6L9a" %}
[X Layer (chain id : 196)](/smart-contract/addresses/x-layer-chain-id-196)
{% endcontent-ref %}

{% content-ref url="/pages/pI3YqRal3ETtVgXxDcfu" %}
[Taiko (chain id : 167000)](/smart-contract/addresses/taiko-chain-id-167000)
{% endcontent-ref %}

{% content-ref url="/pages/AD0tLx6IrAdByRUXFYgx" %}
[Cronos zkEVM (chain id : 388)](/smart-contract/addresses/cronos-zkevm-chain-id-388)
{% endcontent-ref %}

{% content-ref url="/pages/b67OcAq7fZhMh5LAtm8G" %}
[Abstract (chain id : 2741)](/smart-contract/addresses/abstract-chain-id-2741)
{% endcontent-ref %}

{% content-ref url="/pages/2fUJSoIWDGJdbAh4J3Hp" %}
[Berachain (chain id : 80094)](/smart-contract/addresses/berachain-chain-id-80094)
{% endcontent-ref %}

{% content-ref url="/pages/JsUjZCXfiaulYUeqH5KQ" %}
[Numbers (chain id : 10507)](/smart-contract/addresses/numbers-chain-id-10507)
{% endcontent-ref %}

{% content-ref url="/pages/XSU90n6zK5KKF4FfCCAC" %}
[Treasury](/smart-contract/addresses/treasury)
{% endcontent-ref %}

{% content-ref url="/pages/4iLWWobyzN7oOr20nxz9" %}
[（Suspended）Fantom](/smart-contract/addresses/suspended-fantom)
{% endcontent-ref %}

{% content-ref url="/pages/L5i9InvKpePLf5vj4NW3" %}
[（Suspended）ThunderCore](/smart-contract/addresses/suspended-thundercore)
{% endcontent-ref %}

{% content-ref url="/pages/YtFM6YbtHcomOBJRop8b" %}
[（Suspended）Moonriver](/smart-contract/addresses/suspended-moonriver)
{% endcontent-ref %}


# Ethereum (chain id : 1)

## Aggregator (swap & Bridge) Addresses

<table data-header-hidden><thead><tr><th width="366">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>XY Token (ETH)</td><td><a href="https://etherscan.io/address/0x77777777772cf0455fB38eE0e75f38034dFa50DE">0x77777777772cf0455fB38eE0e75f38034dFa50DE</a></td></tr><tr><td>xSyncAggregator</td><td><a href="https://etherscan.io/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5">0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5</a></td></tr><tr><td>Supervisor</td><td><a href="https://etherscan.io/address/0xa137C5956D42210D62E7F96ADfead48E90Defb25">0xa137C5956D42210D62E7F96ADfead48E90Defb25</a></td></tr></tbody></table>

## yBridge Addresses

| **Contract**         | **Address**                                                                                                           |
| -------------------- | --------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x4315f344a905dC21a08189A117eFd6E1fcA37D57](https://etherscan.io/address/0x4315f344a905dC21a08189A117eFd6E1fcA37D57) |
| Supervisor (YBridge) | [0x778C974568e376146dbC64fF12aD55B2d1c4133f](https://etherscan.io/address/0x778C974568e376146dbC64fF12aD55B2d1c4133f) |
| USDT YBridgeVault    | [0x8e921191a9dc6832C1c360C7c7B019eFB7c29B2d](https://etherscan.io/address/0x8e921191a9dc6832C1c360C7c7B019eFB7c29B2d) |
| xyUSDT               | [0x3243278E0F93cD6F88FC918E0714baF7169AFaB8](https://etherscan.io/address/0x3243278E0F93cD6F88FC918E0714baF7169AFaB8) |
| USDC YBridgeVault    | [0xdD8B0995Cc92c7377c7bce2A097EC70f45A192D5](https://etherscan.io/address/0xdD8B0995Cc92c7377c7bce2A097EC70f45A192D5) |
| xyUSDC               | [0x2f6Ccc4a900Ee42f822892b8c024aAA08af89701](https://etherscan.io/address/0x2f6Ccc4a900Ee42f822892b8c024aAA08af89701) |
| ETH YBridgeVault     | [0x57eA46759fed1B47C200a9859e576239A941df76](https://etherscan.io/address/0x57eA46759fed1B47C200a9859e576239A941df76) |
| xyETH                | [0x60c779b8348c0a0517F8e2B0489a88CeaF87822F](https://etherscan.io/address/0x60c779b8348c0a0517F8e2B0489a88CeaF87822F) |
| Gas Price Consumer   | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://etherscan.io/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$XY Bridge</td><td><a href="https://etherscan.io/address/0x7fE09D2310A647c7C5043daE2053ff86956cE952">0x7fE09D2310A647c7C5043daE2053ff86956cE952</a></td></tr><tr><td>$NUM Bridge</td><td><a href="https://etherscan.io/address/0x64d17beaE666cC435B9d40a21f058b379b2a0194">0x64d17beaE666cC435B9d40a21f058b379b2a0194</a></td></tr><tr><td>$LOOT Bridge</td><td><a href="https://etherscan.io/address/0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c">0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c</a></td></tr><tr><td>$eYe Bridge</td><td><a href="https://etherscan.io/address/0xF0052C0B4F08078846aF48FE8C7bb365c9937c21">0xF0052C0B4F08078846aF48FE8C7bb365c9937c21</a></td></tr><tr><td>$PEPE Bridge</td><td><a href="https://etherscan.io/address/0x4F19699cb57543B76167b7d38040f34db4d11fEC">0x4F19699cb57543B76167b7d38040f34db4d11fEC</a></td></tr><tr><td>$Mog Bridge</td><td><a href="https://etherscan.io/address/0x0790eF241DC85Adf32998aae5E5738579c417701">0x0790eF241DC85Adf32998aae5E5738579c417701</a></td></tr><tr><td>$BITCOIN Bridge</td><td><a href="https://etherscan.io/address/0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2">0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2</a></td></tr></tbody></table>

## XY Refuel

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>XY Refuel</td><td><a href="https://etherscan.io/address/0x6829Bb7eDD1360255b7fC6AEcbbAc029f47fEeb3">0x6829Bb7eDD1360255b7fC6AEcbbAc029f47fEeb3</a></td></tr></tbody></table>

## XY Dispatcher Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>XY Dispatcher</td><td><a href="https://etherscan.io/address/0x7268BCF71aFE37818cB2dEb609F62dB164131090">0x7268BCF71aFE37818cB2dEb609F62dB164131090</a></td></tr></tbody></table>


# BNB Chain (chain id : 56)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                          |
| --------------- | -------------------------------------------------------------------------------------------------------------------- |
| XY Token (BNB)  | [0x666666661f9B6D8c581602AAa2f76cbead06C401](https://bscscan.com/address/0x666666661f9B6D8c581602AAa2f76cbead06C401) |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://bscscan.com/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x2b6cbBfcFdD785Db1460513dcF7A55f31D3E31B5](https://bscscan.com/address/0x2b6cbBfcFdD785Db1460513dcF7A55f31D3E31B5) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                          |
| -------------------- | -------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x7D26F09d4e2d032Efa0729fC31a4c2Db8a2394b1](https://bscscan.com/address/0x7d26f09d4e2d032efa0729fc31a4c2db8a2394b1) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://bscscan.com/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| USDT YBridgeVault    | [0xD195070107d853e55Dad9A2e6e7E970c400E67b8](https://bscscan.com/address/0xD195070107d853e55Dad9A2e6e7E970c400E67b8) |
| xyUSDT               | [0x8e921191a9dc6832C1c360C7c7B019eFB7c29B2d](https://bscscan.com/address/0x8e921191a9dc6832C1c360C7c7B019eFB7c29B2d) |
| USDC YBridgeVault    | [0x27C12BCb4538b12fdf29AcB968B71dF7867b3F64](https://bscscan.com/address/0x27C12BCb4538b12fdf29AcB968B71dF7867b3F64) |
| xyUSDC               | [0x2E6B9f6c8F5dc0d750F79Fbd91Dd8412F3458661](https://bscscan.com/address/0x2E6B9f6c8F5dc0d750F79Fbd91Dd8412F3458661) |
| ETH YBridgeVault     | [0xa0ffc7eDB9DAa9C0831Cdf35b658e767ace33939](https://bscscan.com/address/0xa0ffc7eDB9DAa9C0831Cdf35b658e767ace33939) |
| xyETH                | [0x57eA46759fed1B47C200a9859e576239A941df76](https://bscscan.com/address/0x57eA46759fed1B47C200a9859e576239A941df76) |
| Gas Price Consumer   | [0x778C974568e376146dbC64fF12aD55B2d1c4133f](https://bscscan.com/address/0x778C974568e376146dbC64fF12aD55B2d1c4133f) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$XY Bridge</td><td><a href="https://bscscan.com/address/0x824e9e833167232bCf5e505038dd15b0F9BB1026">0x824e9e833167232bCf5e505038dd15b0F9BB1026</a></td></tr><tr><td>$eYe Bridge</td><td><a href="https://bscscan.com/address/0x824e9e833167232bCf5e505038dd15b0F9BB1026">0x824e9e833167232bCf5e505038dd15b0F9BB1026</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| Contract      | Address                                                                                                              |
| ------------- | -------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0xe50C544189a9528204Ca39B987b722e724e25834](https://bscscan.com/address/0xe50C544189a9528204Ca39B987b722e724e25834) |


# Polygon (chain id : 137)

## Aggregator (swap & Bridge) Addresses

| **Contract**       | **Address**                                                                                                              |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| XY Token (Polygon) | [0x55555555A687343C6Ce28C8E1F6641dc71659fAd](https://polygonscan.com/address/0x55555555A687343C6Ce28C8E1F6641dc71659fAd) |
| xSyncAggregator    | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://polygonscan.com/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor         | [0x18bCf8D776F5546fd56C03C1fbCa6492541611B2](https://polygonscan.com/address/0x18bCf8D776F5546fd56C03C1fbCa6492541611B2) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                              |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| YBridge              | [0x0c988b66EdEf267D04f100A879db86cdb7B9A34F](https://polygonscan.com/address/0x0c988b66EdEf267D04f100A879db86cdb7B9A34F) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://polygonscan.com/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| USDT YBridgeVault    | [0x3243278E0F93cD6F88FC918E0714baF7169AFaB8](https://polygonscan.com/address/0x3243278E0F93cD6F88FC918E0714baF7169AFaB8) |
| xyUSDT               | [0xE7508dC910bcA06108a9bc6853eCe57DDD98d975](https://polygonscan.com/address/0xE7508dC910bcA06108a9bc6853eCe57DDD98d975) |
| USDC YBridgeVault    | [0xf4137e5D07b476e5A30f907C3e31F9FAAB00716b](https://polygonscan.com/address/0xf4137e5D07b476e5A30f907C3e31F9FAAB00716b) |
| xyUSDC               | [0xfE56793f6D7f93fE44B7A290a92b4320A9198f24](https://polygonscan.com/address/0xfE56793f6D7f93fE44B7A290a92b4320A9198f24) |
| ETH YBridgeVault     | [0x29d91854B1eE21604119ddc02e4e3690b9100017](https://polygonscan.com/address/0x29d91854B1eE21604119ddc02e4e3690b9100017) |
| xyETH                | [0xFbe19956395baE1065206255bC333E493702f221](https://polygonscan.com/address/0xFbe19956395baE1065206255bC333E493702f221) |
| Gas Price Consumer   | [0x778C974568e376146dbC64fF12aD55B2d1c4133f](https://polygonscan.com/address/0x778C974568e376146dbC64fF12aD55B2d1c4133f) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$XY Bridge</td><td><a href="https://polygonscan.com/address/0xB107AD9CF74f7E23D58147bCe3d9A7069a460CF3">0xB107AD9CF74f7E23D58147bCe3d9A7069a460CF3</a></td></tr><tr><td>$AutoS Bridge</td><td><a href="https://polygonscan.com/address/0xF98bfE69d069B40668D4F6aaeA22E73d1DC21A93">0xF98bfE69d069B40668D4F6aaeA22E73d1DC21A93</a></td></tr><tr><td>$BLU Bridge</td><td><a href="https://polygonscan.com/address/0x7C1C974367Ee28D3d7aBb088f5FCd748B3759EA4">0x7C1C974367Ee28D3d7aBb088f5FCd748B3759EA4</a></td></tr><tr><td>$CANDY Bridge</td><td><a href="https://polygonscan.com/address/0x5Bd40e579Cb7D37784689044E6C7c333E2E300e6">0x5Bd40e579Cb7D37784689044E6C7c333E2E300e6</a></td></tr><tr><td>$LLT Bridge</td><td><a href="https://polygonscan.com/address/0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2">0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| XY Dispatcher | [0x62bb13464AF3A502aa894890b390C2be68e7eD90](https://polygonscan.com/address/0x62bb13464AF3A502aa894890b390C2be68e7eD90) |


# Cronos (chain id : 25)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                            |
| --------------- | ---------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://cronoscan.com/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x82113e4F8BB149eD0FdF44b19dE2E1A88B24C843](https://cronoscan.com/address/0x82113e4F8BB149eD0FdF44b19dE2E1A88B24C843) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                            |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0xF103b5B479d2A629F422C42bb35E7eEceE1ad55E](https://cronoscan.com/address/0xF103b5B479d2A629F422C42bb35E7eEceE1ad55E) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://cronoscan.com/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| USDT YBridgeVault    | [0x74A0EEA77e342323aA463098e959612d3Fe6E686](https://cronoscan.com/address/0x74A0EEA77e342323aA463098e959612d3Fe6E686) |
| xyUSDT               | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://cronoscan.com/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |
| USDC YBridgeVault    | [0x44a54941E572C526a599B0ebe27A14A5BF159333](https://cronoscan.com/address/0x44a54941E572C526a599B0ebe27A14A5BF159333) |
| xyUSDC               | [0xFDf54F6F232Dd5a6DaF067628Ba045A1B5a6724D](https://cronoscan.com/address/0xFDf54F6F232Dd5a6DaF067628Ba045A1B5a6724D) |
| ETH YBridgeVault     | [0x8266B0c8eF1d70cC4b04F8E8F7508256c0E1200f](https://cronoscan.com/address/0x8266B0c8eF1d70cC4b04F8E8F7508256c0E1200f) |
| xyETH                | [0xEf367cdB37Ce3F43130fB9651d3db8fBF6045c87](https://cronoscan.com/address/0xEf367cdB37Ce3F43130fB9651d3db8fBF6045c87) |
| Gas Price Consumer   | [0x778C974568e376146dbC64fF12aD55B2d1c4133f](https://cronoscan.com/address/0x778C974568e376146dbC64fF12aD55B2d1c4133f) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$AutoS Bridge</td><td><a href="https://cronoscan.com/address/0x58F29F7d759aef5B8e34C8e4152d6117893017aB">0x58F29F7d759aef5B8e34C8e4152d6117893017aB</a></td></tr><tr><td>$SINGLE Bridge</td><td><a href="https://cronoscan.com/address/0x9A4cC214782Fea5880394eFDE60187797a2FEF01">0x9A4cC214782Fea5880394eFDE60187797a2FEF01</a></td></tr><tr><td>$BLU Bridge</td><td><a href="https://cronoscan.com/address/0x184cE49FdE76D4394795C76A91935862B7c30102">0x184cE49FdE76D4394795C76A91935862B7c30102</a></td></tr><tr><td>$CANDY Bridge</td><td><a href="https://cronoscan.com/address/0x85e363569531699EaEd1c1AC590d9f442A1299BA">0x85e363569531699EaEd1c1AC590d9f442A1299BA</a></td></tr><tr><td>$DBC Bridge</td><td><a href="https://cronoscan.com/address/0xD99995b63F44fc500B702251262B7d9f35adA0BC">0xD99995b63F44fc500B702251262B7d9f35adA0BC</a></td></tr><tr><td>$DBF Bridge</td><td><a href="https://cronoscan.com/address/0xEC8476DCC72b4AB6Cbc3C2bD7f50A15891485fDB">0xEC8476DCC72b4AB6Cbc3C2bD7f50A15891485fDB</a></td></tr><tr><td>$DBX Bridge</td><td><a href="https://cronoscan.com/address/0x812e9eE2437a3e4FE0A4A4A7f195536844301f07">0x812e9eE2437a3e4FE0A4A4A7f195536844301f07</a></td></tr><tr><td>$LLT Bridge</td><td><a href="https://cronoscan.com/address/0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2">0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2</a></td></tr><tr><td>$RIP Bridge</td><td><a href="https://cronoscan.com/address/0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80">0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                            |
| ------------- | ---------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x3A459695D49cD6B9637bC85B7ebbb04c5c3038c0](https://cronoscan.com/address/0x3A459695D49cD6B9637bC85B7ebbb04c5c3038c0) |


# Avalanche (chain id : 43144)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://snowtrace.io/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0xea7ED165b8d7d16f729BEf2c806d6d870B16390b](https://snowtrace.io/address/0xea7ed165b8d7d16f729bef2c806d6d870b16390b) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                           |
| -------------------- | --------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x2C86f0FF75673D489b7D72D9986929a2b0Ed596C](https://snowtrace.io/address/0x2C86f0FF75673D489b7D72D9986929a2b0Ed596C) |
| Supervisor (YBridge) | [0xFDf54F6F232Dd5a6DaF067628Ba045A1B5a6724D](https://snowtrace.io/address/0xFDf54F6F232Dd5a6DaF067628Ba045A1B5a6724D) |
| USDT YBridgeVault    | [0x3D2d1ce29B8bC997733D318170B68E63150C6586](https://snowtrace.io/address/0x3D2d1ce29B8bC997733D318170B68E63150C6586) |
| xyUSDT               | [0x7DE7B07c9FF24A35C70FeA573d429d6223c3F8b0](https://snowtrace.io/address/0x7DE7B07c9FF24A35C70FeA573d429d6223c3F8b0) |
| USDC YBridgeVault    | [0x21ae3E63E06D80c69b09d967d88eD9a98c07b4e4](https://snowtrace.io/address/0x21ae3E63E06D80c69b09d967d88eD9a98c07b4e4) |
| xyUSDC               | [0x19f51343E120151130878D5271b2327ccC19c0Ea](https://snowtrace.io/address/0x19f51343E120151130878D5271b2327ccC19c0Ea) |
| ETH YBridgeVault     | [0xEFaaf68a9a8b7D93bb15D29c8B77FCe87Fcc91b8](https://snowtrace.io/address/0xEFaaf68a9a8b7D93bb15D29c8B77FCe87Fcc91b8) |
| xyETH                | [0xde6146A0B751c31eA73A4E51300b6c8A8BF6D798](https://snowtrace.io/address/0xde6146A0B751c31eA73A4E51300b6c8A8BF6D798) |
| Gas Price Consumer   | [0x44a54941E572C526a599B0ebe27A14A5BF159333](https://snowtrace.io/address/0x44a54941E572C526a599B0ebe27A14A5BF159333) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                           |
| ------------- | --------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0xb64292e86990184381B1C117D6EDf1CbD3D0ef73](https://snowtrace.io/address/0xb64292e86990184381B1C117D6EDf1CbD3D0ef73) |


# Kucoin Community Chain (chain id : 321)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                          |
| --------------- | -------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://scan.kcc.io/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0xa0ffc7eDB9DAa9C0831Cdf35b658e767ace33939](https://scan.kcc.io/address/0xa0ffc7eDB9DAa9C0831Cdf35b658e767ace33939) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                                 |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x7e803b54295Cd113Bf48E7f069f0531575DA1139](https://scan.kcc.io/address/0x7e803b54295Cd113Bf48E7f069f0531575DA1139)        |
| Supervisor (YBridge) | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://explorer.kcc.io/en/address/0x50a64d05bb8618d8d96a83cbbb12b3044ec3489a) |
| USDT YBridgeVault    | [0xF526EFc174b512e66243Cb52524C1BE720144e8d](https://explorer.kcc.io/en/address/0xf526efc174b512e66243cb52524c1be720144e8d) |
| xyUSDT               | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://explorer.kcc.io/en/address/0x3689d3b912d4d73ffcaad3a80861e7caf2d4f049) |
| USDC YBridgeVault    | [0xa274931559Fb054bF60e0C44355D3558bB8bC2E6](https://explorer.kcc.io/en/address/0xa274931559fb054bf60e0c44355d3558bb8bc2e6) |
| xyUSDC               | [0x3D2d1ce29B8bC997733D318170B68E63150C6586](https://explorer.kcc.io/en/address/0x3d2d1ce29b8bc997733d318170b68e63150c6586) |
| Gas Price Consumer   | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://explorer.kcc.io/en/address/0x73ce60416035b8d7019f6399778c14ccf5c9c7a1) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                          |
| ------------- | -------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://scan.kcc.io/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |


# Arbitrum (chain id : 42161)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                          |
| --------------- | -------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://arbiscan.io/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0xD63eFa536e5eb73E22711bdACee7Fd9587E5BDEf](https://arbiscan.io/address/0xD63eFa536e5eb73E22711bdACee7Fd9587E5BDEf) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                          |
| -------------------- | -------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x33383265290421C704c6b09F4BF27ce574DC4203](https://arbiscan.io/address/0x33383265290421C704c6b09F4BF27ce574DC4203) |
| Supervisor (YBridge) | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://arbiscan.io/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |
| USDT YBridgeVault    | [0x7a483730AD5a845ED2962c49DE38Be1661D47341](https://arbiscan.io/address/0x7a483730AD5a845ED2962c49DE38Be1661D47341) |
| xyUSDT               | [0xA5Cb30E5d30A9843B6481fFd8D8D35DDED3a3251](https://arbiscan.io/address/0xA5Cb30E5d30A9843B6481fFd8D8D35DDED3a3251) |
| USDC YBridgeVault    | [0x680ab543ACd0e52035E9d409014dd57861FA1eDf](https://arbiscan.io/address/0x680ab543ACd0e52035E9d409014dd57861FA1eDf) |
| xyUSDC               | [0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab](https://arbiscan.io/address/0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab) |
| ETH YBridgeVault     | [0xd1ae4594E47C153ae98F09E0C9267FB74447FEa3](https://arbiscan.io/address/0xd1ae4594E47C153ae98F09E0C9267FB74447FEa3) |
| xyETH                | [0xeAe1BB0B635F6615e0B61c1Cd93d30f0CF93A96E](https://arbiscan.io/address/0xeAe1BB0B635F6615e0B61c1Cd93d30f0CF93A96E) |
| Gas Price Consumer   | [0xF526EFc174b512e66243Cb52524C1BE720144e8d](https://arbiscan.io/address/0xF526EFc174b512e66243Cb52524C1BE720144e8d) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$DBC Bridge</td><td><a href="https://arbiscan.io/address/0x98b5067949e0821a52Ec2aC9A3BaaCc9b315ec21">0x98b5067949e0821a52Ec2aC9A3BaaCc9b315ec21</a></td></tr><tr><td>$DBF Bridge</td><td><a href="https://arbiscan.io/address/0xa1fB1F1E5382844Ee2D1BD69Ef07D5A6Abcbd388">0xa1fB1F1E5382844Ee2D1BD69Ef07D5A6Abcbd388</a></td></tr><tr><td>$DBX Bridge</td><td><a href="https://arbiscan.io/address/0x156C04ca75f11817DdbF887692990F3E46e8982B">0x156C04ca75f11817DdbF887692990F3E46e8982B</a></td></tr></tbody></table>

## XY Refuel

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>XY Refuel</td><td><a href="https://arbiscan.io/address/0x6829Bb7eDD1360255b7fC6AEcbbAc029f47fEeb3">0x6829Bb7eDD1360255b7fC6AEcbbAc029f47fEeb3</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                          |
| ------------- | -------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://arbiscan.io/address/0x3689d3b912d4d73ffcaad3a80861e7caf2d4f049) |


# Optimism (chain id : 10)

## Aggregator (swap & Bridge) Addresses

| Contract        | Address                                                                                                                          |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://optimistic.etherscan.io/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x40b4bfAF1bFAF8451e04fAfE1C2A48a6B2A71744](https://optimistic.etherscan.io/address/0x40b4bfaf1bfaf8451e04fafe1c2a48a6b2a71744) |

## yBridge Addresses

| Contract             | Address                                                                                                                          |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x7a6e01880693093abACcF442fcbED9E0435f1030](https://optimistic.etherscan.io/address/0x7a6e01880693093abACcF442fcbED9E0435f1030) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://optimistic.etherscan.io/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| USDT YBridgeVault    | [0xF526EFc174b512e66243Cb52524C1BE720144e8d](https://optimistic.etherscan.io/address/0xF526EFc174b512e66243Cb52524C1BE720144e8d) |
| xyUSDT               | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://optimistic.etherscan.io/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049) |
| USDC YBridgeVault    | [0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab](https://optimistic.etherscan.io/address/0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab) |
| xyUSDC               | [0xa274931559Fb054bF60e0C44355D3558bB8bC2E6](https://optimistic.etherscan.io/address/0xa274931559Fb054bF60e0C44355D3558bB8bC2E6) |
| ETH YBridgeVault     | [0x91474Fe836BBBe63EF72De2846244928860Bce1B](https://optimistic.etherscan.io/address/0x91474Fe836BBBe63EF72De2846244928860Bce1B) |
| xyETH                | [0xE2E785E3fcB00F3d2f5E01291E7741635c54F140](https://optimistic.etherscan.io/address/0xE2E785E3fcB00F3d2f5E01291E7741635c54F140) |
| Gas Price Consumer   | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://optimistic.etherscan.io/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |

## XY Dispatcher Addresses

| Contract      | Address                                                                                                                          |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://optimistic.etherscan.io/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |


# Astar (chain id : 592)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                               |
| --------------- | ------------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://astar.subscan.io/account/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x6b6973B2CeB54047ff226AB261962d9729B095f3](https://astar.subscan.io/account/0x6b6973B2CeB54047ff226AB261962d9729B095f3) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                                                |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| YBridge              | [0x5C6C12Fd8b1f7E60E5B60512712cFbE0192E795E](https://blockscout.com/astar/address/0x5C6C12Fd8b1f7E60E5B60512712cFbE0192E795E)              |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://blockscout.com/astar/address/0x1B0789910027c3CC58af2391de7228d973c5C46E/transactions) |
| USDT YBridgeVault    | [0xF526EFc174b512e66243Cb52524C1BE720144e8d](https://blockscout.com/astar/address/0xF526EFc174b512e66243Cb52524C1BE720144e8d/transactions) |
| xyUSDT               | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://blockscout.com/astar/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049/transactions) |
| USDC YBridgeVault    | [0xD236639F5B00BC6711aC799bac5AceaF788b2Aa3](https://blockscout.com/astar/address/0xD236639F5B00BC6711aC799bac5AceaF788b2Aa3/transactions) |
| xyUSDC               | [0xAF34d9afB101957FB44C218e0d86D78C8aD02BA5](https://blockscout.com/astar/address/0xAF34d9afB101957FB44C218e0d86D78C8aD02BA5/transactions) |
| Gas Price Consumer   | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://blockscout.com/astar/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1/transactions) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                   |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://blockscout.com/astar/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |


# Kaia (chain id : 8217)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                                                      |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://kaiascope.com/account/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5?tabId=approvals\&sub=kip7) |
| Supervisor      | [0x915e09aaA8262f685b7b4df64C69036B7f7Bbe1E](https://scope.klaytn.com/account/0x915e09aaA8262f685b7b4df64C69036B7f7Bbe1E?tabId=internalTx)       |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                                                |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| YBridge              | [0x52075Fd1fF67f03beABCb5AcdA9679b02d98cA37](https://scope.klaytn.com/account/0x52075Fd1fF67f03beABCb5AcdA9679b02d98cA37?tabId=txList)     |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://scope.klaytn.com/account/0x1B0789910027c3CC58af2391de7228d973c5C46E?tabId=internalTx) |
| USDT YBridgeVault    | [0xF526EFc174b512e66243Cb52524C1BE720144e8d](https://scope.klaytn.com/account/0xF526EFc174b512e66243Cb52524C1BE720144e8d?tabId=txList)     |
| xyUSDT               | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://scope.klaytn.com/account/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049?tabId=txList)     |
| USDC YBridgeVault    | [0xB238d4339a44f93aBCF4071A9bB0f55D2403Fd84](https://scope.klaytn.com/account/0xB238d4339a44f93aBCF4071A9bB0f55D2403Fd84?tabId=txList)     |
| xyUSDC               | [0xD236639F5B00BC6711aC799bac5AceaF788b2Aa3](https://scope.klaytn.com/account/0xD236639F5B00BC6711aC799bac5AceaF788b2Aa3?tabId=txList)     |
| Gas Price Consumer   | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://scope.klaytn.com/account/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1?tabId=txList)     |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                                |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| XY Dispatcher | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://scope.klaytn.com/account/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A?tabId=internalTx) |


# zkSync Era (chain id : 324)

## Aggregator (swap & Bridge) Addresses

<table data-header-hidden><thead><tr><th width="395">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>xSyncAggregator</td><td><a href="https://explorer.zksync.io/address/0xfA995b6540cBBe2beCC00f00D5B8Ce73523D1b51">0xfA995b6540cBBe2beCC00f00D5B8Ce73523D1b51</a></td></tr><tr><td>Supervisor</td><td><a href="https://explorer.zksync.io/address/0xC81Dc052661785c5a304EBB2c4BcEAdCFB79a675">0xC81Dc052661785c5a304EBB2c4BcEAdCFB79a675</a></td></tr></tbody></table>

## yBridge Addresses

| **Contract**         | **Address**                                                                                                                 |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0xe4e156167cc9C7AC4AbD8d39d203a5495F775547](https://explorer.zksync.io/address/0xe4e156167cc9C7AC4AbD8d39d203a5495F775547) |
| Supervisor (YBridge) | [0x9E52c2bD0177404dCA3E122992a7fc0bCb15FD95](https://explorer.zksync.io/address/0x9E52c2bD0177404dCA3E122992a7fc0bCb15FD95) |
| USDC YBridgeVault    | [0x75167284361c8D61Be7E4402f4953e2b112233cb](https://explorer.zksync.io/address/0x75167284361c8D61Be7E4402f4953e2b112233cb) |
| xyUSDC               | [0xDF4700DACcbfb097204576CbbB4728D4f190FDC1](https://explorer.zksync.io/address/0xDF4700DACcbfb097204576CbbB4728D4f190FDC1) |
| ETH YBridgeVault     | [0x935283A00FBF8E40fd2f8C432A488F6ADDC8dB67](https://explorer.zksync.io/address/0x935283A00FBF8E40fd2f8C432A488F6ADDC8dB67) |
| xyETH                | [0xAa0b0654E79E17332d983E2351bD926cE336B9BD](https://explorer.zksync.io/address/0xAa0b0654E79E17332d983E2351bD926cE336B9BD) |
| Gas Price Consumer   | [0xAda6A5c2ddf499b50EFced4c489a90B707693aC5](https://explorer.zksync.io/address/0xAda6A5c2ddf499b50EFced4c489a90B707693aC5) |

## XY Refuel

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>XY Refuel</td><td><a href="https://era.zksync.network/address/0x567e78308AC93176a897a4DAd6AA3d2AbB5A9477">0x567e78308AC93176a897a4DAd6AA3d2AbB5A9477</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                 |
| ------------- | --------------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x936fef4245f281ED4f2eE303060A8656399dCc32](https://explorer.zksync.io/address/0x936fef4245f281ED4f2eE303060A8656399dCc32) |


# Polygon zkEVM ( chainid : 1101)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                                    |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://zkevm.polygonscan.com/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0xD44eaEe2faab329713De13D5fdafAFdfE6DA5004](https://zkevm.polygonscan.com/address/0xD44eaEe2faab329713De13D5fdafAFdfE6DA5004) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                                    |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| YBridge              | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://zkevm.polygonscan.com/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049) |
| Supervisor (YBridge) | [0x778C974568e376146dbC64fF12aD55B2d1c4133f](https://zkevm.polygonscan.com/address/0x778C974568e376146dbC64fF12aD55B2d1c4133f) |
| USDC YBridgeVault    | [0x1acCfC3a45313f8F862BE7fbe9aB25f20A93d598](https://zkevm.polygonscan.com/address/0x1acCfC3a45313f8F862BE7fbe9aB25f20A93d598) |
| xyUSDC               | [0xF526EFc174b512e66243Cb52524C1BE720144e8d](https://zkevm.polygonscan.com/address/0xF526EFc174b512e66243Cb52524C1BE720144e8d) |
| ETH YBridgeVault     | [0x9fE77412aA5c6Ba67fF3095bBc534884F9a61a38](https://zkevm.polygonscan.com/address/0x9fE77412aA5c6Ba67fF3095bBc534884F9a61a38) |
| xyETH                | [0xa65755a01ef7c3d6D3f76C28B30103F2073E5D35](https://zkevm.polygonscan.com/address/0xa65755a01ef7c3d6D3f76C28B30103F2073E5D35) |
| Gas Price Consumer   | [0x74A0EEA77e342323aA463098e959612d3Fe6E686](https://zkevm.polygonscan.com/address/0x74A0EEA77e342323aA463098e959612d3Fe6E686) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| XY Dispatcher | [0xD0C119a5eA32D3Bf0a86B30d8ce08A792971f75b](https://zkevm.polygonscan.com/address/0xD0C119a5eA32D3Bf0a86B30d8ce08A792971f75b) |


# Linea (chain id : 59144)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                              |
| --------------- | ------------------------------------------------------------------------------------------------------------------------ |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://lineascan.build/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0xC255563d3Bc3Ed7dBbb8EaE076690497bfBf7Ef8](https://lineascan.build/address/0xC255563d3Bc3Ed7dBbb8EaE076690497bfBf7Ef8) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                              |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| YBridge              | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://lineascan.build/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://lineascan.build/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| ETH YBridgeVault     | [0xA5Cb30E5d30A9843B6481fFd8D8D35DDED3a3251](https://lineascan.build/address/0xA5Cb30E5d30A9843B6481fFd8D8D35DDED3a3251) |
| xyETH                | [0x74A0EEA77e342323aA463098e959612d3Fe6E686](https://lineascan.build/address/0x74A0EEA77e342323aA463098e959612d3Fe6E686) |
| USDC YBridgeVault    | [0x9d90CFa17f3AFceE2505B3e9D75113e6f5c9E843](https://lineascan.build/address/0x9d90CFa17f3AFceE2505B3e9D75113e6f5c9E843) |
| xyUSDC               | [0x01192De6b7f94B77adbCf588D89eca93F3a15600](https://lineascan.build/token/0x01192De6b7f94B77adbCf588D89eca93F3a15600)   |
| Gas Price Consumer   | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://lineascan.build/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| XY Dispatcher | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://lineascan.build/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |


# Base (chain id : 8453)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://basescan.org/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://basescan.org/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                           |
| -------------------- | --------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://basescan.org/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://basescan.org/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| ETH YBridgeVault     | [0xD195070107d853e55Dad9A2e6e7E970c400E67b8](https://basescan.org/address/0xD195070107d853e55Dad9A2e6e7E970c400E67b8) |
| xyETH                | [0x8e921191a9dc6832C1c360C7c7B019eFB7c29B2d](https://basescan.org/address/0x8e921191a9dc6832C1c360C7c7B019eFB7c29B2d) |
| USDC YBridgeVault    | [0xA5Cb30E5d30A9843B6481fFd8D8D35DDED3a3251](https://basescan.org/address/0xA5Cb30E5d30A9843B6481fFd8D8D35DDED3a3251) |
| xyUSDC               | [0x74A0EEA77e342323aA463098e959612d3Fe6E686](https://basescan.org/address/0x74A0EEA77e342323aA463098e959612d3Fe6E686) |
| Gas Price Consumer   | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://basescan.org/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$LOOT Bridge</td><td><a href="https://basescan.org/address/0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2">0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2</a></td></tr><tr><td>$RIP Bridge</td><td><a href="https://basescan.org/address/0x0790eF241DC85Adf32998aae5E5738579c417701">0x0790eF241DC85Adf32998aae5E5738579c417701</a></td></tr><tr><td>$USDC Bridge</td><td><a href="https://basescan.org/address/0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80">0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80</a></td></tr><tr><td>$ETH Bridge</td><td><a href="https://basescan.org/address/0x4F19699cb57543B76167b7d38040f34db4d11fEC">0x4F19699cb57543B76167b7d38040f34db4d11fEC</a></td></tr></tbody></table>

## XY Refuel

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>XY Refuel</td><td><a href="https://basescan.org/address/0x6829bb7edd1360255b7fc6aecbbac029f47feeb3">0x6829Bb7eDD1360255b7fC6AEcbbAc029f47fEeb3</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                           |
| ------------- | --------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://basescan.org/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |


# Mantle ( chain id : 5000)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                                  |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://explorer.mantle.xyz/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x35D0a7b1336D4edf9364Ef8Bf5c1aba0E151b777](https://explorer.mantle.xyz/address/0x35D0a7b1336D4edf9364Ef8Bf5c1aba0E151b777) |

## yBridge Addresses

| **Contra**ct         | **Address**                                                                                                                  |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://explorer.mantle.xyz/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://explorer.mantle.xyz/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| USDT YBridgeVault    | [0x0241fb446d6793866245b936F2C3418F818bDcD3](https://explorer.mantle.xyz/address/0x0241fb446d6793866245b936F2C3418F818bDcD3) |
| xyUSDT               | [0x9fE77412aA5c6Ba67fF3095bBc534884F9a61a38](https://explorer.mantle.xyz/address/0x9fE77412aA5c6Ba67fF3095bBc534884F9a61a38) |
| USDC YBridgeVault    | [0xA5Cb30E5d30A9843B6481fFd8D8D35DDED3a3251](https://explorer.mantle.xyz/address/0xA5Cb30E5d30A9843B6481fFd8D8D35DDED3a3251) |
| xyUSDC               | [0x74A0EEA77e342323aA463098e959612d3Fe6E686](https://explorer.mantle.xyz/address/0x74A0EEA77e342323aA463098e959612d3Fe6E686) |
| ETH YBridgeVault     | [0xdD8B0995Cc92c7377c7bce2A097EC70f45A192D5](https://explorer.mantle.xyz/address/0xdD8B0995Cc92c7377c7bce2A097EC70f45A192D5) |
| xyETH                | [0x2f6Ccc4a900Ee42f822892b8c024aAA08af89701](https://explorer.mantle.xyz/address/0x2f6Ccc4a900Ee42f822892b8c024aAA08af89701) |
| Gas Price Consumer   | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://explorer.mantle.xyz/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$LOOT Bridge</td><td><a href="https://explorer.mantle.xyz/address/0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2">0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                  |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://explorer.mantle.xyz/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |


# Scroll (chain id : 534352 )

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                             |
| --------------- | ----------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://scrollscan.com/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x9d90CFa17f3AFceE2505B3e9D75113e6f5c9E843](https://scrollscan.com/address/0x9d90CFa17f3AFceE2505B3e9D75113e6f5c9E843) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                             |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x778C974568e376146dbC64fF12aD55B2d1c4133f](https://scrollscan.com/address/0x778C974568e376146dbC64fF12aD55B2d1c4133f) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://scrollscan.com/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| USDC YBridgeVault    | [0xF526EFc174b512e66243Cb52524C1BE720144e8d](https://scrollscan.com/address/0xF526EFc174b512e66243Cb52524C1BE720144e8d) |
| xyUSDC               | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://scrollscan.com/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049) |
| ETH YBridgeVault     | [0x0241fb446d6793866245b936F2C3418F818bDcD3](https://scrollscan.com/address/0x0241fb446d6793866245b936F2C3418F818bDcD3) |
| xyETH                | [0x9fE77412aA5c6Ba67fF3095bBc534884F9a61a38](https://scrollscan.com/address/0x9fE77412aA5c6Ba67fF3095bBc534884F9a61a38) |
| Gas Price Consumer   | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://scrollscan.com/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                             |
| ------------- | ----------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://scrollscan.com/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |


# Blast (chain id : 81457)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://blastscan.io/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://blastscan.io/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                           |
| -------------------- | --------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://blastscan.io/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |
| Supervisor (YBridge) | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://blastscan.io/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |
| ETH YBridgeVault     | [0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762](https://blastscan.io/address/0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762) |
| xyETH                | [0x2eA97dC35AC341DaC6ad80137Ef14d79b762804D](https://blastscan.io/address/0x2eA97dC35AC341DaC6ad80137Ef14d79b762804D) |
| Gas Price Consumer   | [0x60ca942675d0b0021927FE13425aBfAf612d320a](https://blastscan.io/address/0x60ca942675d0b0021927FE13425aBfAf612d320a) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$LOOT Bridge</td><td><a href="https://blastscan.io/address/0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c">0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                           |
| ------------- | --------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://blastscan.io/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |


# X Layer (chain id : 196)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                                               |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://www.okx.com/web3/explorer/xlayer/address/0xcf446713ddf0e83f7527a260047f8ae89efae3e5) |
| Supervisor      | [0x99D98e43eb8b0Ae2F07AE6718a2EC71fAcF5A632](https://www.okx.com/explorer/xlayer/address/0x99D98e43eb8b0Ae2F07AE6718a2EC71fAcF5A632)      |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                                          |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| YBridge              | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://www.okx.com/explorer/xlayer/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |
| Supervisor (YBridge) | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://www.okx.com/explorer/xlayer/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |
| ETH YBridgeVault     | [0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762](https://www.okx.com/explorer/xlayer/address/0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762) |
| xyETH                | [0x2eA97dC35AC341DaC6ad80137Ef14d79b762804D](https://www.okx.com/explorer/xlayer/address/0x2eA97dC35AC341DaC6ad80137Ef14d79b762804D) |
| USDT YBridgeVault    | [0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab](https://www.okx.com/explorer/xlayer/address/0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab) |
| xyUSDT               | [0xAF34d9afB101957FB44C218e0d86D78C8aD02BA5](https://www.okx.com/explorer/xlayer/address/0xAF34d9afB101957FB44C218e0d86D78C8aD02BA5) |
| Gas Price Consumer   | [0x60ca942675d0b0021927FE13425aBfAf612d320a](https://www.okx.com/explorer/xlayer/address/0x60ca942675d0b0021927FE13425aBfAf612d320a) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| XY Dispatcher | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://www.okx.com/explorer/xlayer/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |


# Taiko (chain id : 167000)

## Aggregator (swap & Bridge) Addresses

| **Contract**    | **Address**                                                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://taikoscan.io/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0xf4137e5D07b476e5A30f907C3e31F9FAAB00716b](https://taikoscan.io/address/0xf4137e5D07b476e5A30f907C3e31F9FAAB00716b) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                           |
| -------------------- | --------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://taikoscan.io/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |
| Supervisor (YBridge) | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://taikoscan.io/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |
| ETH YBridgeVault     | [0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762](https://taikoscan.io/address/0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762) |
| xyETH                | [0x2eA97dC35AC341DaC6ad80137Ef14d79b762804D](https://taikoscan.io/address/0x2eA97dC35AC341DaC6ad80137Ef14d79b762804D) |
| USDC YBridgeVault    | [0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab](https://taikoscan.io/address/0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab) |
| xyUSDC               | [0xAF34d9afB101957FB44C218e0d86D78C8aD02BA5](https://taikoscan.io/address/0xAF34d9afB101957FB44C218e0d86D78C8aD02BA5) |
| Gas Price Consumer   | [0x60ca942675d0b0021927FE13425aBfAf612d320a](https://taikoscan.io/address/0x60ca942675d0b0021927FE13425aBfAf612d320a) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                           |
| ------------- | --------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://taikoscan.io/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |


# Cronos zkEVM (chain id : 388)

## XY Router Addresses

| **Contract**    | **Address**                                                                                                                        |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0x936fef4245f281ED4f2eE303060A8656399dCc32](https://explorer.zkevm.cronos.org/address/0x936fef4245f281ed4f2ee303060a8656399dcc32) |
| Supervisor      | [0x935283A00FBF8E40fd2f8C432A488F6ADDC8dB67](https://explorer.zkevm.cronos.org/address/0x935283A00FBF8E40fd2f8C432A488F6ADDC8dB67) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                                        |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0xE22747472A565e96D0867741811193895b9538f2](https://explorer.zkevm.cronos.org/address/0xE22747472A565e96D0867741811193895b9538f2) |
| Supervisor (YBridge) | [0x9E52c2bD0177404dCA3E122992a7fc0bCb15FD95](https://explorer.zkevm.cronos.org/address/0x9E52c2bD0177404dCA3E122992a7fc0bCb15FD95) |
| ETH YBridgeVault     | [0xAa0b0654E79E17332d983E2351bD926cE336B9BD](https://explorer.zkevm.cronos.org/address/0xAa0b0654E79E17332d983E2351bD926cE336B9BD) |
| xyETH                | [0xe4e156167cc9C7AC4AbD8d39d203a5495F775547](https://explorer.zkevm.cronos.org/address/0xe4e156167cc9C7AC4AbD8d39d203a5495F775547) |
| Gas Price Consumer   | [0x1C903b297456c017F034C4B0a04948B80cb14EcE](https://explorer.zkevm.cronos.org/address/0x1C903b297456c017F034C4B0a04948B80cb14EcE) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                        |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0x90bF3Ac9e205Ff8583661e69874407d0110c8d6F](https://explorer.zkevm.cronos.org/address/0x90bF3Ac9e205Ff8583661e69874407d0110c8d6F) |


# Abstract (chain id : 2741)

## XY Router Addresses

| **Contract**    | **Address**                                                                                                         |
| --------------- | ------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xe832F2De733d899053B36A2d9466B1f837F0b9bc](https://abscan.org/address/0xe832F2De733d899053B36A2d9466B1f837F0b9bc) |
| Supervisor      | [0x9E52c2bD0177404dCA3E122992a7fc0bCb15FD95](https://abscan.org/address/0x9E52c2bD0177404dCA3E122992a7fc0bCb15FD95) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0xe4e156167cc9C7AC4AbD8d39d203a5495F775547](https://abscan.org/address/0xe4e156167cc9C7AC4AbD8d39d203a5495F775547) |
| Supervisor (YBridge) | [0x9E52c2bD0177404dCA3E122992a7fc0bCb15FD95](https://abscan.org/address/0x9E52c2bD0177404dCA3E122992a7fc0bCb15FD95) |
| ETH YBridgeVault     | [0x1C903b297456c017F034C4B0a04948B80cb14EcE](https://abscan.org/address/0x1C903b297456c017F034C4B0a04948B80cb14EcE) |
| xyETH                | [0x8DbE1651AAbcA5FEDBe8Fd3074dFd8F465b694E4](https://abscan.org/address/0x8DbE1651AAbcA5FEDBe8Fd3074dFd8F465b694E4) |
| USDC YBridgeVault    | [0xAa0b0654E79E17332d983E2351bD926cE336B9BD](https://abscan.org/address/0xAa0b0654E79E17332d983E2351bD926cE336B9BD) |
| xyUSDC               | [0x90bF3Ac9e205Ff8583661e69874407d0110c8d6F](https://abscan.org/address/0x90bF3Ac9e205Ff8583661e69874407d0110c8d6F) |
| Gas Price Consumer   | [0x83529B846762d1146c251548a3D8E453c1d09424](https://abscan.org/address/0x83529B846762d1146c251548a3D8E453c1d09424) |

## XY Dispatcher Addresses

| **Contract**  | **Address** |
| ------------- | ----------- |
| XY Dispatcher | -           |


# Berachain (chain id : 80094)

## XY Router Addresses

| **Contract**    | **Address**                                                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://berascan.com/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x2e63a9e1f866AAffcca2c6BD1C0791208B78D721](https://berascan.com/address/0x2e63a9e1f866AAffcca2c6BD1C0791208B78D721) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                           |
| -------------------- | --------------------------------------------------------------------------------------------------------------------- |
| YBridge              | [0x2B188201A2b23Ab33fA8AA22e97426DEc34e6b94](https://berascan.com/address/0x2B188201A2b23Ab33fA8AA22e97426DEc34e6b94) |
| Supervisor (YBridge) | [0x2e63a9e1f866AAffcca2c6BD1C0791208B78D721](https://berascan.com/address/0x2e63a9e1f866AAffcca2c6BD1C0791208B78D721) |
| USDC YBridgeVault    | [0x2602c78391D87A615e8b6cbd761da41A9E89EDB4](https://berascan.com/address/0x2602c78391D87A615e8b6cbd761da41A9E89EDB4) |
| xyUSDC               | [0xABAF0f67e7935aF5a36126F76A31F8AbaFe5fb61](https://berascan.com/address/0xABAF0f67e7935aF5a36126F76A31F8AbaFe5fb61) |
| Gas Price Consumer   | [0x5188477b5F7f37Cb10cDd643b813405ce84129AD](https://berascan.com/address/0x5188477b5F7f37Cb10cDd643b813405ce84129AD) |

## XY Dispatcher Addresses

| **Contract**  | **Address** |
| ------------- | ----------- |
| XY Dispatcher | -           |


# Numbers (chain id : 10507)

## XY Router Addresses

| **Contract**    | **Address**                                                                                                                  |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| xSyncAggregator | [0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5](https://mainnet.num.network/address/0xCF446713DDf0E83F7527A260047f8Ae89eFaE3e5) |
| Supervisor      | [0x74A0EEA77e342323aA463098e959612d3Fe6E686](https://mainnet.num.network/address/0x74A0EEA77e342323aA463098e959612d3Fe6E686) |

## xAsset Bridge Addresses

| **Contract** | **Address**                                                                                                                  |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| $NUM Bridge  | [0x778C974568e376146dbC64fF12aD55B2d1c4133f](https://mainnet.num.network/address/0x778C974568e376146dbC64fF12aD55B2d1c4133f) |


# Treasury

## Treasury Addresses

<table data-header-hidden><thead><tr><th width="366">Option</th><th>Address</th></tr></thead><tbody><tr><td>Wallet Name</td><td>Address</td></tr><tr><td>Treasure (Scroll)</td><td>0xca9afe75205a5A1b83F593dE61b817bE48c7c306</td></tr><tr><td>Treasure (Arbtrum One)</td><td>0x4a4Cb50A1026D5C154eDcD4C3A664cc63a773d50</td></tr></tbody></table>


# （Suspended）Fantom

{% hint style="danger" %}
All services are suspended on Fantom.
{% endhint %}

## XY Router Addresses

| **Contract**                      | **Address**                                                                                                          |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| XY Router                         | [0x1E1a70eDb9cd26ccc05F01C66B882cef0E4f7d2D](https://ftmscan.com/address/0x1E1a70eDb9cd26ccc05F01C66B882cef0E4f7d2D) |
| XY Token (Fantom)                 | [0x444444443B0fcB2733b93F23C910580FBa52FFFA](https://ftmscan.com/address/0x444444443B0fcB2733b93F23C910580FBa52FFFA) |
| XYDexAggregatorAdaptor            | [0x6Ee1353fdCA167D15eEC9330921Dcd8a9a568557](https://ftmscan.com/address/0x6Ee1353fdCA167D15eEC9330921Dcd8a9a568557) |
| XYDexAggregatorAdaptorSingleChain | [0x0b1dC8Bba3BD93FcA8C05fae4a5807E984AAe3a6](https://ftmscan.com/address/0x0b1dC8Bba3BD93FcA8C05fae4a5807E984AAe3a6) |
| XYDexAggregator                   | [0x7A2C7b0c7C35b70218dA5725C27feBE0A331a8f2](https://ftmscan.com/address/0x7A2C7b0c7C35b70218dA5725C27feBE0A331a8f2) |
| Supervisor ( XY Router )          | [0xDF921bc47aa6eCdB278f8C259D6a7Fef5702f1A9](https://ftmscan.com/address/0xDF921bc47aa6eCdB278f8C259D6a7Fef5702f1A9) |

## yBridge Addresses

| **Contract**           | **Address**                                                                                                          |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------- |
| YBridge                | [0xDa241399697fa3F6cD496EdAFab6191498Ec37F5](https://ftmscan.com/address/0xDa241399697fa3F6cD496EdAFab6191498Ec37F5) |
| Supervisor ( YBridge ) | [0xe445FC44A267dfB02ea116ad43F6788e91df44C8](https://ftmscan.com/address/0xe445FC44A267dfB02ea116ad43F6788e91df44C8) |
| USDT YBridgeVault      | [0xC255563d3Bc3Ed7dBbb8EaE076690497bfBf7Ef8](https://ftmscan.com/address/0xC255563d3Bc3Ed7dBbb8EaE076690497bfBf7Ef8) |
| xyUSDT                 | [0xD9Ce145225ad2AE62739e44a68E167845485631f](https://ftmscan.com/address/0xD9Ce145225ad2AE62739e44a68E167845485631f) |
| USDC YBridgeVault      | [0x3A459695D49cD6B9637bC85B7ebbb04c5c3038c0](https://ftmscan.com/address/0x3A459695D49cD6B9637bC85B7ebbb04c5c3038c0) |
| xyUSDC                 | [0xdD8B0995Cc92c7377c7bce2A097EC70f45A192D5](https://ftmscan.com/address/0xdd8b0995cc92c7377c7bce2a097ec70f45a192d5) |
| ETH YBridgeVault       | [0x5146ba1f786D41ba1E876b5Fd3aA56bD516Ed273](https://ftmscan.com/address/0x5146ba1f786D41ba1E876b5Fd3aA56bD516Ed273) |
| xyETH                  | [0x7AeB6c52392A53Ecedf4aE99B363Ca8B71341ad7](https://ftmscan.com/address/0x7AeB6c52392A53Ecedf4aE99B363Ca8B71341ad7) |
| Gas Price Consumer     | [0xFDf54F6F232Dd5a6DaF067628Ba045A1B5a6724D](https://ftmscan.com/address/0xFDf54F6F232Dd5a6DaF067628Ba045A1B5a6724D) |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$XY Bridge</td><td><a href="https://ftmscan.com/address/0xEBC39E2e70d2589E8434cdF778BCCdD8EeB626f5">0xEBC39E2e70d2589E8434cdF778BCCdD8EeB626f5</a></td></tr><tr><td>$SINGLE Bridge</td><td><a href="https://ftmscan.com/address/0xe1C01c84EAc760389b2A080cfd6f3e874725c62a">0xe1C01c84EAc760389b2A080cfd6f3e874725c62a</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                          |
| ------------- | -------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0xc371981B6a7e23e2066A99ECEd92AF57891F5f65](https://ftmscan.com/address/0xc371981B6a7e23e2066A99ECEd92AF57891F5f65) |


# （Suspended）ThunderCore

{% hint style="danger" %}
All services are suspended on ThunderCore.
{% endhint %}

## XY Router Addresses

| **Contract**                      | **Address**                                                                                                                       |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| XY Router                         | [0xbF26ca7cf925e9EA0765c737B066253CF80e0E09](https://viewblock.io/thundercore/address/0xbf26ca7cf925e9ea0765c737b066253cf80e0e09) |
| XY Token (ThunderCore)            | [0x333333331193762b9dd5828fA91aFA40d8432B7A](https://scan.thundercore.com/address/0x333333331193762b9dd5828fA91aFA40d8432B7A)     |
| XYDexAggregatorAdaptor            | [0x24411099170128f533A9786F6dEFDDcEBc9cFE6E](https://viewblock.io/thundercore/address/0x24411099170128f533a9786f6defddcebc9cfe6e) |
| XYDexAggregatorAdaptorSingleChain | [0xc7066ab2F310a9c216E4e39d9ab4207D5Fd23a87](https://viewblock.io/thundercore/address/0xc7066ab2f310a9c216e4e39d9ab4207d5fd23a87) |
| XYDexAggregator                   | [0xc68647CF402dC05c19d2Bda6E885Fbf035Ec7E71](https://viewblock.io/thundercore/address/0xc68647cf402dc05c19d2bda6e885fbf035ec7e71) |
| Supervisor ( XY Router )          | [0xD1dd387D574895bE6544a11E7972d5Bdd1113Ad3](https://viewblock.io/thundercore/address/0xd1dd387d574895be6544a11e7972d5bdd1113ad3) |

## yBridge Addresses

| **Contract**           | **Address**                                                                                                                       |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| YBridge                | [0xF103b5B479d2A629F422C42bb35E7eEceE1ad55E](https://viewblock.io/thundercore/address/0xf103b5b479d2a629f422c42bb35e7eecee1ad55e) |
| Supervisor ( YBridge ) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://scan.thundercore.com/address/0x1B0789910027c3CC58af2391de7228d973c5C46E)     |
| USDT YBridgeVault      | [0x74A0EEA77e342323aA463098e959612d3Fe6E686](https://scan.thundercore.com/address/0x74A0EEA77e342323aA463098e959612d3Fe6E686)     |
| xyUSDT                 | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://scan.thundercore.com/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1)     |
| USDC YBridgeVault      | [0x2641911948e0780e615A9465188D975Fa4A72f2c](https://scan.thundercore.com/address/0x2641911948e0780e615A9465188D975Fa4A72f2c)     |
| xyUSDC                 | [0x44a54941E572C526a599B0ebe27A14A5BF159333](https://scan.thundercore.com/address/0x44a54941E572C526a599B0ebe27A14A5BF159333)     |
| Gas Price Consumer     | [0x778C974568e376146dbC64fF12aD55B2d1c4133f](https://scan.thundercore.com/address/0x778C974568e376146dbC64fF12aD55B2d1c4133f)     |

## xAsset Bridge Addresses

<table data-header-hidden><thead><tr><th width="376">Contract</th><th>Address</th></tr></thead><tbody><tr><td><strong>Contract</strong></td><td><strong>Address</strong></td></tr><tr><td>$XY Bridge</td><td><a href="https://scan.thundercore.com/address/0xDc6Ace0E914974190526b606ae7DcbB7E18D02f5">0xDc6Ace0E914974190526b606ae7DcbB7E18D02f5</a></td></tr></tbody></table>

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                       |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| XY Dispatcher | [0xEADe853825b4d87E4238645902e13B966DdfA2c3](https://viewblock.io/thundercore/address/0xeade853825b4d87e4238645902e13b966ddfa2c3) |


# （Suspended）Moonriver

{% hint style="danger" %}
All services are suspended on Moonriver.
{% endhint %}

## XY Router Addresses

| **Contract**                      | **Address**                                                                                                                    |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| XY Router                         | [0x64d17beaE666cC435B9d40a21f058b379b2a0194](https://moonriver.moonscan.io/address/0x64d17beae666cc435b9d40a21f058b379b2a0194) |
| XYDexAggregatorAdaptor            | [0x63B60Fad92F3b3e33e3d6696E4bd86FCf7F45feb](https://moonriver.moonscan.io/address/0x63B60Fad92F3b3e33e3d6696E4bd86FCf7F45feb) |
| XYDexAggregatorAdaptorSingleChain | [0xf4137e5D07b476e5A30f907C3e31F9FAAB00716b](https://moonriver.moonscan.io/address/0xf4137e5D07b476e5A30f907C3e31F9FAAB00716b) |
| XYDexAggregator                   | [0xD44eaEe2faab329713De13D5fdafAFdfE6DA5004](https://moonriver.moonscan.io/address/0xD44eaEe2faab329713De13D5fdafAFdfE6DA5004) |
| Supervisor                        | [0x6760e7baf2a02bbD8680644381d7b8Dc6FcDD782](https://moonriver.moonscan.io/address/0x6760e7baf2a02bbD8680644381d7b8Dc6FcDD782) |

## yBridge Addresses

| **Contract**         | **Address**                                                                                                                    |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| YBridge              | [0xc67Dd7054915a2B0aA3e48f35DA714Ff861e71BD](https://moonriver.moonscan.io/address/0xc67Dd7054915a2B0aA3e48f35DA714Ff861e71BD) |
| Supervisor (YBridge) | [0x1B0789910027c3CC58af2391de7228d973c5C46E](https://moonriver.moonscan.io/address/0x1B0789910027c3CC58af2391de7228d973c5C46E) |
| USDT YBridgeVault    | [0xF526EFc174b512e66243Cb52524C1BE720144e8d](https://moonriver.moonscan.io/address/0xF526EFc174b512e66243Cb52524C1BE720144e8d) |
| xyUSDT               | [0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049](https://moonriver.moonscan.io/address/0x3689D3B912d4D73FfcAad3a80861e7caF2d4F049) |
| USDC YBridgeVault    | [0x680ab543ACd0e52035E9d409014dd57861FA1eDf](https://moonriver.moonscan.io/address/0x680ab543ACd0e52035E9d409014dd57861FA1eDf) |
| xyUSDC               | [0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab](https://moonriver.moonscan.io/address/0x1e4992E1Be86c9d8ed7dcBFcF3665FE568dE98Ab) |
| Gas Price Consumer   | [0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1](https://moonriver.moonscan.io/address/0x73Ce60416035B8D7019f6399778c14ccf5C9c7A1) |

## XY Dispatcher Addresses

| **Contract**  | **Address**                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| XY Dispatcher | [0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A](https://moonriver.moonscan.io/address/0x50a64d05bB8618D8d96A83CbBb12b3044ec3489A) |


# Audit Reports

## yBridge Audit&#x20;

* Audit by BlockSec (Sep, 2024)

{% file src="/files/nHKYDW9drIsFDBZvTbIl" %}

* Audit by Quantstamp  (Jan, 2024)

{% file src="/files/IL0RMlbE6iZFr8ARvL2Q" %}

* Audit by BlockSec (Jan, 2022)

{% file src="/files/qepBZEZUkF2OLR9kA308" %}

## xAsset Bridge Audit&#x20;

* Audit by BlockSec (Sep, 2024)

{% file src="/files/zGJ1Ij0WQgivRqgxjJAY" %}


# Privileged Roles Management

The yBridge contract is structured with various permissions, each of which grants access to specific contract functions. This hierarchical distribution of permissions ensures security and facilitates controlled access to the contract's functionalities.

* Owner
* Manager
* Staff
* Swapper
* YPool\_Worker
* Liquidity\_Worker
* Settlement\_Worker

The private keys of different addresses are protected separately using the cold wallet and Google Cloud KMS (Cloud Key Management Service) through asymmetric signing.&#x20;

The HSM architecture of Cloud KMS ensures that the key can't be unwrapped or used outside of an HSM, can't be extracted from the HSM, and exists in its unwrapped state only within specified locations, preventing the risk of private key exposure. For further information on HSM, you can learn more [here](https://cloud.google.com/docs/security/cloud-hsm-architecture)

<table data-header-hidden><thead><tr><th width="153"></th><th width="284"></th><th></th></tr></thead><tbody><tr><td>Role</td><td>Description</td><td>Address</td></tr><tr><td>Owner</td><td>Manages all permissions and can also add or remove addresses of different roles.</td><td><ul><li>0x1ebB85b97F1CC7D72d7aD533e1C5E86077Af9Af1</li></ul></td></tr><tr><td>Manager</td><td>Configure important parameters within the contract.</td><td><ul><li>0xb1B8378caE4172a75b9d22c8EB9a6610Fa9dCc86</li></ul></td></tr><tr><td>Staff</td><td>Configure secondary parameters within the contract.</td><td><ul><li>0xa9b415B311a1d49e11946674d41AeA074380A819</li></ul></td></tr><tr><td>Swapper</td><td>Restrict the interaction partners of the contract to only the yBridge contract address.</td><td>the contract addresses of yBridge on various chains</td></tr><tr><td>Swap Worker</td><td>Execute destination chain swap</td><td><ul><li>0xB35F9aAc007666caCD0520B68D59d682262db7Da</li><li>0xbF81c9bF9883ABaB878952FCbfB84914a67b6e43</li><li>0xCE15D17aA3165ebEdFC046C7D9bF639865431253</li><li>0x17D8605cDB36191Acc2fcB3d3d7908171bCB99A2</li><li>0xe596e79375364Acf31d0b9f4ED5b5b9b8123d238</li><li>0x1FAd5E8a741868D7972875d2031B23BeA4baF6A4</li></ul></td></tr><tr><td>Liquidity Worker</td><td>Execute deposit/withdrawal on the Y Pool Vault.</td><td><ul><li>0x778902fb04A50622ea5c3C86F53Ba9b47f3d0B4c </li><li>0xeDB40c90bBAda60cD86284B4334Db70449dB7336</li><li>0xDAa8432161Ef3c4533f6c6666F08436Ab3667367</li><li>0x95e8AB85F22C32fd40A579A404A5b18fcfb74fC6</li><li>0xcC160C2ab6EDBfc932634B1aa0BC8aA292e42CF3</li></ul></td></tr><tr><td>Settlement Worker</td><td>Synchronize peripheral chain information on the settlement chain and perform vault settlement.</td><td><ul><li>0x9feD8Ae5e5Aa8E9CC5031E50d1fF6Fe86c6e4dC1</li></ul></td></tr></tbody></table>


# Terms of Use

Last updated: November 02, 2023&#x20;

Our greetings and welcome to XY Finance, <https://app.xy.finance>, a website-hosted user interface managed and operated by XY Finance (the “**Interface**”).&#x20;

These Terms of Use and any terms and conditions incorporated herein by reference (collectively, the “**Terms**”) govern your access to and use of the Interface. You must read the Terms carefully.&#x20;

To make these Terms easier to read:&#x20;

* XY Finance is referred to as “XY”, “we”, “us” or “our”.&#x20;
* “You”, “your” and “user(s)” refers to anybody who accesses or uses, in any way, the Interface. If you are accessing or using the Interface on behalf of a company (such as your employer) or other legal entity, you represent and warrant that you have the authority to bind that entity to these Terms and, in that case, “you”, “your” or “user(s)” will refer to that entity.&#x20;

By accessing, browsing or otherwise using the Interface, or by acknowledging agreement to the Terms on the Interface, you agree that you have read, understood and accepted all of the Terms and the Privacy Policy (the “**Privacy Policy**”), which is incorporated by reference into the Terms.&#x20;

IMPORTANT NOTE REGARDING ARBITRATION: WHEN YOU AGREE TO THESE TERMS BY USING OR ACCESSING THE INTERFACE, YOU ARE AGREEING TO RESOLVE ANY DISPUTE BETWEEN YOU AND XY Finance THROUGH BINDING, INDIVIDUAL ARBITRATION RATHER THAN IN COURT. AND YOU AGREE TO A CLASS ACTION WAIVER, BOTH OF WHICH IMPACT YOUR RIGHTS AS TO HOW DISPUTES ARE RESOLVED.&#x20;

### **1. The Interface**&#x20;

*TL;DR: The main purpose of the Interface is to provide you with access to the operations in the cross-chain space. We only provide the interface and software but have no control over your blockchain interactions and do not endorse any specific actions. All the transactions occur on a blockchain which is a distributed ledger with growing lists of records (blocks) that are securely linked together via cryptographic hashes (“**Blockchain Networks**”) that we do not own, control, or operate. We are not responsible for the services provided by third parties, the execution of the transactions, or any other actions of such third parties. We reserve the right to make changes to the Interface, including adding, modifying, or discontinuing products or features.*&#x20;

Products and Features. The Interface integrates decentralized protocols (“Protocol”) and offers you access to numerous liquidity sources across multiple chains. The Interface may include other products and/or features added for the purposes of user experience development and improvement, including those for the informational, security, and entertainment purposes, which are not intended to affect the main purpose of the Interface described above.&#x20;

We only provide you with access to the relevant interface and software and neither have control over your interactions with the blockchain nor encourage you to perform any. Any interaction performed by you via the Interface remains your sole responsibility.&#x20;

***Blockchain Networks Transactions.*** In order to be completed, all transactions with cryptocurrency, digital tokens or digital assets (“**virtual currency**”) must be confirmed and recorded in the associated public blockchain. Such networks are decentralized, peer-to-peer networks supported by independent third parties, which we do not own, control, or operate. We have no control over the Blockchain Networks and, therefore, cannot and do not ensure that any transaction details that you submit via the Interface will be confirmed and processed. By using the Interface, you acknowledge and agree that the transaction details you submit may not be completed, or may be substantially delayed, by the Blockchain Networks.&#x20;

We do not store, transfer, transmit, convert, broker, hold, escrow, mint, mine, or otherwise interact with any virtual currency, security, financial instrument, or other digital or physical asset and all the interactions are performed on the third-party platforms, subject to any associated third-party terms. Any transfer that occurs in any virtual currency occurs on the Blockchain Network and not on a network owned by us. We therefore do not guarantee that we can affect the transfer of title or right in any virtual Currency. You accept and acknowledge that we are not responsible for any errors or omissions that you make in connection with any virtual currency transaction initiated via the Interface. We strongly encourage you to review your transaction details carefully before attempting to transfer a virtual currency.&#x20;

Completion of transactions that you instruct for through the Interface also depends on the availability and operation of the Blockchain Networks. Errors or forks in the Blockchain Networks may cause transactions that you initiate through the Interface to fail. This may mean that the transaction you were originally intending to perform will no longer be available. Unfortunately, due to the decentralized nature of the Blockchain Networks, there is no one single point of failure, and so neither we nor any particular party will be responsible to you for errors or any losses that you suffer as a result.&#x20;

***Third-Party Services.*** To operate the Interface and facilitate your access to its products and/or features, we may engage third-party providers and/or third-party API, which XY Finance has no direct or indirect control over (“**Third-Party Services**”). The Third-Party Services are governed by their respective terms and conditions. Such terms and conditions may include separate fees and charges, as well as disclaimers and/or risk warnings on the accuracy of the information or the services of such a provider. These terms may also include a privacy policy that differs from the privacy policy that is incorporated by reference herein. It is your sole responsibility to read carefully and make sure that you understand those Third-Party Services terms and conditions, including how those service providers may use your information according to their respective privacy policies.&#x20;

You agree and understand that the functionalities accessible via the Interface that allows you to swap/bridge virtual currencies are not provided directly by us and are the only responsibility of the third-party providers, including respective active third-party providers. Although we facilitate your access to these Third-Party Services, we by no means are responsible for them and take no part in any actions, transactions, or other activities conducted by such providers. We reserve the right to change, suspend, remove, disable, or impose access restrictions or limits on the use of any Third-Party Service at any time without notice.&#x20;

You hereby acknowledge that the functionalities accessible via the Third-Party Services are the sole responsibility of such Third-Party Services providers. You hereby expressly release XY Finance from any liability arising from use of any Third-Party Services, third-party website, service, or content and any resulting harm, loss, or damage.&#x20;

***Changes.*** We reserve the right in our sole and absolute discretion to make changes to how we operate the products and/or features accessible through the Interface, including adding new products, features, functionalities, modifying existing ones, altering any other aspect of the Interface, or temporarily or permanently suspending, discontinuing, or terminating your access to any or all portions of the Interface’s functionality, provided that such modifications or discontinuations will not affect your access to your assets (if applicable), unless there are exceptional circumstances where doing so would (a) pose information security risks or intellectual property issues for XY Finance or other users; or (b) create other unwarranted risks, including violations of law.&#x20;

***Additional terms.*** Certain products accessible through the Interface, including related applications, may be subject to additional terms. Such additional terms are an integral part to these Terms of Use. However, in the event of a conflict, the provisions of any such special terms or other agreement shall prevail.&#x20;

### **2. Eligibility**&#x20;

Our Interface is **NOT** offered to persons or entities who reside in, are citizens of, are incorporated in, or have a registered office in the United States of America or any Prohibited Localities, namely Restricted Persons, as defined below. We do not make exceptions. If you are a Restricted Person, then do not attempt to access or use the Interface. Use of a virtual private network (e.g., a VPN) or other means by Restricted Persons to access or use the Interface is **prohibited**.&#x20;

*TL;DR: if you use the Interface you state that you (a) are at least 18; (b) don’t break any laws of your jurisdiction by using the Interface; (c) are not located, established or registered in any of the jurisdictions enlisted below titled “**Prohibited Localities**”.*&#x20;

***General***. You may not use the Interface if you are otherwise barred from using the Interface under applicable law.&#x20;

***Legality***. You are solely responsible for adhering to all laws and regulations applicable to you and your use or access to the Interface. Your use of the Interface is prohibited by and otherwise violate or facilitate the violation of any applicable laws or regulations, or contribute to or facilitate any illegal activity.

By using or accessing the Interface, you represent to us that you are not subject to the Sanction Lists and you are not a Restricted Person, as defined below. “**Sanction Lists**” means any sanctions designations listed on economic/trade embargo lists and/or specially designated persons/blocked persons lists published by the international organizations, as well as any state and governmental authorities of any jurisdiction, including, but not limited to the lists of United Nations, European Union and its Member States, United States and United Kingdom sanctions lists.&#x20;

We make no representations or warranties that the information, products, or services provided through our Interface, are appropriate for access or use in other jurisdictions. You are not permitted to access or use our Interface in any jurisdiction or country if it would be contrary to the law or regulation of that jurisdiction or if it would subject us to the laws of, or any registration requirement with, such jurisdiction. We reserve the right to limit the availability of our Interface to any person, geographic area, or jurisdiction, at any time and at our sole and absolute discretion.&#x20;

***Prohibited Localities*****.** XY Finance does not interact with digital wallets located in, established in, or a resident of Myanmar (Burma), Côte D'Ivoire (Ivory Coast), Cuba, Crimea and Sevastopol, the so-called Donetsk People’s Republic, Democratic Republic of Congo, Iran, Iraq, Libya, the so-called Luhansk People’s Republic, Mali, Nicaragua, Democratic People’s Republic of Korea (North Korea), Somalia, Sudan, Syria, Yemen, Zimbabwe or any other state, country or region that is included in the Sanction Lists.&#x20;

You must not use any software or networking techniques, including use of a Virtual Private Network (VPN) to modify your internet protocol address or otherwise circumvent or attempt to circumvent this prohibition.&#x20;

***Restricted Persons.*** XY Finance does not interact with digital wallets, which have been previously classified or otherwise identified by international organizations or any state and governmental authorities of any jurisdiction, as belonging or affiliated with the persons specially designated or otherwise included in the Sanction Lists (“**Restricted Persons**”). For the purposes of these Terms, Restricted Persons shall also include all persons or entities who reside in, are citizens of, are incorporated in, or have a registered office in the Prohibited Localities.&#x20;

***Non-Circumvention.*** You agree not to access the Interface using any technology for the purposes of circumventing these Terms.&#x20;

### 3. Compliance&#x20;

*TL;DR: You expressly agree that you assume all risks in connection with your access to and use of the Interface. Additionally, you expressly waive and release us from any and all liability, claims, causes of action, or damages arising from or in any way relating to your access to and use of the Interface.*&#x20;

***Your Compliance Obligations.*** The Interface may not be available or appropriate for use in all jurisdictions. By accessing or using the Interface, you agree that you are solely and entirely responsible for compliance with all laws and regulations that may apply to you. You further agree that we have no obligation to inform you of any potential liabilities or violations of law or regulation that may arise in connection with your access and use of the Interface and that we are not liable in any respect for any failure by you to comply with any applicable laws or regulations.&#x20;

TL;DR: You understand and agree that you may be required to complete Know Your Client (KYC) and Know Your Business (KYB) checks through a third-party provider to access certain products and/or features. Your refusal to provide requested information may result in access restrictions.&#x20;

***Compliance Checks.*** As we aim to provide a safe and compliant environment within XY Finance, some of the products and/or features accessible through the Interface may be available to you only upon the completion of the verification process. The verification involves completing an identifying Know Your Client (KYC) / Know Your Business (KYB) questionnaire (“**KYC/KYB Checks**”) as required by applicable anti&#x20;

money laundering, anti-terrorist financing, fraud prevention, sanctions laws and regulations.&#x20;

The KYC/KYB Checks may be designated to a third-party provider upon XY Finance sole discretion. In order to complete the KYC/KYB Checks, you undertake to promptly provide all required information, including supporting documentation and other evidence, as may be reasonably requested, to such third-party provider elected by XY Finance. You are solely responsible for the accuracy and completeness of the data provided.&#x20;

You acknowledge and understand that the outcome of the KYC/KYB Checks lies in the sole discretion of the third-party provider. After having successfully passed the KYC/KYB Checks you will be granted access to the relevant products and/or features on the Interface. In case you refuse or deny providing information as requested by the third-party provider, your access to the respective products and/or features of the Interface may be restricted.&#x20;

You understand that the amount of information requested to provide as part of the KYC/KYB Checks may be subject to change over time and that you may at a later point in time be required to provide additional documents and/or information.&#x20;

The data is collected to comply with applicable legal and regulatory obligations in order to verify your identity and determine your legal eligibility. This data is securely maintained and disclosed only when permitted by law. For more information on how your personal data is processed please refer to our Privacy Policy.&#x20;

### 4. Risk Assessment&#x20;

We may use publicly available information, as well as Third-Party Services, to assess the risks associated with illicit or non-compliant activities, phishing, or other potential threats. Such risk assessment services may be provided by various third-parties, including, but not limited to: MetaMask, Celer, Synapse, Circle, OpenOcean, 1inch, OKX DEX, imToken.

*TL;DR: You acknowledge and agree that risk assessment may be conducted using Third-Party Services to monitor wallet addresses and/or other content for non-compliant behavior based on publicly available information. We reserve the right to block or restrict access of the wallet address associated with such illicit activity. We hold no liability for such assessment, restriction, results, or accuracy of the Third-Party Services.*&#x20;

***Compliance Assessment.*** XY Finance reserves the right, but has no obligation, to use publicly available and accessible information and engage third-party providers to monitor and assess your and/or other users’ wallet addresses, third-party links, domain names, virtual currencies, smart contracts, and any other content available via the Interface for the risks of money laundering, terrorism financing, fraud and/or any other illicit or non-compliant activities. No additional personal data is collected to perform such compliance assessment.&#x20;

You acknowledge and understand that the compliance assessment results lie in the sole discretion of the third-party provider. XY Finance has no control over or connection to these Third-Party Services, thus XY Finance is not and cannot be responsible for the accuracy of the information or the services of such providers. These Third-Party Services are governed by their respective terms of use, please read them carefully.&#x20;

XY Finance reserves the right, but has no obligation, to provide respective warnings to you. You hereby acknowledge that XY Finance has no responsibility and shall not be held liable for such assessment, restriction, results, or accuracy thereof. You are solely responsible for the final decision as to the applicability and fitness of such risk assessments.&#x20;

XY Finance reserves the right, but has no obligation, to block or restrict any activity on the Interface that may be associated with any illicit and/or non-compliant activities. If you believe you or your wallet address has been blocked or restricted from using the Interface by mistake, please contact us at: <contact@xy.finance>.&#x20;

### 5. Access to the Interface

*TL;DR: The Interface provides a user interface for XY Finance participants, users or you that display price information on virtual currency. All interactions related to the Protocol are executed outside of XY Finance’s Network direct or indirect control. XY Finance does not interact with the virtual currency involved at any stage of your interaction. The Interface is constantly changing, so you might see features come and go as we continue to improve our experience and services for users.*&#x20;

We reserve the right to disable access to the Interface at any time in the event of any breach of the Terms, including without limitation, if we, in our sole discretion, believe that you, at any time, fail to satisfy the eligibility requirements set forth in the Terms. Further, we reserve the right to limit or restrict access to the Interface by any person or entity, or within any geographic area or legal jurisdiction, at any time and at our sole discretion. We will not be liable to you for any losses or damages you may suffer as a result of or in connection with the Interface being inaccessible to you at any time or for any reason.&#x20;

### 6. Your Use of the Interface&#x20;

*TL;DR: We do not control your interactions and stop an interaction or attempt to reverse an interaction after it occurred. There are some strict rules: do not in any way harm the Interface or other users. And also: you’re ultimately responsible for any interactions as relevant to the Interface. Please review, obtain, or otherwise seek additional information or support before interactions with virtual currency at the Protocol.*&#x20;

By using or accessing the Interface, you represent and warrant that you understand that there are inherent risks associated with virtual currency, and the underlying technologies including, without limitation, cryptography and blockchain, and you agree that XY Finance is not responsible for any losses or damages associated with these risks. You specifically acknowledge and agree that the Interface facilitates your interaction with decentralized networks and technology and, as such, we have no control over any blockchain or virtual currencies and cannot and do not ensure that any of your interactions will be confirmed on the relevant blockchain and do not have the ability to effectuate any cancellation or modification requests regarding any of your interactions.&#x20;

Without limiting the foregoing, you specifically understand and hereby represent your acknowledgement of the following:&#x20;

* The pricing information data provided through the Interface does not represent an offer, a solicitation of an offer, or any advice regarding, or recommendation to enter into, a transaction with the Interface;&#x20;
* The Interface does not act as an agent for any of the users;&#x20;
* The Interface does not own or control any of the underlying software through which blockchain networks are formed, and therefore is not responsible for them and their operation;&#x20;
* You are solely responsible for reporting and paying any taxes applicable to your use of the Interface;&#x20;
* Although it is intended to provide accurate and timely information on the Interface, the Interface or relevant tools may not always be entirely accurate, complete or current and may also include technical inaccuracies or typographical errors. Accordingly, you should verify all information before relying on it, and all decisions based on information contained on the Interface or relevant tools are your sole responsibility.&#x20;

In order to allow other users to have a full and positive experience of using the Interface you agree that you will not use the Interface in a manner that:&#x20;

* Breaches the Terms;&#x20;
* Infringes on or violates any copyright, trademark, service mark, patent, right of publicity, right of privacy, or other proprietary or intellectual property rights under the law;&#x20;
* Seeks to interfere with or compromise the integrity, security, or proper functioning of any computer, server, network, personal device, or other information technology system, including, but not limited to, the deployment of viruses and denial of service attacks;&#x20;
* Attempts, in any manner, to obtain the private key, password, account, or other security information from any other user, including such information about the digital wallet;&#x20;
* Decompiles, reverse engineers, or otherwise attempt to obtain the source code or underlying ideas or information of or relating to the Interface;&#x20;
* Seeks to defraud us or any other person or entity, including, but not limited to, providing any false, inaccurate, or misleading information in order to unlawfully obtain the property of another;&#x20;
* Violates any applicable law, rule, or regulation concerning the integrity of trading markets, including, but not limited to, the manipulative tactics commonly known as spoofing and wash trading;&#x20;
* Disguises or interferes in any way with the IP address of the computer you are using to access or use the Interface or that otherwise prevents us from correctly identifying the IP address of the computer you are using to access the Interface;&#x20;
* Transmits, exchanges, or is otherwise supported by the direct or indirect proceeds of criminal or fraudulent activity;&#x20;
* Contributes to or facilitates any of the foregoing activities.&#x20;

All information provided in connection with your access and use of the Interface is for informational purposes only and should not be construed as professional advice. You should not take, or refrain from taking, any action based on any information contained in the Interface or any other information that we make available at any time, including, without limitation, blog posts, articles, links to third-party content, news feeds, tutorials, tweets and videos. Before you make any financial, legal, or other decisions involving the Interface, you should seek independent professional advice from an individual who is licensed and qualified in the area for which such advice would be appropriate.&#x20;

The Terms are not intended to, and do not, create or impose any fiduciary duties on us. To the fullest extent permitted by law, you acknowledge and agree that we owe no fiduciary duties or liabilities to you or any other party, and that to the extent any such duties or liabilities may exist at law or in equity, those duties and liabilities are hereby irrevocably disclaimed, waived, and eliminated. You further agree that the only duties and obligations that we owe you are those set forth expressly in the Terms.

### 7. Disclaimers&#x20;

*TL;DR: This is very important (like, bold important) so please read the whole section carefully for specifics. It explains that we don’t make any warranties about the Interface.*&#x20;

You understand and agree that the GitHub repository, decentralized and autonomous protocol and environment, and associated decentralized networks, are not controlled by the XY Finance. We do not have access to your private key and cannot initiate an interaction with your virtual currency or otherwise access your virtual currency. We are not responsible for any activities that you engage in when using your wallet, or the Interface.&#x20;

TL;DR: the information displayed through the Interface including “APRs” and information about prices, liquidity, staking or other are provided by third parties and/or calculated for informational purposes and we do not provide any warranties for such information.&#x20;

XY Finance cannot and does not represent or guarantee that any of the information available through the Interface is accurate, reliable, current, complete or appropriate for your needs. The information displayed through the Interface including “APRs” and information about prices, liquidity, staking or other is provided by third parties and/or calculated for informational purposes. Your use of any third-party scripts, indicators, ideas and other content is at your sole risk.&#x20;

*TL;DR: we provide no representations or warranty as to the Interface.*&#x20;

You expressly understand and agree that your use of the Interface is at your sole risk. We make and expressly disclaim all representations and warranties, express, implied or statutory, and with respect to the Interface and the code proprietary or open-source, we specifically do not represent and warrant and expressly disclaim any representation or warranty, express, implied or statutory, including without limitation, any representations or warranties of title, non-infringement, merchantability, usage, security, suitability or fitness for any particular purpose, or as to the workmanship or technical coding thereof, or the absence of any defects therein, whether latent or patent. We do not represent or warrant that the Interface, code and any related information are accurate, complete, reliable, current or error-free. The Interface provided on an “as is” and “as available” basis, without warranties of any kind, either express or implied, including, without limitation, implied warranties of merchantability, fitness for a particular purpose or non-infringement. You acknowledge that no advice, information, or statement that we make should be treated as creating any warranty concerning the Interface. We do not endorse, guarantee, or assume responsibility for any advertisements, offers, or statements made by third parties concerning the Interface.&#x20;

*TL;DR: we are not responsible for transferring, safeguarding, or maintaining your private keys.*&#x20;

You acknowledge that XY Finance is not responsible for transferring, safeguarding, or maintaining your private keys or any virtual currency associated therewith. If you lose, mishandle or have stolen associated virtual currency private keys, you acknowledge that you may not be able to recover associated virtual currency and that XY Finance is not responsible for such loss. You acknowledge that XY Finance is not responsible for any loss, damage or liability arising from your failure to comply with the terms hereunder.&#x20;

*TL;DR: blockchain protocols are code subject to flaws and we do not provide any warranties on the security of such protocols.*&#x20;

By accessing and using the Interface, you represent that you understand (a) the Interface facilitates access to the Protocol, the use of which has many inherent risks, and (b) the cryptographic and blockchain-based systems have inherent risks to which you are exposed when using the Interface. You further represent that you have a working knowledge of the usage and intricacies of blockchain-based digital assets, including, without limitation, ERC-20 token standard available on the Ethereum blockchain and all other available layer 2 solutions for Ethereum or other blockchains. You further understand that the markets for these blockchain-based digital assets are highly volatile due to factors that include, but are not limited to, adoption, speculation, technology, security, and regulation. You acknowledge that the cost and speed of transacting with blockchain-based systems, such as Ethereum, are variable and may increase or decrease, respectively, drastically at any time. You hereby acknowledge and agree that we are not responsible for any of these variables or risks associated with the Protocol and cannot be held liable for any resulting losses that you experience while accessing or using the Interface. Accordingly, you understand and agree to assume full responsibility for all of the risks of accessing and using the Interface to interact with the Protocol.&#x20;

*TL;DR: third-party resources and promotions.*&#x20;

The Interface may contain references or links to third-party resources, including, but not limited to, information, materials, products, or services, that we do not own or control. In addition, third parties may offer promotions related to your access and use of the Interface. We do not endorse or assume any responsibility for any such resources or promotions. If you access any such resources or participate in any such promotions, you do so at your own risk, and you understand that the Terms do not apply to your dealings or relationships with any third parties. You expressly relieve us of any and all liability arising from your use of any such resources or participation in any such promotions.&#x20;

### 8. Intellectual Proprietary Rights&#x20;

*TL;DR: our content is ours.*&#x20;

We own all intellectual property and other rights in the Interface and its contents, including, but not limited to, software, text, images, trademarks, service marks, copyrights, patents, and designs. Unless expressly authorized by us, you may not copy, modify, adapt, rent, license, sell, publish, distribute, or otherwise permit any third party to access or use the Interface or any of its contents. Accessing or using the Interface does not constitute a grant to you of any proprietary intellectual property or other rights in the Interface or its contents.

You will retain ownership of all intellectual property and other rights in any information and materials you submit through the Interface. However, by uploading such information or materials, you grant us a worldwide, royalty-free, irrevocable license to use, copy, distribute, publish and send this data in any manner in accordance with applicable laws and regulations.&#x20;

You may choose to submit comments, bug reports, ideas or other feedback about the Interface, including, without limitation, about how to improve the Interface (collectively, “**Feedback**”). By submitting any Feedback, you agree that we are free to use such Feedback at our discretion and without additional compensation to you, and to disclose such Feedback to third parties (whether on a non-confidential basis or otherwise). If necessary under applicable law, then you hereby grant us a perpetual, irrevocable, non exclusive, transferable, worldwide license under all rights necessary for us to incorporate and use your Feedback for any purpose.&#x20;

If (i) you satisfy all of the eligibility requirements set forth in the Terms, and (ii) your access to and use of the Interface complies with the Terms, you hereby are granted a single, personal, limited license to access and use the Interface. This license is non-exclusive, non-transferable, and freely revocable by us at any time without notice or cause in our sole discretion. Use of the Interface for any purpose not expressly permitted by the Terms is strictly prohibited. Unlike the Interface, the Protocol is comprised entirely of open-source software running on the public Ethereum and other blockchains or Ethereum layer 2 solutions and is not our proprietary property. The Protocol may also run on the other blockchains to which the same clause applies.&#x20;

### 9. Indemnification&#x20;

*TL;DR: If someone sues us because of something you did, you’re responsible for it, so read the below carefully.*&#x20;

You agree to hold harmless, release, defend, and indemnify us and our officers, directors, employees, contractors, agents, affiliates, and subsidiaries from and against all claims, damages, obligations, losses, liabilities, costs and expenses arising from (a) your access to and use of the Interface; (b) your violation of these Terms, the right of any third party, or any other applicable law, rule, or regulation; and (c) any other party’s access and use of the Interface with your assistance or using any device or account that you own or control.&#x20;

### 10. Limitation of Liability&#x20;

*TL;DR: It's really important to highlight how our liability is limited when it comes to issues you may encounter with our service. Please read the whole section carefully.*&#x20;

Under no circumstances shall we or any of our officers, directors, employees, contractors, agents, affiliates, or subsidiaries be liable to you for any indirect, punitive, incidental, special, consequential, or&#x20;

exemplary damages, including (but not limited to) damages for loss of profits, goodwill, use, data, or other intangible property, arising out of or relating to any access to or use of the Interface, nor will we be responsible for any damage, loss, or injury resulting from hacking, tampering, or other unauthorized access to or use of the Interface, or from any access to or use of any information obtained by any unauthorized access to or use of the Interface. We assume no liability or responsibility for any: (a) errors, mistakes, or inaccuracies of content; (b) personal injury or property damage, of any nature whatsoever, resulting from any access to or use of the Interface; (c) unauthorized access to or use of any secure server or database in our control, or the use of any information or data stored therein; (d) interruption or cessation of function related to the Interface; (e) bugs, viruses, trojan horses, or the like that may be transmitted to or through the Interface; (f) errors or omissions in, or loss or damage incurred as a result of, the use of any content made available through the Interface; and (g) the defamatory, offensive, or illegal conduct of any third party. Under no circumstances shall we or any of our officers, directors, employees, contractors, agents, affiliates, or subsidiaries be liable to you for any claims, proceedings, liabilities, obligations, damages, losses, or costs in an amount exceeding the greater of (i) the amount you paid to us in exchange for access to and use of the Interface, or (ii) $100.00. This limitation of liability applies regardless of whether the alleged liability is based on contract, tort, negligence, strict liability, or any other basis, and even if we have been advised of the possibility of such liability. Some jurisdictions do not allow the exclusion of certain warranties or the limitation or exclusion of certain liabilities and damages. Accordingly, some of the disclaimers and limitations set forth in the Terms may not apply to you. This limitation of liability shall apply to the fullest extent permitted by law.&#x20;

### 11. Arbitration and Class Action Waiver&#x20;

*TL;DR: A third party arbitrator will help us resolve any disputes we might have. This means that any dispute will be resolved outside of class-action litigation. Hopefully, disputes will never be an issue, but you should read this section carefully for details on how it works.*&#x20;

***Binding Arbitration.*** Except for disputes in which either party seeks to bring an individual action in small claims court or seeks injunctive or other equitable relief for the alleged unlawful use of copyrights, trademarks, trade names, logos, trade secrets or patents, you and the XY Finance: (a) waive the right to have any and all disputes or claims arising from these Terms, your use or access to the Interface or any other disputes with the XY Finance (collectively, “Disputes”) resolved in a court; and (b) waive any right to a jury trial. Instead, you and the XY Finance agree to arbitrate Disputes that are not resolved informally (as described below) through binding arbitration (i.e. the referral of a Dispute to one or more persons charged with reviewing the Dispute and making a final and binding determination to resolve it) instead of having the Dispute decided by a judge or jury in court).&#x20;

***No Class Arbitrations,*** Class Actions or Representative Actions. You and the XY Finance agree that any dispute is personal to you and the XY Finance and that any such dispute will be resolved solely through individual arbitration and will not be brought as a class arbitration, class action or any other type of representative proceeding. Neither party agrees to class arbitration or to an arbitration in which an individual attempt to resolve a dispute as a representative of another individual or group of individuals. Further, you and the XY Finance agree that a dispute cannot be brought as a class, or other types of representative action, whether within or outside of arbitration, or on behalf of any other individual or group of individuals.&#x20;

***Process.*** You and the XY Finance agree that each will notify the other, in writing, of any Dispute within thirty (30) days of when it arises so that the parties can attempt, in good faith, to resolve the Dispute informally. Notice to the XY Finance shall be provided by sending an email to <contact@xy.finance>. Your notice must include (1) your name, postal address, and email address; (2) a description of the nature or basis of the Dispute; and (3) the specific action that you are seeking. If you and the XY Finance cannot resolve the Dispute within thirty (30) days of the XY Finance receiving the notice, either you or XY Finance may, as appropriate pursuant to this Section 9, commence an arbitration proceeding. You and the XY Finance agree that any arbitration or claim must be commenced or filed within one (1) year after the Dispute arose; otherwise, you and the XY Finance agree that the claim is permanently barred (which means that you will no longer have the right to assert a claim regarding the Dispute).&#x20;

***Choice of Law.*** These Terms are governed by and will be construed under the laws of the Cayman Islands, without regard to principles of conflict of laws, govern the Terms and any Dispute between you and us. Any Dispute under these Terms shall be finally settled by Binding Arbitration (as defined below). Any unresolved Dispute arising out of or in connection with these Terms shall be referred to and finally resolved by arbitration under the rules of the London Court of International Arbitration (LCIA), which rules are deemed to be incorporated by reference into this Section 9 to the extent they are consistent with it. Any dispute arising from or relating to the subject matter of these Terms shall be finally settled in London, United Kingdom, in English, in accordance with the LCIA Arbitration Rules. Unless we agree otherwise, the arbitrator may not consolidate your claims with those of any other party. Any judgment on the award rendered by the arbitrator may be entered in any court of competent jurisdiction, to the extent a court therein would be deemed to be a court of competent jurisdiction other than any court located in the United States of America. You further agree that the Interface shall be deemed to be based solely in the Cayman Islands and that, although the Interface may be available in other jurisdictions, its availability does not give rise to general or specific personal jurisdiction in any forum outside the Cayman Islands.&#x20;

***Authority of Arbitrator.*** As limited by these Terms and applicable arbitration rules, the arbitrator will have: (a) the exclusive authority and jurisdiction to make all procedural and substantive decisions regarding a Dispute; and (b) the authority to grant any remedy that would otherwise be available in court. The arbitrator may only conduct an individual arbitration and may not consolidate more than one individual's claims, preside over any type of class or representative proceeding or preside over any proceeding involving more than one individual.&#x20;

### 12. Last but not Least&#x20;

***Changes to these Terms.*** We may amend any portion of these Terms at any time by posting the revised version of these Terms with an updated revision date. The changes will become effective and shall be deemed accepted by you, the first time you use or access the Interface after the initial posting of the revised Terms and shall apply on a going-forward basis with respect to your use of the Interface including&#x20;

any transactions initiated after the posting date. In the event that you do not agree with any such modification, your sole and exclusive remedy is to terminate your use of the Interface.&#x20;

***Entire Agreement.*** These Terms (and any additional terms, rules and conditions of participation that may be posted on the website of XY Finance) including the Privacy Policy constitute the entire agreement with respect to the Interface and supersedes any prior agreements, oral or written.&#x20;

***Privacy Policy.*** The Privacy Policy describes the ways we collect, use, store and disclose your personal information. You agree to the collection, use, storage, and disclosure of your data in accordance with the Privacy Policy.&#x20;

***Decentralized Autonomous Organizations (DAOs).*** We may interact with and/or provide access to the Interface products and/or features to DAOs operating on the basis of XY Finance. To the extent that the DAO votes in favor of any decisions concerning the Interface and/or access and use of any Interface products and/or features, the DAO has acknowledged, agreed and accepted these Terms, including any terms and conditions incorporated herein by reference.&#x20;

***Survival.*** Upon termination of these Terms for any reason, all rights and obligations of the parties that by their nature are continuing will survive such termination.&#x20;

***Severability.*** In the event that any provision of these Terms is deemed invalid or unenforceable, the validity and enforceability of the remaining provisions shall remain unaffected and unimpaired. Any invalid or unenforceable portions can be reasonably interpreted to fulfill the intent and purpose of the original provision. If such interpretation is not possible, the invalid or unenforceable portion will be severed from these Terms, while the remaining provisions of the Terms will remain in full force and effect.&#x20;

***Captions and Summaries.*** The captions identifying the various sections and subsections of these Terms are for reference only and do not define, modify, expand, or limit any of the provisions of these Terms and shall not affect the interpretation of these Terms. In addition, the paragraphs and text accompanying the words “TL;DR” at the beginning of certain sections are intended to summarize the applicable section of these Terms and do not define, modify, expand, or limit any of the provisions of these Terms and shall not affect the interpretation of these Terms.

<br>


# AML and CFT Compliance Statement

Anti-Money Laundering (AML) and Combating the Finance of Terrorism (CFT) Compliance Statement

We, XY Finance, are firmly committed to participating in international efforts to combat money laundering and the funding of terrorist and criminal activities. Our paramount goal is to uphold a safe and compliant environment for all users and stakeholders.

As part of our AML and Anti-Terrorist financing compliance efforts, we adhere to embargo regulations applicable in the EU, the Office of Foreign Assets Control (OFAC), and in the jurisdiction in which any of our branch or office is domiciled.

By using our DeFi protocol and products, you acknowledge and agree to comply with all applicable laws, regulations, and guidelines related to anti-money laundering, counter-terrorist financing, and sanctions.

Please be advised that to ensure adherence to prohibitions and identify suspicious activities, we reserve the right to monitor, investigate, and take necessary actions against any suspicious or illegal activities, which may include:

1. Freezing or seizing funds that are suspected to be directly or indirectly derived from illicit activities or have ties to sanctioned individuals or entities.
2. Rejecting or blocking transactions or addresses associated with questionable sources of funds or activities that violate our terms of service.
3. Cooperating with law enforcement agencies, regulatory bodies, or government authorities in their investigations related to money laundering, terrorist financing, or any other illegal activities.
4. Implementing and updating our AML/ CFT policies and procedures to align with the latest industry standards and regulatory requirements.

As a DeFi protocol, we do not require users to provide personal information for account creation. However, by using our protocol and products, you agree to ensure that your wallet and any associated funds are devoid of any connections to illicit activities or sanctioned entities. You acknowledge that failure to comply with applicable laws and regulations may result in fund freezing or seizure, along with the reporting of suspicious activities to the relevant authorities.

We are dedicated to ensuring a transparent, secure, and compliant DeFi ecosystem. Should you have any questions or concerns regarding our AML / CFT policies, please contact our compliance team at <compliance@xy.finance>.

Thank you for your understanding and cooperation in maintaining a safe and compliant environment.

XY Finance Compliance Team

<br>




---

[Next Page](/llms-full.txt/1)

