VTVL contest - ayeslick'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: 11/198

Findings: 2

Award: $567.72

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: TomJ

Also found by: ayeslick, csanuragjain, pashov

Labels

bug
duplicate
2 (Med Risk)
old-submission-method

Awards

548.864 USDC - $548.86

External Links

Lines of code

https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L257 https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L262

Vulnerability details

Impact

An admin can, by accident or on purpose, set both startTimestamp & endTimestamp to values less than current block.timestamp. This leads to the vesting period being completed immediately allowing members to claim instantly.

Proof of Concept

An admin sets startTimestamp & endTimestamp to values less than current block.timestamp Claimants are able to claim their entire share early

Set startTimestamp to block.timestamp Set endTimestamp to a set period in the future i.e. 1 month. OR endTimestamp should be greater than current block.timestamp by a certain amount i.e. 1 month.

#0 - 0xean

2022-09-25T19:03:33Z

dupe of #292

Awards

18.8574 USDC - $18.86

Labels

bug
QA (Quality Assurance)
old-submission-method

External Links

Lines of code

https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L371 https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L374

Vulnerability details

Impact

The withdraw function calls the _baseVestedAmount to set the allowance for a given claimant. In the _baseVestedAmount function linearVestAmount is determined by multiplying _claim.linearVestAmount with truncatedCurrentVestingDurationSecs then dividing by finalVestingDurationSecs. If _claim.linearVestAmount was set to zero turn the result assigned to linearVestAmount will be zero. Thus _baseVestedAmount returns 0 which sets allowance to 0 which fails the required statement in the withdraw function.

Proof of Concept

Admin sets _linearVestAmount to zero Claimant tries to claim their portion but their transaction reverts due to them having no allowance.

Don’t allow _linearVestAmount to be zero.

#0 - 0xean

2022-09-24T22:31:00Z

downgrading to QA.

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