LBVault (Incl. Native)
LBVault is the keeper of the funds; It is the only entry and exit point into the strategy.
LBVault.sol - Exists to facilitate non-AVAX pairs; LBVaultNative.sol is for any AVAX pair. When integrating this is an important note to make.
The Vaults are our automated liquidity vaults, keeping the mission in mind of optimising DEX liquidity the focus is on easily allowing managers to deploy strategies and LPers to deploy capital into these vaults.
The capabilities of these vaults are the following:
ERC20 wrapper for Trader Joe Dex V2 LP Positions
Allow for the keeper role to control the LP range (through the strategy)
Allow for the keeper role to re-range the total position (through the strategy)
Fully Fungible
Owner Role: The Owner of the LBVault contracts should be set to the SteakHut multisig address for any potential whitelisting to occur. (SteakHut MultiSig 3/4 - 0xD316d2AA04d71Fd1E332437b0Cb5d261FD2F99AE). This should only be completed after all setup occurs.
Tracking of Positions
When liquidity is added to the vault, SteakHut LB vault tokens are minted and credited to the provider.
Inversely, SteakHut LB tokens can be burned to redeem that proportion of the pool's V2 position liquidity and fees earned.
SteakHut LB tokens represent proportional ownership (or "shares") of the underlying JOE Dex V2 position.
Deposit Funds into the System
Depositing funds into the system is called using the below function. (Native AVAX version is also available under the depositAVAXPair() function, the user must pass the correct msg.value to correspond with the amounts otherwise tx will revert)
AmountX and AmountY are the amounts of funds that the user is willing to deposit into the system whilst amountXMin and AmountYMin are the minimum amount of tokens that the user is happy to receive due to the conversion ratio).
It is important to note that when depositing funds are not automatically put to work in the strategy.
Only a 'keeper' may call the earn() function in order to put the funds to work. However, only if the current bin range and strategy parameters are maintained.
Withdraw Funds from the System
To remove funds from the system withdraw shall be called. The input argument will be the number of shares that the user wishes to be removed from the system.
This will return the underlying tokens in the same ratio as currently used in the strategy. It is important to note that this won't necessarily be the same ratio that was placed into the vault due to the underlying changes in the live liquidity.
Should a user wish to withdraw all of the shares, there is a helper function also available under withdrawAll().
Last updated