code-423n4 / 2022-08-olympus-findings

5 stars 4 forks source link

QA Report #454

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

executeProposal() will revert prematurely when there are more no-votes than yes-votes uint256 netVotes will revert due to underflow if there are more no-votes than yes-votes. It should revert with the check just after it. Consider declaring it as a signed integer instead.

 

Magic numbers Consider defining constants instead of using magic numbers.

Instances: RANGE.sol: 246 248 264 PRICE.sol: 90 Governance.sol: 217 268 Operator.sol: 106 108 111 114 378 433 518 533 535 536 550 565

 

Typos

Instances: PRICE.sol: “numbe” should be “number” 126

 

Incorrect comment /// @dev This amount should be greater than 0 to prevent flash loan attacks. This is incorrect strictly as written. It must be greater than 0 in days, or more specifically it must be greater than the time of one block.