Rubicon contest - Randyyy's results

An order book protocol for Ethereum, built on L2s.

General Information

Platform: Code4rena

Start Date: 23/05/2022

Pot Size: $50,000 USDC

Total HM: 44

Participants: 99

Period: 5 days

Judge: hickuphh3

Total Solo HM: 11

Id: 129

League: ETH

Rubicon

Findings Distribution

Researcher Performance

Rank: 92/99

Findings: 1

Award: $30.83

🌟 Selected for report: 0

🚀 Solo Findings: 0

  1. Caching Array.

POC

https://github.com/code-423n4/2022-05-rubicon/blob/27f34d70f5bca8ca3169beb89c390a1d750c4190/contracts/rubiconPools/BathToken.sol#L635

Impact

Chaching array can save gas.

uint len = bonusTokens.length; if (len > 0) { for (uint256 index = 0; index < len; index++) {...


  1. Validation can be done earlier to save gas.

Impact

Check if owner_ != address(0) earlier can avoid unnecessary computing when this check failed.

POC

https://github.com/code-423n4/2022-05-rubicon/blob/27f34d70f5bca8ca3169beb89c390a1d750c4190/contracts/rubiconPools/BathToken.sol#L714-L723

... external { require(deadline >= block.timestamp, "bathToken: EXPIRED"); require(owner_ != address(0), "..."); .....

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