QA Report #74
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
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Most of functions have
bool
return value to indicate success or failure.But the following functions return always true or revert transaction, so the return value is meaning less.
https://github.com/code-423n4/2022-05-backd/blob/main/protocol/contracts/tokenomics/KeeperGauge.sol#L57-L62
https://github.com/code-423n4/2022-05-backd/blob/main/protocol/contracts/tokenomics/AmmGauge.sol#L49-L54
https://github.com/code-423n4/2022-05-backd/blob/main/protocol/contracts/tokenomics/KeeperGauge.sol#L72-L90
Recommendation:
Return false for special conditions, or remove return value.
reportFees()
function ofKeeperGauge.sol
needs to have zero amount check.There is no zero amount check in
reportFees()
function, thusbeneficiary
’sfirstEpochSet
andnextEpochToClaim
will be initialized, and this lead high gas cost in claim function.Recommendation:
Check zero amount to avoid updating data and wasting gas.
The text was updated successfully, but these errors were encountered: