veRWA - aakansha'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: 88/125

Findings: 1

Award: $9.82

QA:
grade-a

🌟 Selected for report: 0

🚀 Solo Findings: 0

  1. LockedBalance.amount can be uint256

VotingEscrow.sol#L51:

struct LockedBalance {
    int128 amount;
    uint256 end; // when is the lock ending.
    int128 delegated;
    address delegatee;
}

Here amount is takeen as int128 and in its every usage it's either casted from or to uint256. Since amount takes up the full storage slot, the benefit of slot packing isn't applied here. Hence, by using uint256 you save gas, but also avoid the risk of overflowing or underflowing during typecasting down from uint256 to int128.

#0 - c4-judge

2023-08-22T13:29:34Z

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