VTVL contest - m9800's results

Building no-code token management tools to empower web3 founders and investors, starting with token vesting.

General Information

Platform: Code4rena

Start Date: 20/09/2022

Pot Size: $30,000 USDC

Total HM: 12

Participants: 198

Period: 3 days

Judge: 0xean

Total Solo HM: 2

Id: 164

League: ETH

VTVL

Findings Distribution

Researcher Performance

Rank: 5/198

Findings: 2

Award: $1,364.31

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: Respx

Also found by: m9800

Labels

bug
duplicate
2 (Med Risk)

Awards

1355.2196 USDC - $1,355.22

External Links

Lines of code

https://github.com/code-423n4/2022-09-vtvl/blob/f68b7f3e61dad0d873b5b5a1e8126b839afeab5f/contracts/VTVLVesting.sol#L187 https://github.com/code-423n4/2022-09-vtvl/blob/f68b7f3e61dad0d873b5b5a1e8126b839afeab5f/contracts/VTVLVesting.sol#L196

Vulnerability details

Impact

The function vestedAmount can return a wrong value of vested amount.

Proof of Concept

The function vestedAmount calculates the vested amount of a recipient at a given time,(_referenceTs). The problem is that if the _referenceTs is in the past and the user has made a withdrawal at a timestamp bigger than _referenceTs, the function vestedAmount returns the amount withdrawn by the recipient and not the vested amount at the reference timestamp.

https://github.com/code-423n4/2022-09-vtvl/blob/f68b7f3e61dad0d873b5b5a1e8126b839afeab5f/contracts/VTVLVesting.sol#L187

https://github.com/code-423n4/2022-09-vtvl/blob/f68b7f3e61dad0d873b5b5a1e8126b839afeab5f/contracts/VTVLVesting.sol#L196

Check if the timestamp is in the past

#0 - 0xean

2022-09-25T19:24:42Z

dupe of #104

Awards

9.086 USDC - $9.09

Labels

bug
G (Gas Optimization)

External Links

https://github.com/code-423n4/2022-09-vtvl/blob/f68b7f3e61dad0d873b5b5a1e8126b839afeab5f/contracts/VTVLVesting.sol#L107

You can only perform : require(_claim.isActive == true, "NO_ACTIVE_CLAIM");

To check if a recipient has an active claim, it is impossible to find a claim with starttimestamp =0 and isActive = True

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