Rigor Protocol contest - auditor0517'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: 40/133

Findings: 1

Award: $165.63

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Labels

bug
duplicate
3 (High Risk)
valid

Awards

165.6336 USDC - $165.63

External Links

Lines of code

https://github.com/code-423n4/2022-08-rigor/blob/5ab7ea84a1516cb726421ef690af5bc41029f88f/contracts/Community.sol#L668-L706

Vulnerability details

Impact

There might be division loss during interest calculation so builders would pay less interest than they should to lenders.

Proof of Concept

During the interest calculation, we calculate the days of the elapsed period.

So if builders repay some amount after 47 hours, the interest will be added for 1 day only.

As a result, builders would pay less interest(almost half if they repay frequently) than they should and lenders might lose their interest.

Tools Used

Manual Review

Recommend calculating like below with this part.

uint256 _unclaimedInterest = _lentAmount * _communities[_communityID].projectDetails[_project].apr * (block.timestamp - _communityProject.lastTimestamp) / 365000 / 86400;

#0 - horsefacts

2022-08-06T20:40:34Z

#1 - itsmetechjay

2022-08-18T19:18:05Z

@parv3213 do you agree with this one?

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