Fathom Protocol
  • Introduction
  • FXD Stablecoin
    • FXD Smart Contract Architecture
    • Minting and Burning Mechanisms with LTV Ratio
    • Soft-Pegging to the US Dollar
    • Opening and closing position flows
    • BookKeeping mechanism
      • Stablecoin Accounting
      • Collateral Accounting
    • Liquidation
      • Fixed Spread Liquidation Strategy
      • Liquidation process walk through
    • Emergency Shutdown
    • Maths for position safety
    • Fee structure
    • Risk Management
    • Interfaces
      • ProxyWalletRegistry
      • ProxyWallet
        • FathomStablecoinProxyActions
      • CollateralPoolConfig
      • BookKeeper
      • FXD
      • LiquidationEngine
      • FlashMintModule
      • PriceFeed
      • ShowStopper
      • StabilityFeeCollector
      • SystemDebtEngine
      • AdminControls
    • Deployments
      • XDC Network
    • User Guides
      • Open FXD position
      • Top Up FXD Position
      • Repay and close FXD position
    • Fathom Stablecoin Smart Contracts
    • Fathom Stablecoin Subgraph
  • Vaults
    • Key Features
    • Definitions
    • Architecture
    • Fees
    • Workflows
    • Vault Management
    • Strategy Creation
    • Interfaces
      • Factory
      • Vault
      • BaseStrategy
      • TokenizedStrategy
    • Deployments
      • XDC Network
    • User Guides
      • Deposit and Withdraw in Vault
    • Fathom Vaults Smart Contracts
    • Fathom Vaults Subgraph
  • Lending
    • Core Concepts
    • Protocol Mechanics
    • Architecture
    • Interfaces
      • FmToken
      • VariableDebtToken
      • StableDebtToken
      • L2Pool
      • PoolAddressesProvider
    • User Guides
      • Supply, Borrow, Repay and Withdraw Asset
    • Deployments
      • XDC Network
    • Fathom Lending Smart Contracts
    • Fathom Lending Subgraph
  • DEX
    • Core Concepts
    • Architecture
    • Interfaces
      • Factory
      • Pair
      • Router
    • User Guides
      • Providing Liquidity
      • Swapping Assets
    • Deployments
      • XDC Network
    • Fathom DEX Smart Contracts
    • Fathom DEX Subgraph
  • DAO
    • DAO Structure
    • Governance Process
    • Staking Process
    • Treasury Management
    • Risk Management and Security Measures
    • Contributing to Fathom DAO
    • Interfaces
      • FTHM
      • Staking
        • Vault
        • RewardsCalculator
        • vFTHM
      • Governance
        • TimelockController
    • Deployments
      • XDC Network
    • User Guides
      • Staking
      • Proposing
      • Voting
    • Fathom DAO Smart Contracts
    • Fathom DAO Subgraph
  • Whitepaper
    • Version 1.0
  • Resources
  • FXD Deployments
  • FTHM Deployments
  • Privacy Policy
  • Terms of Service
Powered by GitBook

Copyright© Fathom App 2024.

On this page

Was this helpful?

Export as PDF
  1. FXD Stablecoin

FXD Smart Contract Architecture

PreviousFXD StablecoinNextMinting and Burning Mechanisms with LTV Ratio

Last updated 1 year ago

Was this helpful?

Fathom Protocol Smart Contract Architecture

The structure comprises distinct modules, each responsible for a set of defined operations.

Core Components

  1. Proxy Module: Interfaces for the core contracts of the protocol.

    • ProxyWallet: Calls functions within the FathomProxyActions contract for user interactions.

    • ProxyActionsStorage: Stores the address of the FathomProxyActions contract.

    • ProxyWalletRegistry: Oversees the creation of proxy wallets owned by users.

  2. Position Module: Handles the creation and tracking of user positions.

    • PositionManager: Initiates user positions and maintains a record of them.

  3. Stablecoin Core Module: Central to the management of the FXD stablecoin's lifecycle.

    • BookKeeper: Monitors and manages each position's locked collateral and debt share.

    • CollateralPoolConfig: Manages configurations for collateral pools.

    • StablecoinAdapter: Oversees the minting and burning functions of the FathomStablecoin contract.

  4. StableSwapModule: Supports the provision of liquidity and the execution of FXD<->xUSDT 1:1 swaps.

    • StableSwapModuleWrapper: Integrates and administers the protocol's liquidity pools.

  5. Price Module: Delivers accurate price information for assets.

    • PriceFeed: Gathers price data from price source and feeds it into the protocol.

    • PriceOracle: Transforms raw price from PriceFeed to include a safety margin, using the LTV ratio.

  6. Liquidation Module: Maintains the protocol's financial health by managing under-collateralized positions.

    • LiquidationEngine: Carries out the liquidation process according to predefined rules.

    • FixedSpreadLiquidationStrategy: Directs liquidation activities, ensuring consistency through a fixed spread.

  7. Emergency Module: Pause or Terminate the protocol.

    • ShowStopper: Stops and terminates the whole protocol and executes the emergency shutdown process to return collateral

    • AdminControls: Pauses the protocol at once.

FXD Stablecoin Smart Contract System Design
FXD Stablecoin Smart Contract Architecture