AToken Validation from Aave in the get accrued yield private function.
In _getAccruedYieldPrivate
, the following line assumes the returned aTokenAddress
from Aave is valid:
If _collateralToken
is invalid or not registered in Aave, getReserveData
will return an empty ReserveData
struct, where aTokenAddress == address(0)
.
Calling balanceOf(address(this))
on address(0)
will revert with a low-level error: "call to a non-contract address"
.
Manual review
Add a check to ensure the aTokenAddress
is valid:
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.