Gas optimization in XDEFIDistribution.sol - shifting instead of multiplying or dividing by power of 2 #122
Labels
bug
Something isn't working
G (Gas Optimization)
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")
Handle
OriDabush
Vulnerability details
XDEFIDistribution.sol lines 151, 338-344
Instead of multiplying by _pointsMultiplier, which is 2 ** 128, it is more efficient to shift by 128 (x * (2 ** 128) = x << 128), same for dividing (x / (2 ** 128) = x >> 128)
The text was updated successfully, but these errors were encountered: