Rubicon contest - antonttc'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: 88/99

Findings: 2

Award: $30.93

🌟 Selected for report: 0

🚀 Solo Findings: 0

Low severity

offer won't work with non-standard ERC20 that doesn't return true on transferFrom

The codebase use transferFrom in functions like swap and offer and enforce a true returned to proceed. This might not work with some existing ERC20. Consider using safeERC20 as a safer and more widely adopted pattern.

#0 - HickupHH3

2022-06-25T03:12:21Z

dup of #316

Gas optimization

1. pack variables for sortInfo and OfferInfo.

Consider packing the sortInfo into a single 256 bits storage slot.

uint96 next; // should be sufficient for # of ids uint96 prev; //should be sufficient for # of ids uint32 delb; // 32 bits is enough for timestamp or blockNumber

For OfferInfo, consider packing 2 amounts with the timestamp

struct OfferInfo { uint96 pay_amt; uint96 buy_amt; uint64 timestamp; ERC20 pay_gem ERC20 buy_gem; address owner; }
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