Gamma
HomeWeb AppDiscordTwitter
  • Introduction to Gamma
  • ℹ️Limit Order Hook
    • Introduction
    • Advantages over CEX Limit Orders
    • Creating Limit Orders
    • Creating Scale Orders
    • Canceling and Claiming Orders
  • ℹ️LP Vaults
    • Introduction
    • Strategies
      • V4 - MultiPosition Strategies
      • Dual Position Strategies - Base/Limit
    • Developer Portal
    • Incentives
    • Guides
      • Providing Liquidity
        • Deposit Liquidity
        • Withdraw Liquidity
        • Stake LP Tokens for Rewards
    • Troubleshooting / Help
      • Transaction Errors
      • Reset the App
      • Using Block Explorers
      • Manually Withdraw
      • Revoke Permissions
    • FAQ
      • Concentrated Liquidity
      • Using Gamma
      • Analytics
      • Incentives
      • Operations
      • Security
    • Glossary
  • ℹ️Perp Vaults
    • Introduction
    • Strategies
  • ℹ️Information
    • GAMMA Token
      • GAMMA Token FAQ
    • Contracts
    • Audits
    • Tokenomics
    • Contact / Links
    • Brand Assets
    • Governance
Powered by GitBook
On this page
  • Vault (Hypervisor) Deposit
  • Contracts
  • Deposit
  • Withdrawal

Was this helpful?

  1. LP Vaults

Developer Portal

Resources for developers and those who wish to build with Gamma

Vault (Hypervisor) Deposit

Contracts

  • UniProxy.sol → Deposit proxy contract with information about deposit ratios. All deposits must go thru UniProxy, not Hypervisor

  • Hypervisor.sol → Main vault manager contract with information about both base and limit liquidity ranges and amounts. To withdraw, interact with the Hypervisor.

Deposit

Functionally the source of any integration would require

1. Getting the ratio of assets

UniProxy.getDepositAmount( lpTokenAddress, tokenProvidedAddress, tokenProvidedQuantity )

returns [minQuanity, maxQuantity]

2. Deposting via the UniProxy → UniProxy.deposit()

UniProxy.deposit( token0Quantity, token1Quantity, userAddress, lpTokenAddress )

Withdrawal

Hypervisor.withdraw( lpTokenQuantityToBurn, destinationAddress, sourceAddress, [0,0,0,0] )

(where "Hypervisor" is the lp token contract, destinationAddress is destination for redeemed token0, token1, sourceAddress is holder of the lp tokens, [0,0,0,0] is a min-out constraint only used on L1)

PreviousDual Position Strategies - Base/LimitNextIncentives

Last updated 9 months ago

Was this helpful?

ℹ️