Initialize
Embedded Wallet (Privy)
The SDK reads onlywallet.account.address — it never signs. Any viem-compatible wallet works, including embedded wallets from Privy, Dynamic, or similar providers.
Deposit
Withdraw
Check User Current Balance
getUserCurrentBalance returns a unified view of all three balance states for a vault position. Call it on load and after any deposit or withdrawal transaction to keep your UI in sync.
After an async deposit
When a user deposits withdepositMode: 'async', the amount appears in pendingDeposit while the vault solver queues it. During this time the funds are locked in the provisioner contract and are not yet earning yield. They move to balance once the solver settles the request — usually within 2 hours.
After an async withdrawal
When a user withdraws withdepositMode: 'async', the amount moves from balance to pendingWithdraw. During this time the vault shares have been redeemed and the assets are no longer earning yield, but they have not yet been transferred. Once the solver settles the request (usually within 2 hours), the assets become claimable as ERC-20 tokens in the receiver wallet.
Sync deposit and withdrawal
Sync transactions skip the queue. The balance moves immediately — nopendingDeposit or pendingWithdraw. Morpho vaults operate in sync mode; Aera vaults operate in async mode.
Wagmi / writeContract
When integrating with wagmi, usestep.tx fields with writeContractAsync. Pass step.tx.attribution as dataSuffix — wagmi appends it to the calldata before sending. Omitting dataSuffix silently drops attribution: the transaction succeeds but volume is not tracked.
Slippage
BothgetDepositTx and getWithdrawTx accept a slippageBps parameter (integer basis points, e.g. 50 = 0.5%). Defaults to 100 (1%).
Error Handling
Go Deeper
SDK Reference
Full constructor, methods, result shapes, and errors.
Deposit Your First Dollar
The full integration guide with confirmation and fallback guidance.