In the VaultRouterBranch contract's withdrawal mechanism, while both deposit()
and redeem()
functions implement slippage protection through minimum output parameters, the initiateWithdrawal()
function lacks this critical protection.
Users initiating a withdrawal face significant risks due to the lack of slippage protection. When they initiate a withdrawal, they cannot specify a minimum acceptable asset amount, leaving them exposed to potential value decline during the withdrawal delay period. This forces users into difficult choices if the value drops: they must either accept unfavorable rates when redeeming, leave their funds locked indefinitely in the withdrawal request, or incur additional gas costs to cancel and restart the withdrawal process. This design creates unnecessary financial risk and friction in the withdrawal process, potentially trapping user funds or forcing them to accept substantial losses.
User initiates withdrawal of 1000 shares when 1 share = 1 ETH
During the withdrawal delay period, share value drops to 0.7 ETH
User must either accept a 30% loss or leave funds locked in the contract
Initialize vault with token pair
Deposit assets and receive shares
Initiate withdrawal request
Manipulate price during delay period
Demonstrates forced acceptance of unfavorable rates at redemption
Implement slippage protection at withdrawal initiation:
Additionally:
Add minAssets
field to WithdrawalRequest struct
Modify redeem()
to check against both current minAssets
parameter and stored withdrawalRequest.minAssets
Add option to cancel withdrawal requests if price conditions become unfavorable
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.