The redeem()
function in VaultRouterBranch.sol lacks a withdrawal cancellation mechanism, potentially leading to indefinitely locked funds when redemptions fail due to insufficient assets or credit capacity. Users cannot recover their shares once a withdrawal request is initiated, creating a significant risk if redemption conditions cannot be met.
VaultRouterBranch.sol:L433~570
In the VaultRouterBranch.sol#redeem()
function, users can face situations where their withdrawal requests become permanently locked, without any mechanism to cancel them. This occurs in two specific scenarios:
When the redeemed assets amount falls below the minAssets
threshold
When there is insufficient unlocked credit capacity in the vault
In both cases, the transaction will revert, but the withdrawal request remains active in the system. Since there's no cancellation mechanism implemented, users' shares remain frozen indefinitely within the protocol if these conditions persist.
The function includes critical checks:
The absence of a withdrawal cancellation mechanism presents a significant risk to users as their funds could become permanently locked in the protocol if market conditions or vault parameters prevent successful redemption.
Implement a cancelWithdrawalRequest
function in VaultRouterBranch.sol
that allows users to cancel their pending withdrawal requests and retrieve their shares. The function should:
Verify the withdrawal request exists and belongs to the caller
Ensure the request hasn't been fulfilled
Return the locked shares to the user
Mark the request as cancelled or remove it from storage
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.