veRWA - 0x3b'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: 68/125

Findings: 1

Award: $9.82

QA:
grade-a

🌟 Selected for report: 0

🚀 Solo Findings: 0

[L-01] People can lock their tokens for slightly less that 5 years

createLock's unlock_time is rounded down to the nearest week with this equation.

 uint256 unlock_time = _floorToWeek(block.timestamp + LOCKTIME); 

Which specifically rounds down the time to the start of the week. This means that a lock that starts on Monday morning will have the same unlock time as the one on Sunday afternoon (+6 days and 16 hours).

[R-01] Lock time is wrong

Lock time in uses 1825 days to represent 5 years, which does not account that 1 year is 365 days and 6 hours. 1826 will be close, while 1826 + 6H will be the exact days in 5 years.

#0 - c4-judge

2023-08-22T14:07:16Z

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