Skip to main content

What is a vault deposit transaction?

A vault deposit transaction sends assets into a DeFi vault (often ERC-4626) and receives vault shares in return. This example uses an ERC-4626 vault deposit. Adjust the contract address, function signature, and amount for your protocol.

1) Set up the client and signer

Create the SDK client and signer used for approvals.

2) Encode the vault deposit

Encode the ERC-4626 deposit call data for the vault.

3) Create the deposit transaction

Create a transaction proposal with the encoded deposit data.

4) Sign and execute

Sign the initiator payload hash, submit the encoded signature, then execute once approvals are ready.

Full example