Summary
The availableWithdrawLimit function in the StrategyOp contract currently lacks defined withdrawal caps, returning the sum of the asset balance and the transmuter’s unexchanged balance without limitations. This design opens the strategy to liquidity-related vulnerabilities, as large withdrawals could disrupt its liquidity and affect optimal functioning. Mitigation includes enforcing static or dynamic withdrawal limits based on strategy performance and risk assessments.
Technical Details
The availableWithdrawLimit function is designed to return the total withdrawable amount:
Current Implementation:
The function calculates the sum of the asset balance and the transmuter’s unexchanged balance.
No constraints or caps are enforced on the withdrawal amount.
Issue:
Large or frequent withdrawals could deplete the strategy’s liquid reserves, forcing premature or inefficient liquidation of assets.
Exploitation Scenarios
Setup:
The strategy holds 10,000 WETH in total, with 6,000 WETH as unexchanged balance and 4,000 WETH as liquid assets.
Execution:
A user initiates a withdrawal of 9,000 WETH, which exceeds the liquid asset reserve.
Impact:
The strategy is forced to liquidate unexchanged assets prematurely, potentially incurring slippage or unfavorable market rates.
Setup:
The market becomes volatile, causing a sudden demand for withdrawals.
Multiple users simultaneously request large withdrawals.
Execution:
The strategy’s liquid reserves are depleted before unexchanged balances can be efficiently converted to liquid assets.
Impact:
Delayed withdrawal processing or forced asset sales at unfavorable prices reduce user confidence and yield.
impact Analysis
Financial Impact:
Forced liquidation at unfavorable rates could lead to yield losses.
Reduced liquidity undermines the strategy’s ability to operate efficiently.
Operational Impact:
Large withdrawals may delay other user transactions or cause temporary disruptions in functionality.
Reputational Impact:
Users may lose trust in the strategy due to delayed withdrawals or reduced performance.
Root Cause Analysis
Absence of Withdrawal Limits:
The function allows unlimited withdrawals without considering the strategy’s liquidity constraints.
Lack of Dynamic Constraints:
The function does not dynamically adjust withdrawal limits based on real-time liquidity conditions or strategy performance.
Mitigation Recommendations
Define a maximum allowable withdrawal amount to ensure liquidity:
Dynamically adjust the withdrawal limit based on the strategy’s liquidity and market conditions:
Enhance transparency by logging large withdrawal requests:
Step-by-Step Reproduction:
Deploy the contract and initialize the strategy with 10,000 WETH.
Request a withdrawal exceeding the liquid reserve (e.g., 9,000 WETH).
Observe how the strategy is forced to liquidate unexchanged assets or delays processing due to insufficient liquidity.
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.