Skip to content

vault:deposit

Deposit an exact amount of the underlying asset into an ERC-4626 vault, approving the vault automatically when needed. Works with any 4626-compliant vault such as sDAI, Morpho or Yearn v3. For ERC-7540 asynchronous vaults use vault:request-deposit instead.

⚗️ Experimental — available at next.evmcrispr.com.

Supports runtime fields inside smart blocks. Use explicit @helper! expressions or captured outputs; other fields are evaluated at build time.

vault:deposit <assets> <into> <vault>
NameTypeEvaluationDescription
assetsnumberRuntime in smart blocksAmount of the underlying asset to deposit, in base units (wei)
intocommandBuild timeKeyword into
vaultaddressBuild timeERC-4626 vault address
NameTypeEvaluationDescription
--toaddressRuntime in smart blocksReceiver of the minted shares (defaults to the connected account)
--no-approveboolBuild timeSkip the automatic allowance check and approve action
# Deposit 100 WXDAI into the sDAI vault on Gnosis (auto-approves)
vault:deposit 100e18 into 0xaf204776c7245bF4147c2612BF6e5972Ee483701
# Deposit 1000 USDC into the Steakhouse USDC Morpho vault on Ethereum
load vault
switch mainnet
vault:deposit 1000e6 into 0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB
# Import the command to drop the vault: prefix
load vault [deposit]
deposit 100e18 into 0xaf204776c7245bF4147c2612BF6e5972Ee483701