Deposit and Redemption flows
Lagoon vaults' deposit and withdrawal flows are based on an asynchronous mechanism.
Asynchronous deposits and withdrawals follow a four step flow. Requests are grouped and settled at a single valuation point, ensuring consistent pricing within each settlement cycle.
Deposit flow:

Request
User signals intent to deposit
Users call requestDeposit to signal their intent to enter the vault. Assets are transferred to the pending silo, a utility contract deployed at vault creation to hold assets awaiting settlement.
Valuation and Settlement
Curator batches and processes requests at a valuation point
Settling requires a fair valuation of the vault's positions. The valuation provider submits a NAV to the vault. The curator reviews and approves it by calling settleDeposit, ensuring no settlement occurs on an unverified valuation.
All queued deposit requests are then processed at this single valuation point. The corresponding shares are minted.
Claim
User receives shares after settlement
After settlement, users start earning directly. Ownership of the vault is represented by an ERC-20 share token. Shares are held inside the vault and can be claimed at any time on the vault page.
Redemption flow
Like deposits, redemption requests can be cancelled until the valuation for their epoch is proposed (from v0.6.0; earlier versions do not allow cancelling a redemption).

Request
User signals intent to withdraw
Users call requestRedeem to signal their intent to exit the vault. Shares are transferred to the pending silo. From v0.6.0, the request can be cancelled with cancelRequestRedeem until the valuation for its epoch is proposed.
Settlement
Curator batches and processes requests at a valuation point
The valuation provider submits a NAV. The curator reviews, approves, and calls settleRedeem. All queued redemption requests are processed at this single valuation point. The corresponding assets are unlocked.
Claim
User receives assets after settlement
After settlement, assets are available for the user to claim on the vault page.
Lagoon Epoch workflow

Last updated