Skip to main content
Deposit assets into the Zyfai Vault. Currently only supports USDC on Base chain.
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 hash

Return Type

Example

How It Works

  1. Checks allowance: Verifies if the vault has permission to spend your USDC
  2. Approves if needed: If allowance is insufficient, sends an approval transaction
  3. Deposits: Transfers USDC to the vault and mints shares to your wallet
  4. 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