Closed code423n4 closed 3 years ago
DIVIDER
should be set to constant and there is a duplicate #27
These are changeable, (either in setters or potentially in future upgrade)
uint128 constant DELEGATOR_COOL_DOWN = 28*6646; // ~ 28 days
uint128 constant MAX_CAP_MULTIPLIER = 10;
uint128 constant ALLOCATED_TOKENS_PER_EPOCH = 1*10**18; // should never be 0
uint128 constant GLOBAL_EXCHANGE_RATE = 10**18; // 1 to 1
Duplicate of #27
Handle
WatchPug
Vulnerability details
Some storage variables include
divider
,validatorCoolDown
,delegatorCoolDown
,maxCapMultiplier
,allocatedTokensPerEpoch
,globalExchangeRate
andCQT
are only set once ininitialize()
and never changed.Changing them to
constant
can save gas.Recommendation
Consider changing to
constant
and using all caps for the names.