Closed code423n4 closed 2 years ago
We try to reduce gas costs for happy path, not for sad path. Assuming lengths are equal (which they will be in the overwhelming majority of the time), it is cheaper not to check them. Further, most wallets (and certainly the one we use) will alert the user if a transaction is going to fail, so it will never waste gas anyway.
Duplicate #38
Handle
hack3r-0m
Vulnerability details
https://github.com/XDeFi-tech/xdefi-distribution/blob/master/contracts/XDEFIDistribution.sol#L80
check the length of
durations_
andmultipliers
is equal and revert if it is not resulting in gas savings rather than delayed revert.