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

Was this helpful?

  1. The Core Protocol

Built-in DEX

PreviousLong and Short TokensNextLiquidity Provider

Last updated 4 years ago

Was this helpful?

One of the major features of iGain is its built-in secondary market. There will be no need to integrate or launch on other protocols. The built-in secondary market of iGain protocol is a decentralized exchange (DEX) that supports the automated market making of Long and Short tokens. After minting Long and Short tokens with DAI, users can serve as liquidity providers of the market by adding liquidity. While there is liquidity, Long and Short token holders may swap them in between at the pool.

Pricing Mechanism

The market prices of Long and Short tokens are determined by their real-time proportion. Given a Long tokens and b Short tokens in the pool, they will follow a Constant Product Market Maker law:

a Long=b Shorta\ Long = b\ Shorta Long=b Short

Given the condition of 1 Long + 1 Short = 1 DAI, we can get the marginal price of the Long/Short token by solving simultaneous equations below:

1 Long=ba+b DAI1\ Long = \frac{b}{a+b}\ DAI1 Long=a+bb​ DAI
1 Short=aa+b DAI1\ Short = \frac{a}{a+b}\ DAI1 Short=a+ba​ DAI