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
  • Understanding Swap Pools
  • How to Execute a Swap

Was this helpful?

Edit on GitHub
  1. Build
  2. Forex AMM

Swap User Guide

PreviousArchitectureNextLP User Guide

Last updated 6 months ago

Was this helpful?

Understanding Swap Pools

Each swap involves a pair of assets, each managed by a separate Swap Pool. The Pendulum Portal provides an , showing the following details for each:

  • Name: The name of the token managed by this Swap Pool.

  • Pool Liabilities: The total liquidity provided for this pool (this is a simplified definition).

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

  • APR: The estimated annual percentage rate for liquidity providers.

  • My Pool Amount: The number of LP tokens you own for that Swap Pool.

For users who want to execute a swap, the most important information is the liabilities and reserves of the pools. The ratio of reserves to liabilities is called the Coverage Ratio (CR) of the respective Swap Pool. Each swap impacts the CR of the two Swap Pools involved: if you trade token A for token B, the CR of token A’s Swap Pool will increase (as its reserves increase), while the CR of token B’s Swap Pool will decrease (as its reserves decrease).

The effective exchange rate of a swap is influenced by the changes in the CRs of the involved Swap Pools. If either CR deviates further from 100%, the exchange rate becomes less favorable; if either CR moves closer to 100%, it becomes more favorable. The overall effect on the exchange rate is determined by the combined impact of both Swap Pools.

For more information on these effects, refer to the explanation of .

How to Execute a Swap

To execute a swap, navigate to . The swap interface works as follows:

  1. Select the input token using the drop-down menu in the top-right corner.

  2. Enter the input amount. The value of this amount, expressed in USD, is displayed below the input field.

  3. View your current balance of the input token and the maximum amount you can use. You can click the "50%" or "MAX" button to select 50% or 100% of your available balance as the input amount.

  4. Select the output token using the drop-down menu. Your current balance of this token is shown below the drop-down.

  5. Review the estimated output amount and its value in USD.

  6. Check the estimated exchange rate.

  7. For more details about the swap, click on the rounded arrow icon:

    • The expected output amount

    • The minimum output amount you will receive based on the current slippage tolerance. If the output amount falls below this minimum, the swap will not proceed. You can set the slippage tolerance by clicking the settings icon (see point 8).

    • The swap fee: this is the fee distributed to liquidity providers and the protocol treasury. This fee is already factored into the expected output amount.

  8. Adjust the slippage tolerance and transaction deadline by clicking the settings (cogwheel) icon. The slippage tolerance sets the minimum output amount; the swap will be canceled if the output falls below this threshold. Additionally, the swap will not be executed if it isn’t confirmed on-chain within the specified transaction deadline.

  9. Execute the swap by clicking the button. In most cases, you will need to approve the input amount first (the button will read "Approve"). After approval, click the button again to submit the swap transaction (the button will then read "Swap").

If the transaction is successful, a "Transaction successful" message will appear, confirming that your tokens have been swapped.

overview of all available Swap Pools
coverage ratios and slippage
the Forex AMM area of the Pendulum Portal
Screenshot of the swap UI