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

Liquidation

High level explanation of liquidation process

The liquidation process in the Fathom protocol involves several key components and steps outlined in detail in the LiquidationEngine and FixedSpreadLiquidationStrategy contracts. The liquidation mechanism maintains the system's stability by handling under-collateralized positions. Here is an overview of the process:

Components Involved:

  1. Liquidation Engine (LiquidationEngine): Manages the overall liquidation process.

  2. Fixed Spread Liquidation Strategy (FixedSpreadLiquidationStrategy): Implements a specific strategy for liquidation.

  3. Collateral Pool Config (CollateralPoolConfig): Provides configuration for collateral pools, including parameters like liquidation ratio, close factor, and liquidator incentives.

  4. BookKeeper (BookKeeper): Records positions, stablecoin balances and collateral.

  5. System Debt Engine (SystemDebtEngine): Manages the system's overall debt and surpluses, including systemBadDebt and systemSurpluses.

  6. Price Oracle (PriceOracle): Provides price feeds for collateral assets.

Liquidation Process:

  1. Triggering Liquidation:

  • A position becomes eligible for liquidation when its collateral value falls below a predefined threshold (defined by the liquidation ratio in CollateralPoolConfig). The liquidation Ratio is the same as ( 1 / Loan to Value Ratio).

  • The PriceOracle plays a crucial role in determining the health of positions by providing the latest available prices for collateral assets.

  1. Liquidation Execution:

  • The liquidation process is initiated by a liquidator (which, at the moment, is a role only available to whitelisted addresses) who identifies an under-collateralized position and calls the liquidate function in LiquidationEngine.

  • The liquidate function checks various conditions, such as the liquidator's whitelist status, the system's operational status (live), and the health of the price feed.

  • If the conditions are met, LiquidationEngine interacts with the FixedSpreadLiquidationStrategy to execute the liquidation.

  1. Fixed Spread Liquidation Strategy:

  • This strategy determines the specifics of the liquidation, such as the amount of debt to be repaid and the amount of collateral to be seized.

  • It calculates the required parameters based on current prices, debt accumulated rates, and other factors defined in CollateralPoolConfig.

  1. Financial Adjustments:

  • Upon successful liquidation, the BookKeeper updates the financial state of the system, including adjusting the debt and collateral amounts for the liquidated position.

  • The SystemDebtEngine may also handle any resultant bad debt from the liquidation process.

  1. Distribution of Assets:

  • The liquidator typically receives a portion of the seized collateral as an incentive, with the rest used to repay the debt.

  • Parameters like liquidator incentives and treasury fees govern the distribution of assets.

  1. Edge Cases and Safeguards:

  • The system includes various safeguards and checks to prevent unauthorized access and ensure the integrity of the liquidation process.

  • For instance, roles and permissions are enforced using access control mechanisms.

The following subsection guides you through the liquidation process in detail.

PreviousCollateral AccountingNextFixed Spread Liquidation Strategy

Last updated 11 months ago

Was this helpful?