Custom size uint is not more efficient than uint256 #289
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
0x0x0x
Vulnerability details
Concept
In
MovingAverage.sol
,uint64
is used for computation of time etc. But computations withuint64
does cost more gas and furthermoreblock.timestamp
isuint256
, which is additionally casted touint64
.uint32
is used for indexes, but this can also be changed withuint256
.Same applies for
RewardDistributer.sol.
Recommendation
Use
uint256
rather than customuint
.The text was updated successfully, but these errors were encountered: