galleon-yearn-vault
Yearn vault deposit and exit review
Resolve vault version
Identify chain, vault, underlying asset, owner, amount/unit and requested outcome. Use Yearn's official Kong GraphQL service at https://kong.yearn.fi/api/gql for discovery, inspecting its schema rather than inventing query fields. Confirm onchain apiVersion() and verified implementation; V2 vaults, V3 multi-strategy vaults and standalone TokenizedStrategy contracts differ.
For the selected implementation read asset, decimals, owner share balance, total assets/supply, idle assets, strategy debt/allocation, fees/accountant, profit unlocking, shutdown and deposit/withdrawal limits. Use version-matched standard conversions/previews and strategy queue reads. A share-price increase is not an immediately realizable cash amount.
Assess entry or exit
- Keep assets and shares separate. For a V3 exit, compare owner-specific
maxWithdraw/maxRedeemusing the exact supported loss and strategy-queue arguments with requested amount. - Inspect strategy liquidity and queue order. Total assets include deployed debt; a custom queue can change feasibility. Identify canonical/default queue behavior before quoting an available maximum.
- State realized-loss tolerance explicitly in basis points. Yearn V3
withdrawandredeemhave different defaults; a zero-loss request must not rely on permissiveredeemdefaults. Inspect the precise overloaded ABI when encoding. - Simulate the exact action from owner/caller with chosen receiver, loss bound and queue. Approval/allowance, deposit limit and liquidity are independent prerequisites.
- For rate comparison, separate base yield, rewards, fees and unrealized/profit-unlocking effects. Report the observation window; do not annualize one harvest as a promise.
Worked decision
Synthetic 1,000 shares convert to 1,050 USDC accounting value. The owner-specific current withdrawal limit with a 0-bps loss bound is 800 USDC; a requested 1,000-USDC exit is not fully supported. An alternative preview reports 990 at 100-bps allowed loss. Present both as different terms, retain the user's 0-bps bound and request no loss-tolerance expansion automatically. Shares and accounting assets must not be added as separate holdings.