LogoLogo
Start hereWhy Flype?Less divergence LossIMMath
  • Vaults
    • UNI-V3 Vaults
    • Strategies
    • Strategy manager
    • Security audit
    • Deployment Addresses
  • Liquidity Exchange
    • Flype Liquidity Exchange
    • Flype-between
    • Flype-in
    • Flype-out
    • Pools
    • Multiple Yields
    • Advantages
  • IMM
    • Background
    • Pools & Oracle Market Price
    • Execution of Trades
    • Three Possible States in IMM
    • The Math Behind IMM
      • IMM Notation
      • IMM Functions
      • IMM Balancing Indicator
      • IMM - Arbitrage Trades
      • Transaction fee
      • Adding Liquidity
      • Removing Liquidity
      • IMM Advantages
      • Simulations and performances
  • Resources
    • FAQ
    • Roadmap
    • References
    • Official Links
Powered by GitBook
On this page
  • Depositing a pair with equal value
  • Getting Flype Liquidity Provider Tokens (FLYP-LP Tokens)

Was this helpful?

  1. IMM
  2. The Math Behind IMM

Adding Liquidity

PreviousTransaction feeNextRemoving Liquidity

Last updated 3 years ago

Was this helpful?

Depositing a pair with equal value

Depositors of liquidity to the Flype pools are required to deposit a token pair consisting of an LP token and ETH. Both tokens should have an equal value, when denominated in US dollars based on Oracle prices.

Getting Flype Liquidity Provider Tokens (FLYP-LP Tokens)

Liquidity tokens are minted to record the relative proportion of total reserve that should be attributed to each liquidity provider according to their contribution. These tokens can be burned at any time to return a proportional share of liquidity to the provider. When a new liquidity provider deposits tokens into an existing pool, the number of liquidity tokens minted is computed based on the existing quantity of tokens :

However, if it is the first pool deposit, Xstarting = 0, then this formula will not work. In that case, Flype mints shares equal to the geometric mean of the amounts deposited, as follows:

This formula ensures that the value of a liquidity pool share at any time remains unaffected by the ratio at which liquidity was initially deposited.

For example, if a depositor’s initial deposit is 800 LP tokens and 2 ETH, they will receive

[3]