Swap rate calculations are based on the vault’s total assets and debt without implementing sanity checks on the premium/discount factor. An attacker could manipulate the vault’s asset balance (e.g., via flash loans) immediately before swap execution to force extreme swap rates.
The function getAmountOfAssetOut computes the swap output as follows:
Exploitable Swap Rates: An attacker may temporarily lower the vault’s total asset value, forcing a severe discount or premium, to gain an advantageous swap rate.
Financial Losses: Manipulated rates could lead to draining a vault’s reserves or unfairly benefiting malicious parties.
Static analysis (Slither, MythX)
Manual review and economic simulation
Fuzz testing
Rate Limits & Sanity Checks: Impose minimum/maximum bounds on the computed premium/discount factor.
Time-weighted Oracle Values: Use time-averaged or oracle-verified asset values rather than instantaneous totalAssets() calls.
Flash Loan Guards: Introduce measures to detect or block flash loan manipulations of vault balances.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.