Gamma
HomeWeb AppDiscordTwitter
  • Introduction to Gamma
  • ℹ️Features
    • Introduction
    • Strategies
    • Incentives
    • Supported Platforms
    • GAMMA Token
    • Developer Portal
  • ℹ️Using Gamma
    • LP Academy
    • Guides
      • GAMMA Token
        • Purchase GAMMA
        • Stake GAMMA (Gamma)
        • Stake GAMMA (Tokemak)
      • 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
      • GAMMA Token
      • Using Gamma
      • Analytics
      • Incentives
      • Operations
      • Security
    • Glossary
  • ℹ️Information
    • Contracts
    • Audits
    • Tokenomics
    • Contact / Links
    • Brand Assets
    • Governance
Powered by GitBook
On this page
  • Vault (Hypervisor) Deposit
  • Contracts
  • Deposit
  • Withdrawal

Was this helpful?

  1. Features

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)

PreviousGAMMA TokenNextLP Academy

Last updated 8 months ago

Was this helpful?

ℹ️