VTVL contest - 0xdapper'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: 40/198

Findings: 1

Award: $218.09

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: eierina

Also found by: 0x52, 0xA5DF, 0xdapper, ElKu, Ruhum, RustyRabbit, TomJ, obront, pauliax, pcarranzav, pedroais, rbserver

Labels

bug
duplicate
3 (High Risk)
old-submission-method

Awards

218.0935 USDC - $218.09

External Links

Lines of code

https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L428-L434 https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L105-L112 https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L364-L365

Vulnerability details

Impact

Seems like it is intended to have this feature where admins are able to revoke user claims as they fit and in doing so they revoke all the user's already vested but not withdrawn amount as well.

However, this in itself is very frontrunnable by the users themselves, if they see the revocation tx in the mempool from the admin, they can frontrun that transaction to withdraw their vested amounts before the revocation transaction gets mined by bumping gas prices on their transaction for faster inclusion.

So, it is a false assurity that the founders can revoke unwithdrawn but vested amounts too by revoking an employee's claim.

Proof of Concept

https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L428-L434 -- the revoke function where the claim.isActive is set to false without transferring any vested but not withdrawn amount to the user because thats the feature https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L105-L112 -- the modifier where the claim is checked for being active https://github.com/code-423n4/2022-09-vtvl/blob/main/contracts/VTVLVesting.sol#L364-L365 -- withdraw function where it is first checked that the claim is still active i.e. claim.isActive == true

Tools Used

If this feature is important to the founders for early termination or other reasons founders should be using larger cliffs. Since at the moment in the current state of code the founders can always be frontran might as well make it a feature and explicitly transfer vested unwithdrawn amounts to the users for their claims and institute good faith and trust with the parties you are vesting tokens to.

#0 - 0xean

2022-09-24T21:40:53Z

dupe of #475

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