Closed code423n4 closed 2 years ago
These aren't casting. They are just making the types explicit for litterals, and just in no bytecode difference or additional gas costs. We just like to be explicit where possible.
agreed, once again these aren't castings
Handle
sirhashalot
Vulnerability details
Impact
When comparing an integer variable with a constant, there is no need to cast the constant using
uint256()
or similar casting functionsProof of Concept
There are multiple instances of this in the XDEFIDistribution.sol contract, including: Lines 122, 145, 149, 177, 207, 215, 255, 259, 285, 289, 304, 322 https://github.com/XDeFi-tech/xdefi-distribution/blob/3856a42df295183b40c6eee89307308f196612fe/contracts/XDEFIDistribution.sol
Recommended Mitigation Steps
Remove the unnecessary casting operations