Rigor Protocol contest - dharma09's results

Community lending and instant payments for new home construction.

General Information

Platform: Code4rena

Start Date: 01/08/2022

Pot Size: $50,000 USDC

Total HM: 26

Participants: 133

Period: 5 days

Judge: Jack the Pug

Total Solo HM: 6

Id: 151

League: ETH

Rigor Protocol

Findings Distribution

Researcher Performance

Rank: 132/133

Findings: 1

Award: $21.72

🌟 Selected for report: 0

🚀 Solo Findings: 0

IMPACT

Require statements including conditions with the && operator can be broken down in multiple require statements to save gas.

PROOF OF CONCEPT

Instances include:

Disputes.sol#L61

require( _disputeID < disputeCount && disputes[_disputeID].status == Status.Active, "Disputes::!Resolvable" );

Disputes.sol#L106

require( _actionType > 0 && _actionType <= uint8(ActionType.TaskPay), "Disputes::!ActionType" );

Community.sol#L353

require( _lendingNeeded >= _communityProject.totalLent && _lendingNeeded <= IProject(_project).projectCost(), "Community::invalid lending" );

MITIGATION

Breakdown each condition in a separate require statement

require( _disputeID < disputeCount); require(disputes[_disputeID].status == Status.Active, "Disputes::!Resolvable" );

#0 - zgorizzo69

2022-08-08T17:48:01Z

thanks for your work

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