Olympus DAO contest - bobirichman's results

Version 3 of Olympus protocol, a decentralized floating currency.

General Information

Platform: Code4rena

Start Date: 25/08/2022

Pot Size: $75,000 USDC

Total HM: 35

Participants: 147

Period: 7 days

Judge: 0xean

Total Solo HM: 15

Id: 156

League: ETH

Olympus DAO

Findings Distribution

Researcher Performance

Rank: 86/147

Findings: 2

Award: $86.89

🌟 Selected for report: 0

🚀 Solo Findings: 0

QA REPORT

[LOW] Approve 0 first

At some tokens you can approve an amount (at USDT for instance) only after approving to 0. Consider using increase/decrease approve notation instead.

Proof of concept:

[LOW] Use safeApprove

Use safeApprove in the following locations

Proof of concept:

[LOW] Use mult before div

To improve the following calculations precision consider changing the order of the operations such that multiplications come before divisions.

Example: BondCallback.t.sol#L270

[LOW] Missing pause functionality

Proof of concept:

[LOW] Consider replacing assert with require

Assertions are a bad practice, use require instead.

Proof of concept:

[LOW] Not verified input

At the following functions you should verify the parameters that are being assigned to a state variable.

Proof of concept:

[LOW] Missing nonReentrancy modifier

The following functions allows attackers to try reentrancy since they are calling to external contracts / transferring eth. Consider adding a nonReentrancy modifier.

Proof of concept:

[NON CRITICAL] Missing function spec comments

Proof of concept:

[NON CRITICAL] Consider emitting an event at the following functions

Proof of concept:

[NON CRITICAL] The following events are not indexed

Proof of concept:

[NON CRITICAL] NonReentrancy should be the first modifier in order

Example: Operator.sol#L276

[NON CRITICAL] Floating pragma

Floating pragma is a bad practice, since it does not guaranty the same version at future deployments.

Proof of concept:

GAS REPORT

[GAS] Remove casting of latestAnswer()

latestAnswer() naturally returns int and not uint. You can work with signed integers instead to save gas of the casting.

Proof of concept:

[GAS] Use assembly opcodes iszero in the following locations

Proof of concept:

[GAS] Cache array size

You can cache the array size to improve gas usage in the following locations

Example: Governance.sol#L277

[GAS] Use > instead != to compare uint with 0

Proof of concept:

[GAS] Mark as payable If has onlyOwner modifier

In order to save gas you can put a payable modifier for functions that are called by protocol owners.

Proof of concept:

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter