Olympus DAO contest - ne0n'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: 94/147

Findings: 2

Award: $86.89

🌟 Selected for report: 0

🚀 Solo Findings: 0

Check is not present for the amount given in repayLoan is less than or equal to debt

File: src/modules/TRSRY.sol: 105

One could pass a greater amount to the function repayLoan and thus get more subtracted from the reserveDebt and totalDebt.

(https://github.com/code-423n4/2022-08-olympus/blob/main/src/modules/TRSRY.sol#L105)

Mitigation: Check if the amount specified is <= the debt of the address for that particular token.

Initailizing variable that are by default initialized causes gas fees

In the for loop in the function _setPolicyPermissions, the iterator i is initialized to 0, when by default it is zero (https://github.com/code-423n4/2022-08-olympus/blob/main/src/utils/KernelUtils.sol)

Similarly, in KernelUtils.sol also this happpens (https://github.com/code-423n4/2022-08-olympus/blob/main/src/utils/KernelUtils.sol#L40) (https://github.com/code-423n4/2022-08-olympus/blob/main/src/utils/KernelUtils.sol#L55)

Using ++i instead of i++ for optimizing gas

Using ++i instead of i++ can save gas

(https://github.com/code-423n4/2022-08-olympus/blob/main/src/utils/KernelUtils.sol#L49) (https://github.com/code-423n4/2022-08-olympus/blob/main/src/utils/KernelUtils.sol#L64)

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