Get max withdrawal
Get max withdrawal

Avantis · Reads onchain state

Reads the most stablecoin a wallet can withdraw from the Avantis vault by the vault's own bound. The vault's maxWithdraw is the smaller of the wallet's share value and the headroom left before the reserve behind open trades reaches the withdraw threshold. That headroom is measured against the vault's open interest multiplied balance, so it can exceed what an exit can actually take: the binding check is the utilization the exit would leave, which reverts it at the threshold. Reach for it to clamp a withdrawal to what the vault declares, alongside the utilization ratio and threshold for the exact gate.