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

0 stars 0 forks source link

cheaper to use negation to require if #258

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

Fitraldys

Vulnerability details

Impact

in line https://github.com/code-423n4/2022-01-sherlock/blob/main/contracts/managers/Manager.sol#L52 success variable that was outputed from low level call will return boolean success true, if the low level call didnt not revert, therefore negate this success value will make the if condition to false, therefore is not reverting with invalidCondition()

Proof of Concept

https://github.com/code-423n4/2022-01-sherlock/blob/main/contracts/managers/Manager.sol#L52

jack-the-pug commented 2 years ago

Dup #132