When there are mappings that use the same key value, having separate fields is error prone, for instance in case of deletion or with future new fields.
SEVERITY
Non-Critical
PROOF OF CONCEPT
Instances include:
BkdLocker.sol
BkdLocker.sol:26:mapping(address => uint256) public balances;
BkdLocker.sol:27:mapping(address => uint256) public boostFactors;
BkdLocker.sol:28:mapping(address => uint256) public lastUpdated;
BkdLocker.sol:29:mapping(address => WithdrawStash[]) public stashedGovTokens;
BkdLocker.sol:30:mapping(address => uint256) public totalStashed;
TOOLS USED
Manual Analysis
MITIGATION
Group the related data in a struct and use one mapping. For instance, the mitigation could be:
QA Report
Table of Contents
summary
Typos
PROBLEM
There are a few typos in some comments
SEVERITY
Non-Critical
PROOF OF CONCEPT
Instances include:
CompoundHandler.sol
Preparable.sol
TOOLS USED
Manual Analysis
MITIGATION
Correct the typos.
Comment Missing function parameter
PROBLEM
Some of the function comments are missing function parameters or returns
SEVERITY
Non-Critical
PROOF OF CONCEPT
Instances include:
AaveHandler.sol
CompoundHandler.sol
TopUpAction.sol
TOOLS USED
Manual Analysis
MITIGATION
Add a comment for these parameters
Function missing comments
PROBLEM
Some functions are missing comments.
SEVERITY
Non-Critical
PROOF OF CONCEPT
Instances include:
AaveHandler.sol
CompoundHandler.sol
CTokenRegistry.sol
TopUpAction.sol
TOOLS USED
Manual Analysis
MITIGATION
Add comments to all functions
Related data should be grouped in struct
PROBLEM
When there are mappings that use the same key value, having separate fields is error prone, for instance in case of deletion or with future new fields.
SEVERITY
Non-Critical
PROOF OF CONCEPT
Instances include:
BkdLocker.sol
TOOLS USED
Manual Analysis
MITIGATION
Group the related data in a struct and use one mapping. For instance, the mitigation could be:
And it would be used as a state variable:
Event should be emitted in setters
PROBLEM
Setters should emit an event so that Dapps can detect important changes to storage
SEVERITY
Non-Critical
PROOF OF CONCEPT
Instances include:
ChainlinkOracleProvider.sol
Controller.sol
CvxCrvRewardsLocker.sol
TOOLS USED
Manual Analysis
MITIGATION
Emit an event in all setters.
Unchecked inputs
PROBLEM
There should be a non-zero (address or integer) check in all setters
SEVERITY
Non-Critical
PROOF OF CONCEPT
Instances include:
ConvexStrategyBase.sol
CvxCrvRewardsLocker.sol
TOOLS USED
Manual Analysis
MITIGATION
Add non-zero checks.