Skip to content
Access control Audit finding Beginner

Missing hasStarted modifier, can lead to user vesting before the owner begin the vesting

The claimConverted() function in the LinearVesting contract lacks the hasStarted modifier, allowing any user to claim converted tokens before the owner has started vesting.

rfa Follow

Originally disclosed on Code4rena

Submitted by rfa

Impact

In the claimConverted() function, the user can vest their vader token for a certain amount of time, but hasStarted modifier is missing, this can lead to claimConverted() function is callable by anyone, and the user can claim eventhough the vesting havent been started by the owner.

Proof of Concept

https://github.com/code-423n4/2021-11-vader/blob/main/contracts/tokens/vesting/LinearVesting.sol#L158

Recommended Mitigation Steps

add hasStarted modifier

SamSteinGG (Vader) commented:

Duplicate of #89

alcueca (judge) commented:

Not a duplicate, different line.

SamSteinGG (Vader) commented:

@alcueca This should be invalid.

The original report as published on Code4rena, by rfa. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The claimConverted() function is missing the hasStarted modifier that would ensure vesting has begun.

Impact

Any user could claim converted tokens before the owner starts vesting, potentially disrupting the intended vesting schedule.

What the attacker needed

None

The fix

Add the hasStarted modifier to the claimConverted() function.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A vesting contract releases tokens over time, but only after the owner starts the vesting period. The claimConverted function lets users claim their converted tokens, but it does not check if vesting has started. So anyone can call it and get tokens early, before the owner intended.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by rfa

View all

1 more disclosed report, best first.

More from Vader Protocol contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.