Vault Type 1

  1. Upon calling the deposit function, first the user will select any of the tokens contained in the underlying pool and the amount they wish to deposit and the token to deposit. They can deposit one of the tokens specified in the pool or the LP token for the pool directly. If the Vault’s underlying pool is a USDC/USDT pool on Uniswap, then a user can select either USDC or USDT or the Uniswap LP token for that pool. All information relating to the parameters of the transaction should be shown in the UI before the user proceeds with execution. These parameters include:

    • If depositing a token, the optimal token split is achieved through zapping such that the user can see the details of the trade necessary to achieve a 50/50 deposit of both tokens into the pool. For example, the user may have 10000 USDC to deposit into a vault that supports a USDC/GUSD pool Uniswap. After calling the deposit function the user can see that in order to deposit 50/50 into the USDC/GUSD pool, firstly a deposit fee of x% is deducted from the 1000 USDC resulting in a balance of 999 USDC. Secondly a swap of 498 USDC for 499 GUSD must be conducted. Resulting in a final balance of 501 USDC and 499 GUSD that will be deposited into the pool.

    • The amount of USDC/GUSD UNISWAP LP tokens to be received. (If depositing a token rather than the LP itself).

    • Amount of Vault Tokens minted for the user by depositing the LP tokens into the vault. Using the Vault’s ‘Price Per Share formula’. (Represents share of the vault)

  2. If the user decides to proceed with transaction the following activity will be executed by the smart contracts:

    1. Using the internal ‘ZAP-IN’ functionality, deduct deposit fee and execute the trade needed to facilitate a 50/50 deposit into the underlying pool.

    2. Deposit the 50/50 tokens into the pool and receive the pools LP token.

    3. Deposit the pool LP token into the incentivized rewards contract and mint a user the vaults LP token using the ‘PricePerShare’ Formula

  1. Upon Withdrawal, the process will be similar but in reverse. Initially, once the withdraw function is called the user can select:

    • The desired token they wish to withdraw into

    • A mix of both tokens as per the underlying pool liquidity. Ie, if the pool has a ratio that is 51% and 49%. This will be the ratio of tokens received.

    • Users can choose to receive the LP token instead of zapping out into the tokens.

  2. The user can select the amount of Vault LP tokens they wish to burn in order to conduct any of the above. All the following parameters related to the withdrawal will be displayed in the UI:

    • Amount of Vault LP token to be burnt.

    • Number of underlying tokens or LP tokens the user can expect to receive after Zapping Out.

  3. If the user decides to execute the withdrawal transaction the following activity will be executed by the ZAP out smart contract:

    • The user's equivalent share of the vault (Pool LP tokens) will be calculated based on the amount Vault tokens the user burns.

    • Those LP tokens will be sent to the user's wallet if they select option 3.

    • The equivalent pool LP tokens will be unlocked and liquidated from the underlying pool to release the 50/50 stable coins and sent to the user’s wallet if option 2 is selected.

    • The equivalent pool LP tokens will be unlocked and liquidated from the underlying pool to release the 50/50 tokens and one will be sold for the desired token specified by the user if option 1 is selected. The token will be sent to the user's wallet.

    • The amount will be sent to the user’s wallet.

Last updated