veRWA - 14si2o_Flint's results

Incentivization Primitive for Real World Assets on Canto

General Information

Platform: Code4rena

Start Date: 07/08/2023

Pot Size: $36,500 USDC

Total HM: 11

Participants: 125

Period: 3 days

Judge: alcueca

Total Solo HM: 4

Id: 274

League: ETH

Canto

Findings Distribution

Researcher Performance

Rank: 85/125

Findings: 1

Award: $9.82

QA:
grade-a

🌟 Selected for report: 0

🚀 Solo Findings: 0

Title: Low - Incorrect require variable in checkpoint_lender

Github Links

https://github.com/code-423n4/2023-08-verwa/blob/a693b4db05b9e202816346a6f9cada94f28a2698/src/LendingLedger.sol#L114-L124

https://github.com/code-423n4/2023-08-verwa/blob/a693b4db05b9e202816346a6f9cada94f28a2698/src/LendingLedger.sol#L51-L78

Impact

The checkpoint_lender function has a require statement that checks that the lender has deposits >0 in this market. However, the variable used in the require statement, lendingMarketBalancesEpoch[_market][_lender], returns the Epoch when the last update happened, not the balance of the user in this market.

Tools Used

Manual review

Recommendations

Change the require statement:

- require(lendingMarketBalancesEpoch[_market][_lender] > 0, "No deposits for this lender in this market");
+ require(lendingMarketBalances[_market][_lender][_forwardTimestampLimit] > 0, "No deposits for this lender in this market");;

#0 - c4-judge

2023-08-22T13:54:53Z

alcueca marked the issue as grade-a

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