Deposit

The deposit function takes tokens and returns ownership claims for a certain fraction of the assets held in the strategy.

The flow is next:

  1. Pull in tokens (ETH, USDC, and oSQTH) from the sender in a proportion same as the current strategy holdings

  2. Poke positions so the vault's current holdings are up to date

  3. Calculate shares to mint

where share price calculated as:

and Value calculated in ETH terms as:

​4. Check deposit cap

5. Mint shares to user

Example

Suppose that Alice would like to deposit 10 ETH and match it with the necesasary amount of USDC and oSQTH.

The current strategy holdings are 53.4 ETH, 45681 USDC, and 216.3 oSQTH.

After the Alice's deposit there will be 63.4 ETH, that need to be matched with:

​At the current prices of ETH/USDC 1500 and oSQTH/ETH 0.085, with the total supply of shares = 100, there will be minted:​

​To simplify the deposit we introduce a deposit helper, that takes the user's wETH and automatically swaps it to a set of wETH, USDC, and oSQTH targeting the required strategy proportion.

Last updated