XY Finance
  • Getting Started
  • XY Token
  • Supported Blockchains/Bridges/DEXs
  • Fee Structure
    • 🌉yBridge Fee Information
    • 🌉(Legacy) XY Bridge Fee Information
  • products
    • Bridge Aggregator : XY Finance
      • Gasless Transaction
    • Bridge : yBridge
      • Yield Farming
      • Omnichain Settlement
      • Consensus
    • Refuel
    • Proxy Bridge
    • Cross Chain Infrastructure
  • Bridge Aggregator Integration
    • XY Finance API (Multiple Bridges Aggregator)
      • 1️⃣Get Quote
      • 2️⃣Get Allowance
      • 3️⃣Build Approval Transaction
      • 4️⃣Build Swap Transaction
      • 5️⃣Get Cross-Chain Status
      • 6️⃣Get MinimumSwapAmount
      • ✔️Recommended Tokens
      • ✅Supported Blockchains/Bridges/DEXs
      • 📩Error Message
      • 💰Monetization / Take Fees
      • 📄Change Log
    • XY Finance Widget (iframe)
      • (Legacy) XY Finance Widget (iframe)
    • XY Finance Widget (NPM)
      • 1️⃣Install the Widget
      • 2️⃣Configure the Widget
      • 3️⃣Customize the Theme
      • 📘Widget API Reference
      • 📄Change Log
    • Custom-Built Link
    • Token Listing
  • Single Bridge Integration
    • yBridge API
      • 1️⃣Get Quote
      • 2️⃣Get Allowance
      • 3️⃣Build Approval Transaction
      • 4️⃣Build Swap Transaction
      • 5️⃣Get Cross-Chain Status
      • 🚰Get Pool Liquidity
      • 💲Get Fee Structure
      • ✔️Recommended Tokens
      • ✅Supported Blockchains
      • 📩Error Message
      • 📄Change Log
    • yBridge Contract Integration
      • Integrate YBridge Contract
        • Bridge Example
        • Latest Upgrade ( 2024/07/17 )
        • Migrate from V2 to V3
      • Integrate YBridgeVault Contract
        • Maximum Available Liquidity
        • Migrate from V2 to V3
      • (Legacy) Integrate X Swap Contract
        • (Legacy) Bridge Example
      • (Legacy) Integrate Y Pool Contract
        • (Legacy) Maximum Available Liquidity
    • xAsset Bridge
      • How to Develop Under XY Standards
        • Function Interface for Token Contract
      • How to Deposit / Withdraw Liquidity
        • Direct Contract Interaction
        • Through the Explorer
      • Set up Your Own Validator
  • SMART CONTRACT
    • Addresses
      • Ethereum (chain id : 1)
      • BNB Chain (chain id : 56)
      • Polygon (chain id : 137)
      • Cronos (chain id : 25)
      • Avalanche (chain id : 43144)
      • Kucoin Community Chain (chain id : 321)
      • Arbitrum (chain id : 42161)
      • Optimism (chain id : 10)
      • Astar (chain id : 592)
      • Kaia (chain id : 8217)
      • zkSync Era (chain id : 324)
      • Polygon zkEVM ( chainid : 1101)
      • Linea (chain id : 59144)
      • Base (chain id : 8453)
      • Mantle ( chain id : 5000)
      • Scroll (chain id : 534352 )
      • Blast (chain id : 81457)
      • X Layer (chain id : 196)
      • Taiko (chain id : 167000)
      • Cronos zkEVM (chain id : 388)
      • Abstract (chain id : 2741)
      • Berachain (chain id : 80094)
      • Numbers (chain id : 10507)
      • Treasury
      • (Suspended)Fantom
      • (Suspended)ThunderCore
      • (Suspended)Moonriver
    • Audit Reports
    • Privileged Roles Management
  • Document
    • Terms of Use
    • AML and CFT Compliance Statement
    • Integration Terms and Brand Guidelines
    • Product Update
  • FAQ
    • How to Speed up Pending Transactions
    • How to add a custom RPC to my wallet
  • Contact Us
    • Telegram
    • Medium
    • Twitter
    • Discord
Powered by GitBook
On this page
  • Settlement Chain
  • Validators
  • Settlement Contract (yBridge)
  • Settlement Contract (yBridge Vault)

Was this helpful?

  1. products
  2. Bridge : yBridge

Omnichain Settlement

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

PreviousYield FarmingNextConsensus

Last updated 1 year ago

Was this helpful?

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.

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

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.

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