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)

Last updated