Formula and accounting assumptions
The model calculates floor(deposit assets × adjusted share supply ÷ adjusted asset balance). Adjusted totals include the virtual offsets you enter. The quotient is rounded down using integer arithmetic; a separate approximate unrounded ratio describes the quote. The discarded fraction is calculated from the exact integer remainder, so large quotients do not erase or inflate the rounding loss. The smallest asset amount that can mint one share is ceil(adjusted assets ÷ adjusted shares). These calculations use distinct asset and share units, so their decimal counts need not match.
Worked hypothetical example
Consider a hypothetical vault with three atomic asset units and two share units, with no virtual offsets. Depositing two asset units gives an unrounded quote of 1.333333 share units but mints only one. Depositing one asset unit mints zero. The minimum deposit for one share is two asset units. The scenario table repeats the calculation at several fractions and multiples of the entered deposit rather than silently rounding every quote to a tradable-looking number.
Interpret the scenarios and limits
This is proportional, fee-free accounting with explicit offsets, not a universal implementation of the ERC-4626 interface. Actual preview functions can incorporate fees, limits and custom accounting. A zero-share result deserves scrutiny even when the deposit amount looks small in display-token units. Inputs must be safe whole numbers; values too large for an exact displayed result are rejected. No wallet, contract balance, token decimals or deposit permission is retrieved, and no transaction is prepared.