Derify Protocol Documents
  • About Derify
    • General
    • Trading
    • Margin Token
    • Trading Token
    • Position Mining
    • Brokers
    • Grant Program
    • eDRF & Governance
    • Bond
    • Insurance, Buyback and Burn
    • Other
  • Getting Started
    • Tutorial
      • Connect Wallet
      • Choose Broker
      • Faucet
      • Deposit & Withdraw
      • Open Positions
      • Close Positions
      • Earn
      • Apply For Broker License & License Extention
      • Grant
    • Dictionary
  • DRF Token
    • General
    • Distribution & Release
  • Derify DAO
    • Overview
    • DAO Contributor
  • Whitepaper
    • Introduction
    • Mechanism
      • Contract Calculation
      • hAMM
      • Position Mining
      • Index Price
      • Risk Factor
        • Risk Exposure
        • Risk Ratio
      • Risk Control
        • Position Change Fee
        • Position Restriction
        • Auto Deleverage and Mandatory Liquidation
        • Dynamic Mining Reward
      • Risk Compansation
        • Insurance Pool
        • Bond and Buyback Fund
    • Implementation
      • Transaction Order
      • Side-chain, Rollup and Cross Chain
      • Against Front-running Attack
      • Against Flash-loan Attack
    • Tokenomics
      • DRF Token
      • Trading Fee
      • eDRF Token
      • bToken
    • Community and Governance
      • Broker
      • Developers and Other Members
      • DAO Governance
    • Roadmap
由 GitBook 提供支持
在本页

这有帮助吗?

  1. Whitepaper
  2. Mechanism

hAMM

Hedged Automated Market Making (hAMM) is the liquidity solution for contract calculation, which is inspired by Automated Market Making (AMM).

The goal for AMM is "price discovery", the key formula of which is x∗y=kx*y=kx∗y=k, presented as a curve of price (such as AMM for Uniswap) or surface of price (such as generalized-AMM for Balancer).

However, margin trading is significantly different from spot trading.

In spot trading, it means using aaa amount of asset A to exchange for bbb amount of asset B, while in margin trading, it means depositing mmm amount of margin to withdraw eee amount of equity, which fluctuates over time.

Obviously, when e>me>me>m, the profit of a position comes from the loss of opposite positions.

Thus, the goal for hAMM is "position hedged", the formula is as follows:

X+Y=0X+Y=0X+Y=0
  • XXX is always positive as the sum of total long positions.

  • YYY is always negetive as the sum of total short positions.

The formula means that the sum of total long positions XXX equals to the sum of total short positions YYY in certain derivative.

Both hAMM and AMM take the same path to achieve their goal, i.e., each deviation and imbalance of the system caused by transactions would create reasonable arbitrage possibilities, which would attract external arbitrageurs to trade for risk-free profits, therefore restore the system back to a balanced state.

All mechanisms pertaining to Derify protocol are centered around the key formula of X+Y=0X+Y=0X+Y=0.

上一页Contract Calculation下一页Position Mining

这有帮助吗?