The _withdrawFromVault() function withdraws crvUSD from curveVault with a min_amount of 0, leaving users vulnerable to slippage or sandwich attacks in the Curve pool. This medium-impact, medium-likelihood issue could reduce withdrawal amounts in volatile conditions, eroding user returns and trust.
The function calls curveVault.withdraw() without enforcing a minimum output. Example:
User withdraws 10,000 crvUSD.
Attacker frontruns, shifts pool price down 10%.
User receives 9,000 crvUSD; attacker backruns, profiting 1,000 crvUSD.
The lack of slippage protection exposes users to market manipulation during withdrawals.
Users may lose a portion of their funds (e.g., 1,000 crvUSD per attack), a medium-impact loss that could accumulate in volatile markets. The medium likelihood stems from Curve pool dynamics, where price swings are plausible, potentially discouraging vault usage.
Testing Frameworks: Foundry to simulate sandwich attacks on withdrawals.
Add a minAmount parameter to _withdrawFromVault():
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.