Closed code423n4 closed 2 years ago
WatchPug
https://github.com/XDeFi-tech/xdefi-distribution/blob/3856a42df295183b40c6eee89307308f196612fe/contracts/XDEFIDistribution.sol#L14-L14
uint88 internal MAX_TOTAL_XDEFI_SUPPLY = uint88(240_000_000_000_000_000_000_000_000);
Considering that MAX_TOTAL_XDEFI_SUPPLY will never change, changing it to constant variable instead of storage variable can save gas.
MAX_TOTAL_XDEFI_SUPPLY
Agreed. It should have been constant. In any case, due to other recommendations, MAX_TOTAL_XDEFI_SUPPLY is being removed entirely now.
Duplicate #36
Handle
WatchPug
Vulnerability details
https://github.com/XDeFi-tech/xdefi-distribution/blob/3856a42df295183b40c6eee89307308f196612fe/contracts/XDEFIDistribution.sol#L14-L14
Considering that
MAX_TOTAL_XDEFI_SUPPLY
will never change, changing it to constant variable instead of storage variable can save gas.