Activate and manage a synchronous vault
This page will guide you through activating synchronous deposits.
Last updated
This page will guide you through activating synchronous deposits.
Last updated
Synchronicity is an advanced feature. Please read this page entirely before activating synchronous deposits on your vaults.
By giving a lifespan
to your vault valuation, you allow the vault to process deposits.
The amount of shares received is computed using the price per share at the last valuation update. When syncDeposit()
is available, the requestDeposit()
function is disabled. Redemptions continue to be processed asynchronously.
Most Lagoon Vaults rely on offchain oracles to know their valuation. Since this value is not continuously assessed, it might differ from reality with time.
For example 2 days after a valuation update, the fair valuation might have increase while it's registered value in the vault is still the same, such situation would create an arbitrage opportunity at the expense of shares holders.
We advice vault curator and administrators to be extremely careful with this feature.
First give your totalAssets variable a lifespan. This value, expressed in seconds, determines for how long users will be able to call syncDeposits. To update it, call as the safe
role:
lifespan
Duration in seconds during which the valuation will be considered valid.
The lifespan value can't be too close to uint128.max because it might cause an overflow. If you want to allow sync deposits for an "unlimited" amount of time, you can put: 31536000000
seconds, roughly ~1000 years.
Now as usual. After the call to settleDeposit or settleRedeem, users will be able to do synchronous deposits.
It is not possible to propose a new valuation while the current one is considered valid (see point above).
To update the valuation, the safe
role first has to call:
After this call, isTotalAssetsValid
will return false and the Valuation Oracle
and the safe
can follow the standard Update the vault valuation & settle requests procedure.