Lagoon
  • Back to App
  • Overview
    • What is Lagoon?
    • Lagoon Vault Architecture
    • FAQ
    • Terminology
  • VAULT
    • Overview
    • Deposit and Withdraw flows
    • Vault valuation
    • Fees
    • Roles and capacities
      • Vault admin
      • Valuation Oracle
      • Curator
      • Whitelist Manager
    • Create your vault
      • Vault post-deployment operations
      • Access your vault on Lagoon
    • How to?
      • Update the vault valuation & settle requests
      • Activate and manage a synchronous vault
      • Migrate an existing vault into a new Lagoon vault ?
  • Curation solutions
    • Safe & Zodiac Roles Modifier
    • MPC (Multi-Party Computation) wallet
    • How to?
      • Renounce Safe & Zodiac role modifier ownership
  • Developer hub
    • Key Data Structures and Epoch mechanism
    • Integration
      • Get a user position
      • Async deposit flow
      • Synchronous deposit flow
  • RESOURCES
    • Addresses
    • Audits
    • Brand Kit
    • X
    • Blog
    • LinkedIn
Powered by GitBook
On this page
  • Deposit flow
  • Redemption flow
  1. VAULT

Deposit and Withdraw flows

Lagoon vaults' deposit and withdrawal flows are based on an asynchronous mechanism.

PreviousOverviewNextVault valuation

Last updated 13 days ago

Deposit flow

1) Request Deposit

Users manifest their desire to enter a vault by calling requestDeposit. During this operation, users' assets are transferred to the pending silo.

The pending silo is a utility contract deployed at the creation of the vault to store the pending assets of the requests. It is used to simplify the vault’s internal accountability. It is also used for redemptions requests.

2) Valuation update and settlement

For more security, it is a two-steps procedure:

  • First, the valuation oracle will propose the valuation by storing it in the vault.

  • Then, the curator can accept this valuation by calling settleDeposit.

If there are pending deposit requests, they will be settled and the corresponding shares are minted.

3) Claim the shares

Redemption flow

The redemption flow is the same as deposit one with some little differences:

  • Users can't cancel their withdraw requests. This is to prevent users from making curator unwind positions for nothing.

  • Curator can't claim on behalf of users and distribute back the assets. The user must claim them.

To settle the requests, the vault need the fair valuation of its various positions. In Lagoon, this information is injected into the smart contract by the .

After the settlement, users start earning directly. Their ownership of of the vault is represented by an ERC20 token, named the share. Shares are waiting inside the vault and can be claimed anytime. To get the exact position of a user you can follow this tutorial .

It is possible for the curator to claim the shares on behalf of the users. In this case, the shares will be transferred to the address of the user. You can find how .

Valuation Oracle
Get a user position
here
Deposit workflow
Redemption workflow