Vests can be denied
The vesting contract rejects a new vest if the user already has one, so an attacker can front-run a legitimate vest by creating a tiny vest for the victim, causing the original transaction to revert and denying the vest.
Submitted by cmichel
The LinearVesting.vestFor function (which is called by Converter) reverts if there already exists a vest for the user:
require(
vest[user].amount == 0,
"LinearVesting::selfVest: Already a vester"
);
There’s an attack where a griefer frontruns the vestFor call and instead vests the smallest unit of VADER for the user. The original transaction will then revert and the vest will be denied
Recommended Mitigation Steps
There are several ways to mitigate this. The most involved one would be to allow several separate vestings per user.
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 contract enforces a single vest per user by reverting if a vest already exists, without checking who created it or allowing multiple vests.
Impact
A legitimate vest can be denied, causing the transaction to revert and preventing the intended vesting.
What the attacker needed
Attacker can front-run transactions; victim has no existing vest
The fix
The contract should be changed to allow multiple separate vestings per user, as suggested in the mitigation steps.
How it was found
- Attacker sees a pending vestFor transaction for a victim.
- Attacker front-runs by calling vestFor for the same victim with the smallest possible amount.
- The victim's original transaction reverts because a vest already exists.
- The vest is denied.
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 lets someone gradually receive tokens over time. The contract only allows one vest per user, so if an attacker creates a tiny vest for someone else first, that person's real vest fails because the contract sees they already have one. This is a griefing attack: the attacker doesn't gain anything but blocks the victim.
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.