Get max deposit

Get max deposit on Avantis

Base
Base

Reads onchain state

Reads the most stablecoin the Avantis vault will accept in a deposit right now. The vault's maxDeposit is the room left under its deposit cap, the same for every wallet, and zero once total assets reach the cap. Reach for it to clamp a deposit with a min so it lands instead of reverting at the cap, or to wait for room to open before depositing.

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