-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
G (Gas Optimization)bugSomething isn't workingSomething isn't workingsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasonsTechnically the issue is correct, but we're not going to resolve it for XYZ reasons
Description
Handle
mics
Vulnerability details
Using != 0 is slightly cheaper than > 0.
see code-423n4/2021-12-maple-findings#75 for similar issue.
OpenLevV1.sol, 454: change 'buyAmount > 0' to 'buyAmount != 0'
OpenLevV1Lib.sol, 112: change 'marginLimit > 0' to 'marginLimit != 0'
OpenLevV1.sol, 424: change 'balance > 0' to 'balance != 0'
UniV2Dex.sol, 207: change 'reserveIn > 0' to 'reserveIn != 0'
ControllerV1.sol, 342: change 'supplyAmount > 0' to 'supplyAmount != 0'
UniV3Dex.sol, 165: change 'amount0Delta > 0' to 'amount0Delta != 0'
OpenLevV1Lib.sol, 276: change 'totalShare > 0' to 'totalShare != 0'
XOLE.sol, 266: change '_value > 0' to '_value != 0'
ControllerV1.sol, 363: change 'borrowAmount > 0' to 'borrowAmount != 0'
Metadata
Metadata
Assignees
Labels
G (Gas Optimization)bugSomething isn't workingSomething isn't workingsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasonsTechnically the issue is correct, but we're not going to resolve it for XYZ reasons