Vault post-deployment operations
Set up your Vault's parameters to start operating.
After deploying a Vault using the Lagoon Vault Factory, a few essential steps must be performed to enable proper funds flows and user interactions.
Underlying asset approval
To enable user withdrawals, the custodial wallet (safe
parameter) must infinite approve the underlying
with the vault address as spender.
Call the following function on the underlying asset contract:
spender (address)
: The deployed Vault contract address. This is the address that will be allowed to move the tokens from the custodial wallet.value (uint256)
: The approval amount. To avoid repeated approvals, it is recommended to approve an infinite allowance. Use the following constant value:
Without this approval, the Vault will not be able to process user withdrawals.
Verify your vault code on Etherscan
Identify your vault as a proxy
Before interacting with your Vault, you must confirm that it is a proxy contract.
Steps to Verify the Proxy
Access Your Vault Contract
Open your Vault’s contract page on the relevant block explorer (e.g., Etherscan, Arbiscan, etc..).
Navigate to the Contract Tab
Click on the
Contract
tab.
Click “Is this a proxy?”
Scroll to the top right of section, click on the “Is this a proxy?” button and then on the "Verify" button.
Confirm Proxy Verification
If verified, the explorer will display the interaction with the proxy logic.
Once your Vault is confirmed as a proxy, you will be able to access the Read and Write functions of the deployed Vault contract. This is required for executing operations such as updating NAV or settle.
Initialize your vault
To finalizes the Vault setup, you must initialize it by performing the first NAV update and initial settlement.
You can initialize your Vault in two ways:
Using Etherscan by directly calling the contract functions
Through the Lagoon Vault UI (via deep link – coming soon)
Initialization via Block Explorer
1. Access Your Vault Contract
Find your Vault on the block explorer of the deployed chain.
2. Propose the Initial NAV
_newTotalAssets (uint256)
: Set this value to0
to initialize the Vault with a 1:1 ratio (1 underlying = 1 share
).
3. Perform First Settlement
_newTotalAssets (uint256)
: Again, set this to0
to confirm and validate the initial state with a 1:1 ratio.
Your Vault is now initialized and fully operational.
Last updated