OpenChainGraph Suite · ART-610 · EVM-Standard Math
ERC-4626 Vault Share Math
Recomputes tokenized-vault conversions from a declared total_assets and total_supply, applying the rounding direction ERC-4626 mandates for each function and showing you which direction produced each number and what the opposite direction would have given. Also computes a deposit-then-redeem round-trip loss bound, the exchange-rate drift between two declared snapshots, and a declared fee. Every quantity is exact uint256 integer arithmetic, the same integer semantics Solidity uses. There is no floating point anywhere in it.
ERC-4626 (Final, 2021-12-22)Exact uint256 integer mathDeclared inputs, no chain reads
๐ All inputs are processed locally in your browser. No data is transmitted. Do not enter real personal data โ use synthetic or anonymised inputs only.
What This Does and Does Not Tell You
ERC-4626 mandates a rounding direction per function, and the reason is stated in the standard's own security considerations: it is considered most secure to favour the vault over its users, so amounts issued to a user round down and amounts a user must supply round up. Getting exactly one of those backwards is how a vault quietly leaks value, one wei at a time, which is why this tool reports each direction separately rather than a single verdict.
What it cannot tell you: whether the numbers you typed match any deployed vault, whether that vault's own implementation applies these directions, whether a rate change between two snapshots came from yield, a loss, a donation or an attack, or whether the fee basis points you declared are what anyone actually charges. It never fetches on-chain state and is never a party to a transaction. A round-trip loss or a zero-share mint reported here is a property of the numbers you supplied under the standard's arithmetic, not an audit of a deployment.
Vault State
OpenZeppelin virtual shares and assets. Uncheck for the naive formula, which is the shape a first-depositor inflation attack drains.
Only meaningful when virtual_amounts is on. A larger offset bounds an inflation-attack loss more tightly.
Both are carried into the receipt verbatim for your own records. Neither selects any behaviour: the same declared state computes identically under any label.
Conversions, Round Trip, Drift and Fee
ERC-4626 fixes the rounding direction per operation, so there is nothing to select here. The direction used is reported alongside each result.
Deposits this many assets, then immediately redeems the shares minted, evaluated against the post-deposit state.
ERC-4626 mandates no fee formula. This applies the OpenZeppelin ERC4626Fees shapes, rounding up.
Copy this paragraph into Claude, OpenClaw, or any MCP-aware agent to run this exact tool, with this sample, and verify the artifact.
Run the AINumbers MCP tool `recompute_erc4626_vault_share_math`. Task: Recompute ERC-4626 vault share/asset conversions from declared vault state under the rounding directions the standard mandates per function, plus a deposit-then-redeem round-trip loss bound, exchange-rate drift between two snapshots, and a declared fee application.
Call it with arguments: {"policy_parameters":{"total_assets":"1000000000000000000000","total_supply":"333000000000000000000","chain_id":"1","network_label":"declared label, not a selector","operations":[{"op":"convertToShares","amount":"1000"},{"op":"convertToAssets","amount":"1000"},{"op":"previewDeposit","amount":"1000"},{"op":"previewMint","amount":"1000"},{"op":"previewWithdraw","amount":"1000"},{"op":"previewRedeem","amount":"1000"}]}}
Verify before trusting: call `verify_execution_hash` on mcp.ainumbers.co (https://mcp.ainumbers.co/mcp) with the parameter `claimed_hash` set to the returned `execution_hash`, passing the full artifact the run returned (the object containing `policy_parameters` + `output_payload` + `execution_hash`; equivalently `policy_parameters` + `output_payload` with `claimed_hash`), not the bare hash string, or re-run the in-page WebMCP tool `recompute_erc4626_vault_share_math`.
Return the ledger link https://ledger.ainumbers.co/ so a human can re-verify without contacting us.
PII rule: All inputs are processed locally in your browser. No data is transmitted. Do not enter real personal data โ use synthetic or anonymised inputs only.
Open the tool with the sample prefilled: https://ainumbers.co/chaingraph/art-610-erc4626-vault-share-math.html#p=v1.H4sIAAAAAAAA_wGOAXH-eyJ0b3RhbF9hc3NldHMiOiIxMDAwMDAwMDAwMDAwMDAwMDAwMDAwIiwidG90YWxfc3VwcGx5IjoiMzMzMDAwMDAwMDAwMDAwMDAwMDAwIiwiY2hhaW5faWQiOiIxIiwibmV0d29ya19sYWJlbCI6ImRlY2xhcmVkIGxhYmVsLCBub3QgYSBzZWxlY3RvciIsIm9wZXJhdGlvbnMiOlt7Im9wIjoiY29udmVydFRvU2hhcmVzIiwiYW1vdW50IjoiMTAwMCJ9LHsib3AiOiJjb252ZXJ0VG9Bc3NldHMiLCJhbW91bnQiOiIxMDAwIn0seyJvcCI6InByZXZpZXdEZXBvc2l0IiwiYW1vdW50IjoiMTAwMCJ9LHsib3AiOiJwcmV2aWV3TWludCIsImFtb3VudCI6IjEwMDAifSx7Im9wIjoicHJldmlld1dpdGhkcmF3IiwiYW1vdW50IjoiMTAwMCJ9LHsib3AiOiJwcmV2aWV3UmVkZWVtIiwiYW1vdW50IjoiMTAwMCJ9XX1yxZ11jgEAAA