code-423n4 / 2024-02-wise-lending-findings

11 stars 8 forks source link

setAaveTokensBulk misses one token while setting Token addresses #184

Closed c4-bot-1 closed 6 months ago

c4-bot-1 commented 6 months ago

Lines of code

https://github.com/code-423n4/2024-02-wise-lending/blob/79186b243d8553e66358c05497e5ccfd9488b5e2/contracts/WrapperHub/AaveHub.sol#L71

Vulnerability details

Impact

The incorrect logic leaves one token unattended while setting token

Proof of Concept

The loop below only picks i < _underlyingAssets.length and this would leave an unattended token on line 71

Tools Used

Manual Analysis

Recommended Mitigation Steps

Use i <= _underlyingAssets.length for this logic instead of i < _underlyingAssets.length

Assessed type

Context

c4-bot-3 commented 6 months ago

Withdrawn by 0xSeverityhunter