ERC-4626 tokenized vaults: deposit, mint, withdraw and redeem (with max sugar) with automatic approvals, plus share/asset conversion and inspection helpers. Works with any 4626-compliant vault — sDAI, Morpho (MetaMorpho), Yearn v3 and more. Also supports ERC-7540 asynchronous vaults (request/claim flows, operators) and ERC-7575 multi-asset vaults with external share tokens, such as Centrifuge.
| Command | Description |
|---|
| vault:claim-deposit | Claim the shares of a fulfilled ERC-7540 deposit request. Pass max as the amount to claim everything claimable. By default the amount is exact assets; pass --exact shares to claim an exact amount of shares instead. |
| vault:claim-redeem | Claim the assets of a fulfilled ERC-7540 redemption request. Pass max as the amount to claim everything claimable. By default the amount is exact shares; pass --exact assets to claim an exact amount of assets instead. |
| 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. |
| vault:mint | Mint an exact amount of ERC-4626 vault shares, approving the vault for the required assets (previewMint, which rounds up) automatically when needed. For ERC-7540 asynchronous vaults use vault:request-deposit instead. |
| vault:redeem | Redeem an exact amount of ERC-4626 vault shares for the underlying asset. Pass max as the amount to redeem the full share balance. For ERC-7540 asynchronous vaults use vault:request-redeem instead. |
| vault:request-deposit | Request a deposit into an ERC-7540 asynchronous vault, approving the vault automatically when needed. The assets are taken immediately; claim the shares with vault:claim-deposit once the request is fulfilled. |
| vault:request-redeem | Request a redemption of shares from an ERC-7540 asynchronous vault. Pass max as the amount to request the full share balance. The shares are taken immediately; claim the assets with vault:claim-redeem once the request is fulfilled. |
| vault:set-operator | Approve (default) or revoke an operator on an ERC-7540 vault. Operators can request and claim on behalf of the connected account. |
| vault:withdraw | Withdraw an exact amount of the underlying asset from an ERC-4626 vault, burning the required shares. Pass max as the amount to withdraw everything available. For ERC-7540 asynchronous vaults use vault:request-redeem instead. |
| Helper | Returns | Description |
|---|
| @vault:asset | address | Underlying asset token address of an ERC-4626 vault. |
| @vault:claimableDeposit | number | Assets of a fulfilled deposit request claimable from an ERC-7540 vault, in base units of the asset. |
| @vault:claimableRedeem | number | Shares of a fulfilled redemption request claimable from an ERC-7540 vault, in base units of the share. |
| @vault:convertToAssets | number | Amount of underlying assets an ERC-4626 vault would return for a given amount of shares, in base units of the asset. |
| @vault:convertToShares | number | Amount of shares an ERC-4626 vault would mint for a given amount of underlying assets, in base units of the share token. |
| @vault:isOperator | bool | Whether an account is an approved operator of a controller on an ERC-7540 vault. |
| @vault:maxWithdraw | number | Maximum amount of underlying assets an account can withdraw from an ERC-4626 vault, in base units of the asset. |
| @vault:pendingDeposit | number | Assets of a pending (not yet fulfilled) deposit request on an ERC-7540 vault, in base units of the asset. |
| @vault:pendingRedeem | number | Shares of a pending (not yet fulfilled) redemption request on an ERC-7540 vault, in base units of the share. |
| @vault:share | address | Share token address of a vault. ERC-7575 vaults expose a separate share token; plain ERC-4626 vaults are their own share token, so the vault address itself is returned. |
| @vault:totalAssets | number | Total amount of underlying assets managed by an ERC-4626 vault, in base units of the asset. |