code-423n4 / 2022-01-openleverage-findings

0 stars 0 forks source link

Incorrect require() #268

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

0v3rf10w

Vulnerability details

Impact

Here _locked.amount being uint256 will always satisfy this require() condition

Proof of Concept

XOLE.withdraw() (contracts/XOLE.sol#325-339) :
        - require(bool,string)(_locked.amount >= 0,Nothing to withdraw) (contracts/XOLE.sol#327)

Recommended Mitigation Steps

remove it or change as needs

ColaM12 commented 2 years ago

Duplicate to #132

0xleastwood commented 2 years ago

Marking as gas.