Preview withdrawal

Preview withdrawal on Avantis

Base
Base

Reads onchain state

Reads how many Avantis vault shares withdrawing an exact stablecoin amount would burn right now. The vault's previewWithdraw adds the collateral health fee to the amount before converting, rounding up, so it is exactly what the withdrawal burns in the same block. It does not check the utilization gate, which can still revert the exit. Reach for it to confirm a holding covers a withdrawal before making it, or to compute the share cost of an exit while the fee is in force.

Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.

More on Avantis · 37