The Vault is different from the Safe subaccount. The Vault is a shared contract where users deposit assets and receive shares. The Safe is a personal smart wallet for automated yield optimization.
The vault is redirecting the deposited assets to one globally shared safe subaccount for automated yield optimization. Full architecture documentation
Signature
Parameters
Returns
Deposit transaction result with transaction hashReturn Type
Example
How It Works
- Checks allowance: Verifies if the vault has permission to spend your USDC
- Approves if needed: If allowance is insufficient, sends an approval transaction
- Deposits: Transfers USDC to the vault and mints shares to your wallet
- Waits for confirmation: Returns after the transaction is confirmed
Notes
- Wallet must be connected via
connectAccount()before calling - The amount is in human readable format (not wei/smallest units)
- You receive vault shares in return, representing your stake in the vault
- Use getVaultShares to check your share balance
- To withdraw, use vaultWithdraw