Olympus DAO contest - Ch_301'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: 115/147

Findings: 1

Award: $54.31

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

no need for these curly brackets { }

Finding

File: /src/modules/PRICE.sol { (, int256 ohmEthPriceInt, , uint256 updatedAt, ) = _ohmEthPriceFeed.latestRoundData(); … reserveEthPrice = uint256(reserveEthPriceInt); }

https://github.com/code-423n4/2022-08-olympus/blob/main/src/modules/PRICE.sol#L160-L174

It is better to emit the oldDebt

Finding

File: /main/src/modules/TRSRY.sol emit DebtSet(token_, debtor_, amount_);

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

Check for address(0)

Finding

File: /main/src/modules/TRSRY.sol function setDebt( ERC20 token_, address debtor_, uint256 amount_ ) external permissioned { uint256 oldDebt = reserveDebt[token_][debtor_]; reserveDebt[token_][debtor_] = amount_; if (oldDebt < amount_) totalDebt[token_] += amount_ - oldDebt; else totalDebt[token_] -= oldDebt - amount_; emit DebtSet(token_, debtor_, amount_); }

https://github.com/code-423n4/2022-08-olympus/blob/main/src/modules/TRSRY.sol#L122-L135 https://github.com/code-423n4/2022-08-olympus/blob/main/src/policies/TreasuryCustodian.sol#L42-L48

Not the better pattern

It is better to make it as the other line above it. Like this one _range.cushion.low.price = (movingAverage_ * (FACTOR_SCALE - cushionSpread)) / FACTOR_SCALE;

Finding

File: /main/src/modules/RANGE.sol _range.cushion.high.price = (movingAverage_ * (FACTOR_SCALE + cushionSpread)) / FACTOR_SCALE;

https://github.com/code-423n4/2022-08-olympus/blob/main/src/modules/RANGE.sol#L168-L170

unnecessary invoking

These two invokes don’t do anything they are keep every thing the same But if you trying to set the capacity to zero this is no how you do it

Finding

File: /main/src/policies/Operator.sol _updateCapacity(true, 0); _updateCapacity(false, 0);

https://github.com/code-423n4/2022-08-olympus/blob/main/src/policies/Operator.sol#L202-L203

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