QA Report #99
Labels
bug
Something isn't working
grade-a
high quality report
This report is of especially high quality
Q-24
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Low risk:
[L-01] Missing
endTimestamp > block.timestamp
check leads to reverted transaction[L-02] More inclusive check on
newEndTimestamp < oldEndTimestamp
[L-03] Missing
remainingDuration > 0
checkNon-critical:
[N-01] Natspec @notice and @dev duplicate a lot
[N-02] Natspec Typo
Low risk:
[L-01] Missing
endTimestamp > block.timestamp
check leads to reverted transactionRecommend adding check
endTimestamp > block.timestamp
L234: if(endTimestamp <= block.timestamp || endTimestamp > pledgeParams.endTimestamp || endTimestamp != _getRoundedTimestamp(endTimestamp)) revert Errors.InvalidEndTimestamp();
[L-02] More inclusive check on
newEndTimestamp < oldEndTimestamp
newEndTimestamp = oldEndTimestamp is not valid
https://github.com/code-423n4/2022-10-paladin/blob/main/contracts/WardenPledge.sol#L383
Recommend more inclusive check:
[L-03] Missing
remainingDuration > 0
checkMissing this check leads to
totalRewardAmount
= 0 and get reverted laterhttps://github.com/code-423n4/2022-10-paladin/blob/main/contracts/WardenPledge.sol#L430
Recommend adding the following check:
if(remainingDuration == 0) revert ... ;
Non-critical:
[N-01] Natspec @notice and @dev duplicate a lot
It's quite annoying reading a same line twice many times
Recommend deleting all duplicates
[N-02] Typo
Recommend correcting Natpec
balacne
-> balance,feeamount
-> feeAmount,ot
-> to,reards
-> rewardsThe text was updated successfully, but these errors were encountered: