The _redeemWToken
function allows users to redeem wTokens
without safeguards against flash loan attacks. This vulnerability enables attackers to exploit the contract by borrowing collateral, manipulating token supplies, and withdrawing the collateral in the same transaction.
Function Behavior:
The _redeemWToken
function burns wTokens
from the user's balance and calls _redeemWTokenPrivate
to withdraw collateral from Aave.
There is no restriction or time delay between minting wTokens
and redeeming them, making the system vulnerable to flash loans.
Flash Loan Exploit:
An attacker could use a flash loan to borrow a large amount of collateral.
The attacker deposits the collateral to mint wTokens
.
Immediately, the attacker redeems wTokens
to withdraw the collateral, repaying the loan and profiting from manipulated metrics (e.g., yield or token ratios).
Dependencies:
_redeemWTokenPrivate
: Handles withdrawal from Aave, burns wTokens
, and transfers collateral.
_handleTokenOperations
: Manages token minting and collateral deposits.
Potential Manipulation:
Yields, token supplies, or other protocol metrics may be manipulated.
Economic Loss:
Flash loan attacks could drain collateral or cause financial instability within the protocol.
Manual code review of the _redeemWToken
function and related dependencies.
Analysis of transaction flow and state updates.
Add a Minimum Holding Period:
Require a time delay between minting and redeeming wTokens
to mitigate flash loan attacks.
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.