The _handleTokenOperations
function in the AaveDIVAWrapperCore
contract interacts with Aave V3 Pool's supply
function to supply collateral tokens. However, the implementation lacks slippage protection, exposing users to potential value loss in certain edge cases.
Function Affected: _handleTokenOperations
The supply
function does not include any parameter or check to ensure that a minimum number of aTokens are received in exchange for the supplied collateral.
In scenarios such as high network congestion, MEV (Miner Extractable Value) attacks, or extreme market volatility, the amount of aTokens minted could deviate from the expected value, leading to potential value loss for users.
User Risk: Users supplying collateral through this function may receive fewer aTokens than expected, reducing their effective holdings.
Market Conditions: While Aave generally maintains a 1:1 ratio between assets and aTokens, temporary deviations during extreme conditions or protocol upgrades can exacerbate the issue.
Code Review: The vulnerability was identified through a manual review of the Solidity code, focusing on token supply operations.
Solidity Documentation: Verified the behavior of the supply
function in Aave V3 Pool.
Implement Slippage Protection:
Add the following code to enforce slippage protection in the _handleTokenOperations
function:
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.