code-423n4 / 2021-11-streaming-findings

0 stars 0 forks source link

Emergency Governed is not actually used and can be removed #240

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

kenzo

Vulnerability details

Governed/ExternallyGoverned contracts have capability for emergency governance; however, none of the functions actually use it. Meaning no function has the emergency_governed or externallyEmergencyGoverned modifiers.

This leads to wasted gas on every Stream deployment.

Also, perhaps some confusion if somebody is reading the code.

Proof of Concept

Grep result for the modifiers:

$ grep -r --include \*.sol externallyEmergencyGoverned
src/Locke.sol:    modifier externallyEmergencyGoverned {
$ grep -r --include \*.sol emergency_governed
src/Locke.sol:    modifier emergency_governed {

So they are not actually used anywhere.

Tools Used

Pick, shovel.

Recommended Mitigation Steps

Remove unnecessary functionality.

0xean commented 2 years ago

dupe of #226