Pendulum Docs
  • Learn
    • Welcome to Pendulum
    • Our Journey
    • Litepaper
    • Tokenomics
      • Token Utility
      • Unlocking Vesting Tokens
    • Roadmap
    • Grants Received
  • Build
    • Introduction
    • Network Parameters
    • Build Environment
      • Local relay chain setup
      • Local Pendulum chain setup
      • Pre-Configured Pendulum
        • Install
        • Configure
        • Launch
        • Sub-commands
          • export-genesis
          • generate-specs
          • generate-docker
      • Foucoco (testnet)
      • Troubleshooting
    • Developing dApps
      • ink!
    • Node Operators
      • Collators
        • Collators List
        • Set up Collator
          • Hardware Requirements
          • Ubuntu Installation
          • Docker Installation
          • Keys Management
          • Become a Collator
          • Node upgrade instructions
      • Spacewalk Vaults
    • Integrations
      • Indexers
      • Oracles
      • Wallets
    • Spacewalk (Stellar bridge)
      • User
        • Spacewalk Step-by-step guide
          • Asset Redemption Post-Vault Liquidation
      • Operating a Vault client
        • Getting Started
          • Testing it locally
            • Building pallets and testchain
            • Creating test accounts
            • Testing the vault client
        • Usage
          • Issue assets
          • Redeem assets
        • Collateral and Liquidation
          • Recovering a vault after liquidation
        • Fees, Costs and Incentives
        • Vault rewards
          • Claiming Vault rewards
        • Troubleshooting
          • Generating metadata
    • Forex AMM
      • Architecture
      • Swap User Guide
      • LP User Guide
        • Swap Pools
        • Backstop Pool
        • Cross Interaction
      • Coverage Ratio and Slippage
      • Deployment Parameters
      • Security and Audits
    • Technical FAQ
    • Status reports
      • 22-10-11 Foucoco stopped after runtime upgrade
  • Community
    • Crowdloan
      • Sign T&Cs for rewards
    • Staking
      • Choosing a Collator to Stake with for $PEN Staking Rewards
      • Delegation
      • Rewards
      • Further Operations on Delegators
    • Testnet Faucet
    • On chain identity guide
    • Cross-chain transfer KSM
    • Using Ledger
    • Governance
    • PEN and AMPE Wallets
    • Add PEN/DOT Liquidity to StellaSwap
    • Pendulum Grant Program
    • Amplitude Grants Program
    • Ambassador Program
    • Ambassador Bounties
  • Resources
    • FAQ
    • Links
      • Website
      • Github
      • Social Media
    • Audits
Powered by GitBook
On this page
  • Coverage Ratio
  • Slippage Curve
  • Example Slippage Curves

Was this helpful?

Edit on GitHub
  1. Build
  2. Forex AMM

Coverage Ratio and Slippage

Coverage Ratio

Each Swap Pool has two key parameters that evolve over time:

  • Reserves: The amount of tokens available in the pool for swaps.

  • Liabilities: The amount of tokens the Swap Pool owes to liquidity providers (LPs). If all LPs return their LP tokens to withdraw liquidity, they are entitled to receive this total amount.

The reserves fluctuate due to swap activities, while liabilities change as LPs deposit or withdraw liquidity.

If reserves fall below liabilities, the Swap Pool cannot immediately fulfill the full amount owed to LPs. To prevent this, the Forex AMM is designed to keep reserves aligned with liabilities as closely as possible.

This alignment is expressed through the Coverage Ratio (CR), defined as: CR = Reserves / Liabilities

  • A CR below 100% indicates insufficient coverage of liabilities.

  • A CR above 100% indicates an excess concentration of liquidity in the Swap Pool.

The ideal CR is 100%, representing a balanced state where reserves perfectly match liabilities.

Slippage Curve

To maintain balance in the Swap Pools (i.e., a CR of 100%), the Forex AMM incentivizes users to make swaps that move the CR closer to this target. The exchange rate is adjusted accordingly—becoming more favorable when the CR approaches 100% and less favorable when the CR deviates further from 100%.

Each swap involves two Swap Pools: the input Swap Pool and the output Swap Pool. The change in the CR of each pool influences the exchange rate. Consider the following example:

  • The CR of the input Swap Pool changes from 50% to 75%.

  • The CR of the output Swap Pool changes from 100% to 75%.

In this case:

  • The input Swap Pool’s CR moves closer to 100%, positively impacting the exchange rate and increasing the output amount by, say, 0.45%.

  • The output Swap Pool’s CR moves away from 100%, negatively impacting the exchange rate and decreasing the output amount by, say, 0.14%.

As a result, the overall effect is that the output amount is 0.31% above the market rate.

The relationship between CR changes and the effective exchange rate is mathematically expressed through a slippage curve. Each Swap Pool has its own slippage curve, which determines how it responds to changes in its CR. The Forex AMM utilizes different slippage curves for stablecoin Swap Pools and non-stablecoin Swap Pools to account for their respective volatility risks.

Example Slippage Curves

The slippage curve of a Swap Pool describes its influence on the exchange rate based on the CR before and after a swap, making it a function of two parameters. Below, we illustrate the slippage curve used by the Forex AMM for stablecoin Swap Pools, showing its values for various combinations of initial and final CRs.

The first table shows the slippage curve that the Forex AMM uses for stable coin Swap Pools.

End CR 0
End CR 0.2
End CR 0.5
End CR 0.75
End CR 1
End CR 1.5
End CR 2

Start CR 0

0%

1.2%

0.98%

0.8%

0.64%

0.34%

0.07%

Start CR 0.2

-1.22%

0%

0.83%

0.66%

0.5%

0.2%

-0.06%

Start CR 0.5

-0.99%

-0.84%

0%

0.45%

0.3%

0.02%

-0.23%

Start CR 0.75

-0.81%

-0.66%

-0.45%

0%

0.14%

-0.13%

-0.37%

Start CR 1

-0.64%

-0.5%

-0.3%

-0.14%

0%

-0.26%

-0.5%

Start CR 1.5

-0.34%

-0.2%

-0.02%

0.13%

0.26%

0%

-0.74%

Start CR 2

-0.07%

0.06%

0.23%

0.37%

0.5%

0.73%

0%

The second table shows the slippage curve that the Forex AMM employs for non-stable coin Swap Pools.

End CR 0
End CR 0.2
End CR 0.5
End CR 0.75
End CR 1
End CR 1.5
End CR 2

Start CR 0

0%

4.92%

3.95%

3.22%

2.55%

1.38%

0.38%

Start CR 0.2

-5.18%

0%

3.3%

2.6%

1.96%

0.83%

-0.13%

Start CR 0.5

-4.11%

-3.42%

0%

1.76%

1.16%

0.09%

-0.81%

Start CR 0.75

-3.33%

-2.67%

-1.79%

0%

0.55%

-0.46%

-1.33%

Start CR 1

-2.62%

-2%

-1.17%

-0.55%

0%

-0.97%

-1.8%

Start CR 1.5

-1.4%

-0.84%

-0.09%

0.46%

0.96%

0%

-2.63%

Start CR 2

-0.38%

0.13%

0.81%

1.31%

1.77%

2.56%

0%

PreviousCross InteractionNextDeployment Parameters

Last updated 6 months ago

Was this helpful?