Skip to content
Business logic Audit finding Intermediate

Double spending attack in the Vesting contract

The vesting reset function sets a user's claimed amount back to zero without accounting for a withdrawal that happened just before the reset. A user could therefore claim the same tokens twice, draining funds meant for other users.

0x73696d616f Follow with ge6a

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-03-symm-io-stacking-judging/issues/650

The protocol has acknowledged this issue.

Found by

0x73696d616f, ge6a

Summary

The function resetVestingPlans() is called by an administrator account and resets vesting plans for a list of users, with the corresponding amount provided as input. The function calls _resetVestingPlans(), where it checks whether the given amount is greater than or equal to the claimed amount for the user. After that, it calls resetAmount() from LibVestingPlan. In this function, the state is updated, the new amount is recorded, and claimedAmount is set to 0.

Root Cause

The issue here is that this can lead to double spending. Even though the user executing the request is trusted, they cannot know whether another transaction has been executed before theirs, in which the user whose vesting plan is being reset has withdrawn their locked amount by paying a penalty fee. If this happens, the user will be able to claim the same amount again after the reset, which would harm other users who might not be able to claim their rewards.

https://github.com/sherlock-audit/2025-03-symm-io-stacking/blob/main/token/contracts/vesting/Vesting.sol#L222-L237

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

  1. Trusted user sends a transaction for executes resetVestingPlans()
  2. Regular user subject of this reset sends a transaction that is executed before the first one and claim their locked tokens as they pay a penalty
  3. After the reset the user is able to claim the tokens up to amount again

Impact

Loss of funds for the protocol and for the users

PoC

No response

Mitigation

No response

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

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

Likely the reset logic zeroes the claimed amount without checking whether the user withdrew funds in a transaction ordered just before the reset.

Impact

The protocol and other users could lose funds because the same tokens may be claimed twice.

What the attacker needed

An administrator resets a vesting plan; the user withdraws before the reset lands

How it was found

  1. An administrator submits a transaction calling resetVestingPlans for a user.
  2. The user withdraws their locked tokens by paying a penalty, and this transaction executes first.
  3. After the reset runs, the user can claim tokens up to the reset amount again.

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 plan locks tokens for a user and tracks how much they have already taken out. The reset function wipes that 'already taken' counter, so if the user withdrew just before the reset, they can withdraw the same tokens a second time.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by 0x73696d616f

View all

172 more disclosed reports, best first.

More from Symmio, Staking and Vesting

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.