QA Report #59
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Low
Rounding-error can be redeemed for free
If the
_redeemAmount
is > 0 but less than the value of 1 share, 0 share will be burned while the user can withdraw non-zero amount.https://github.com/pooltogether/aave-v3-yield-source/blob/e63d1b0e396a5bce89f093630c282ca1c6627e44/contracts/AaveV3YieldSource.sol#L255
IERC20 is re-used
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#name-reused
Non-Critical
Upgrade Solidity Version
Consider to pin Solidity version to latest 0.8.12
Use custom errors
Solidity ^0.8.4 allow the use of custom errors to optimize gas usage.
https://blog.soliditylang.org/2021/04/21/custom-errors/
Duplicated code
L337 can reuse
_requireNotAToken
in L348https://github.com/pooltogether/aave-v3-yield-source/blob/e63d1b0e396a5bce89f093630c282ca1c6627e44/contracts/AaveV3YieldSource.sol#L337
https://github.com/pooltogether/aave-v3-yield-source/blob/e63d1b0e396a5bce89f093630c282ca1c6627e44/contracts/AaveV3YieldSource.sol#L348
Remove safeMath library
Solidity > 0.8.0 have safe math by default
https://github.com/pooltogether/aave-v3-yield-source/blob/e63d1b0e396a5bce89f093630c282ca1c6627e44/contracts/AaveV3YieldSource.sol#L26
The text was updated successfully, but these errors were encountered: