Synthetix Docs
  • User Docs
  • Synthetix Exchange
  • Leveraged Tokens
  • For Developers
  • Orientation
  • Synthetix Overview
  • Development Progress
  • V3 FAQ
  • For Developers
    • Technical Architecture
    • Quick Start
      • Base Quickstart
    • Smart Contracts
    • Data Platform
    • Data Dictionary
    • Addresses + ABIs
    • Deployment Info
      • Mainnet
      • Sepolia
      • Sepolia Carina
      • Optimism Mainnet
      • Base Mainnet Andromeda
      • Base Sepolia Andromeda
      • Arbitrum Mainnet
      • Arbitrum Sepolia
    • Smart Contract Audits
    • Perps Market
    • Spot Market
    • Developer FAQ
  • For Perp Integrators
    • 101
    • Perps V3
    • L1 Perp (BFP)
    • Base Andromeda
    • Perps Python SDK
    • Perps V3 Keepers
  • For Liquidity Integrators
    • Creating Accounts
    • Delegating Collateral
      • Liquidity Pools
    • Liquidity Positions
      • Minting and Burning snxUSD
      • Position Liquidations
    • Base LP Guide
  • For Liquidity Pool Managers
    • Creating and Configuring Pools and Vaults
    • Collateral Vaults
      • Vault Liquidations
    • Rewards Distributors
    • Credit and Debt Distribution
  • For Derivatives Market Builders
    • Build on v3
    • Market Development Guide
    • Build on v3 FAQ
    • Operating a Market
    • Registering a Market
  • For Governance Participants
    • Synthetix Governance
    • Elections
  • For Designers
    • Design Resources
Powered by GitBook
On this page
  • Collateralization Ratio (C-Ratio)
  • Retrieving Liquidity Position Data
  1. For Liquidity Integrators

Liquidity Positions

PreviousLiquidity PoolsNextMinting and Burning snxUSD

Last updated 6 months ago

When a liquidity provider calls delegateCollateral, a liquidity position is created or updated in a pool. snxUSD can be minted and burned, effecting the amount of debt associated with the position. If this pool is providing liquidity to markets, the performance of these markets can positively or negatively impact the debt associated with the position as well. Performant markets will reduce the debt of liquidity providers over time.

Each liquidity position consists of an amount collateral, and amount of debt, and a resulting Collateralization Ratio. Liquidity positions are identified as the combination of the relevant Account ID, Pool ID, and Collateral Type Address. (Note that this means one account cannot have two separate positions with the same pool and collateral type.)

Collateralization Ratio (C-Ratio)

Each liquidity position has a collateralization ratio. This represents the relationship between the value of the collateral associated with the liquidity position and the amount of the debt it’s responsible for. This is represented as a percentage. For example, a C-Ratio of 200% means that the value of the collateral is double the amount of debt it’s backing.

The value of the collateral is calculated based on the price of the collateral reported by an oracle via the oracle manager. The value of the debt is the amount of snxUSD minted with this liquidity position, minus the amount of snxUSD burned with this position, plus/minus the debt/credit it is assigned by the markets backed by its pool.

If a liquidity position’s collateralization ratio falls below the Liquidation C-Ratio corresponding to its collateral type, the position can be . To reduce risk of liquidation, collateralization ratios can be increased by depositing additional collateral or burning snxUSD.

Retrieving Liquidity Position Data

A position’s collateral, debt, and resulting C-Ratio can be retrieved with the getPositionCollateral, getPositionDebt, and getPositionCollateralRatio functions, respectively.

The getPositionCollateralRatio function returns the C-Ratio of the specified liquidity position. (If the position has more credit than debt, this function returns 0.) The Liquidation C-Ratio of a given collateral type can be retrieved with the getCollateralConfiguration function. All of these values are represented as an integer with 18 decimal places.

All of the functions which reference a position’s debt (such as getPositionDebt and getPositionCollateralRatio) may update cached values in the system, so they are not declared as view functions. To use them as such, they can be queried using callStatic. All values returned by the system in this way will be accurate regardless of the recency of any internal caching update.

liquidated