veRWA - kutugu'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: 74/125

Findings: 1

Award: $9.82

QA:
grade-a

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Summary

IDTitleSeverity
[L-01]The increaseAmount will refresh locked.endLow
[N-01]The Deposit event is triggered incorrectlyNon-Critical

Detailed Findings

[L-01] The increaseAmount will refresh newLocked.end

Description

    newLocked.amount += int128(int256(_value));
    newLocked.end = _floorToWeek(block.timestamp + LOCKTIME);

With a lockup period of up to 5 years for protocols, if increaseAmount refresh locke.end each time, this will greatly reduce the user's intention to do this in the mid to late period.

Recommendations

Don't refresh locked.end in increaseAmount

[N-01] The Deposit event is triggered incorrectly

Description

        emit Deposit(delegatee, _value, newLocked.end, LockAction.DELEGATE, block.timestamp);
    }
    emit Deposit(msg.sender, _value, unlockTime, action, block.timestamp);
  1. if delegatee != msg.sender, the Deposit event is triggered twice
  2. For the outer Deposit event, unlockTime should be newLocked.end

Recommendations

Fix the issues

#0 - c4-judge

2023-08-22T14:06:46Z

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