Closed code423n4 closed 3 years ago
s1m0
The logic of the following functions can be simplified reducing the gas cost.
https://github.com/code-423n4/2021-04-vader/blob/main/vader-protocol/contracts/Vader.sol#L163 https://github.com/code-423n4/2021-04-vader/blob/main/vader-protocol/contracts/Vader.sol#L171
Manual analysis
function flipEmissions() external onlyDAO { emitting = !emitting; }
same thing with flipMinting.
https://github.com/vetherasset/vaderprotocol-contracts/commit/b98b6358f1d8b7730d3fe767e01d49ca63d830e9#diff-f5afe9240d284bf89e33b79c68c1ab21a6c18323c11d480d25144c18b8a9373aR176
duplicate of #197
Handle
s1m0
Vulnerability details
Impact
The logic of the following functions can be simplified reducing the gas cost.
Proof of Concept
https://github.com/code-423n4/2021-04-vader/blob/main/vader-protocol/contracts/Vader.sol#L163 https://github.com/code-423n4/2021-04-vader/blob/main/vader-protocol/contracts/Vader.sol#L171
Tools Used
Manual analysis
Recommended Mitigation Steps
function flipEmissions() external onlyDAO { emitting = !emitting; }
same thing with flipMinting.