Open code423n4 opened 3 years ago
shw
In Router.sol, the second else if statement in the function swapWithSynthsWithLimit is unnecessary.
Router.sol
else if
swapWithSynthsWithLimit
Referenced code: Router.sol#L162
None
Consider using else {...}, which has the identical behavior to save gas.
else {...}
https://github.com/vetherasset/vaderprotocol-contracts/commit/dd4ac300bcec8c1f2fd88b9b4809ce285ed101e0#diff-9dbb8dad80202557b41e378168876747e77f53fa5a17bf48959fe97fd41913ddR219
Handle
shw
Vulnerability details
Impact
In
Router.sol
, the secondelse if
statement in the functionswapWithSynthsWithLimit
is unnecessary.Proof of Concept
Referenced code: Router.sol#L162
Tools Used
None
Recommended Mitigation Steps
Consider using
else {...}
, which has the identical behavior to save gas.