X Network
  • X Network: An Intelligent Currency Infrastructure
  • X Ecosystem
    • X Network
    • AIUSD--Intelligent Stablecoins for Decentralized AI
      • AIUSD
      • Mint and Burn Process
      • Intelligent Dynamic Liquidity System(IDLS)
    • XUSD--Native Stablecoin of X Network
      • Mint and Burn Process
  • Technical Architecture
    • Implementation Highlights
    • Smart Contract Overview
  • Payments & Settlement
    • Settlement Approach
    • Securing Liquidity
  • Security and Governance
    • Security Features & Controls
    • Decentralized Governance
  • X Tokenomics
Powered by GitBook
On this page
  1. Technical Architecture

Smart Contract Overview

PreviousImplementation HighlightsNextPayments & Settlement

Last updated 10 months ago

Assets Deposit Contract: The Deposit Contract manages the deposit and withdrawal of collateral assets tokens, coordinating the minting and burning of xUSD stablecoins.

  • On-chain USD Deposit Functionality: Deposits USDC or USDT into the deposit contract on L1 and mints an equivalent amount of xUSD at a 1:1 ratio on L2.

  • Collateral Deposit Functionality: Deposits on-chain assets like BNB, WBTC, or stETH into the corresponding contract on L2 as collateral and mints xUSD in the appropriate ratio.

  • Withdrawal Functionality: Burns xUSD tokens on Layer 2 and redeems USDC, USDT, or other on-chain assets.

  • Security Features: Implements features like reentrancy guards to prevent recursive calls and role-based access control to restrict sensitive operations.

Oracle Integration Contract: This contract interacts with external oracle services to fetch current exchange rates for USDT/USDC to xUSD conversions.

  • Rate Fetching: Periodically retrieves and stores exchange rates from a decentralized network of trusted oracles.

  • Rate Update Mechanism: Incorporates mechanisms to update the exchange rate securely and timely, preventing outdated or incorrect data from affecting the system.

Governance Contract: The Governance Contract manages protocol rule changes and parameter updates, allowing X token holders to vote on important decisions.

  • $veX Distribution: Lock X tokens to get $veX (voting escrowed X tokens) for a specified period, which grant voting power in the governance system. $veX is not transferable and can only be used for voting.

  • Proposal Submission: Stakeholders can submit proposals for changes or upgrades to the protocol, once they have enough $veX tokens.

  • Voting system: Allows stakeholders to submit and vote on proposals for changes or upgrades to the protocol using their $veX tokens. The voting power is weighted by the amount of $veX held.

Liquidity and Rewards Contract: This contract facilitates the distribution of rewards and manages the liquidity pools that support xUSD’s stability and usability.

  • Reward Distribution: Distributes rewards to xUSD holders (stakers) from OTC deal fees within the xMoney framework, and collateral-related fees from the collateral assets.

  • Liquidity Provisioning: Manages interactions with decentralized finance platforms to ensure equivalent liquidity for USD and USDC/USDT assets backing xUSD.

By integrating these technical components, X Finance establishes a robust and efficient financial ecosystem. This architecture not only enhances the usability and accessibility of financial services but also ensures security, transparency, and scalability.

$veX Uitility