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

0 stars 0 forks source link

unnecessary check on `block.chainid` #248

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

Tomio

Vulnerability details

Impact

Expensive gas

Proof of Concept

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

Recommended Mitigation Steps

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

if (msg.sender != DEPLOYER)

can save gas