# 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.md)

### 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.md) : 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.md) : 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.md) 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.md)or [vault contract](/single-bridge-integration/ybridge-contract-integration/integrate-ybridgevault-contract/migrate-from-v2-to-v3.md)

### 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.md): It corresponds to the current YBridge
* [(Legacy) Integrate Y Pool Contract](/single-bridge-integration/ybridge-contract-integration/legacy-integrate-y-pool-contract.md): It corresponds to the current YBridgeVault


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xy.finance/single-bridge-integration/ybridge-contract-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
