iGain Protocol
  • iGain Protocol
  • Introduction
    • Basic Concepts of Options
    • A Decentralized Approach
  • The Core Protocol
    • Long and Short Tokens
    • Built-in DEX
      • Liquidity Provider
      • Advanced: Customized Proportion
    • Buy/Sell Options
    • Redemption
  • System Properties
    • Protocol Fee & Dynamic Trading Fee
  • iGain Universe
    • Impermanent Gain
      • Background: AMM & IL
      • Price Settlement
      • Hedge with Impermanent Gain
      • Gain with iGain
    • Interest Rate Synth
      • Introduction
      • Price Settlement
      • Fixed APY Borrowing/Lending
        • Examples
      • All-in-one Proxy
      • Underlying Token
  • Contracts
  • FAQ
Powered by GitBook
On this page
  • For Example:
  • Instruction for trading Long/Short tokens into DAI:
  • Instruction for redeeming DAI back after the period expired:

Was this helpful?

  1. The Core Protocol
  2. Built-in DEX

Advanced: Customized Proportion

PreviousLiquidity ProviderNextBuy/Sell Options

Last updated 4 years ago

Was this helpful?

While providing liquidity, deposited DAI will mint Long and Short tokens in a 1:1 proportion. However, directly putting all Long and Short tokens into the pool might change the current proportion of Long and Short, which causes the price to change.

It would then create a potential arbitrage opportunity whenever someone provides fresh liquidity. To prevent such situations, an advanced function: "customized ratio" is invented. With this function, liquidity providers may customize the input proportion of Long and Short tokens to avoid potential losses.

For Example:

Given the conditions of 10,000 Long tokens + 3,000 Short tokens in the pool, a new liquidity provider just minted 100 Long tokens + 100 Short tokens with 100 DAI.

To provide liquidity without changing current prices, the proportion in the pool must remain the same. Therefore, only 100 Long tokens + 30 Short tokens can be added to the pool. This will then leave 70 Short tokens on the hand of the liquidity provider, which can be directly traded back into DAI or redeem after expiration.

Instruction for trading Long/Short tokens into DAI:

Instruction for redeeming DAI back after the period expired:

*There's no frontend interface for this advanced function. To add liquidity by arbitrary proportion, you need to call mint() and depositLP function on manually.

Buy/Sell Options
Redemption
etherscan.io