Skip to content

Sherlock

Velocimeter

Every publicly disclosed report for Velocimeter and what kind of bugs they were.

disclosed reports
18
most reported class
Business logic
bug classes found
2
first disclosure
2024
Find Velocimeter on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Velocimeter chose to make public.

Business logic

pause or kill gauge can lead to FLOW token stuck in voter

When a gauge is paused or killed, its unclaimed reward tokens are set to zero without being returned to the minter or distributed, leaving them stuck in the voter contract. An attacker cannot directly exploit this, but the emergency council's action causes a loss of funds.

Velocimeter

High
DoS

First liquidity provider of a newly created stable pair can cause DOS and loss of funds

The stable pair curve in Pair::_k() rounds down to zero when the product of scaled reserves is less than 1e18, allowing the first liquidity provider to mint LP tokens with tiny amounts and then swap out most of the pool without the invariant check failing. This can inflate totalSupply close to overflow, causing denial of service for future depositors and preventing redeployment of the pair.

Velocimeter

Medium
Business logic

`ve_supply` is updated incorrectly

An incorrect time check in the rewards distributor causes the total voting escrow supply for the current week to be recorded before the week ends. A malicious user can create a new voting escrow NFT right after the checkpoint and capture almost all future distribution rewards, leaving other users unable to claim.

Velocimeter

High
Business logic

`DepositWithLock` done via `OptionToken` can be abused to permanently lock a user position

The `depositWithLock` function in `GaugeV4` has a check to prevent re-locking someone else's position, but this check can be bypassed by calling `OptionTokenV4.exerciseLp` on behalf of the victim. An attacker can extend a victim's lock indefinitely at negligible cost, preventing them from unlocking their tokens.

Velocimeter

High
Business logic

voters cannot disable max lock

The disable_max_lock function incorrectly updates the maxLockIdToIndex mapping when removing the last element from the max_locked_nfts array, leaving a stale index. This prevents voters from disabling maxLock, which in turn prevents them from withdrawing their assets because their lock end time decreases on each withdrawal attempt.

Velocimeter

High
Business logic

User can make their `veNFT` unpokeable by voting for a to-be-killed gauge

A user can make their veNFT unpokeable by voting a small amount to a gauge that is about to be killed, because the poke function reverts when it encounters a dead gauge. This allows the user's outdated voting power to persist, giving their chosen pool more emissions and themselves more bribes than deserved.

Velocimeter

Medium
Business logic

Incorrect calculation of TWAP in OptionTokenV4.getTimeWeightedAveragePrice() function

The getTimeWeightedAveragePrice() function in OptionTokenV4 calculates the average price using only past observations from the Pair contract, ignoring the current price, so the returned price can be up to 30 minutes out of date. An attacker could exploit this stale price to exercise options at an incorrect discount, potentially causing losses for the protocol or users.

Velocimeter

Medium
DoS

poke() may be dos

The poke() function in a voting contract can be made to revert by ensuring one pool's calculated weight rounds down to zero, preventing the governor from updating voting weights for that NFT. This allows a malicious voter to keep outdated weights, causing some gauges to receive more rewards than they should.

Velocimeter

High
DoS

VotingEscrow MAX_DELEGATES value can lead to DOS on certain EVM-compatible chains

The VotingEscrow contract has a hardcoded maximum number of delegates (1024) that can cause a denial of service on EVM-compatible chains with lower block gas limits, because moving that many delegates consumes more gas than the block limit. An attacker could delegate many small locks to a victim's tokenId, making functions like transferFrom, withdraw, merge, and mint revert due to out-of-gas, locking the victim's funds.

Velocimeter

High
Business logic

If user merges their `veNFT`, they'll lose part of their rewards

When a user merges their veNFT, the source token is burned, but rewards for the current week are not yet claimable due to a one-week lag in the rewards distributor. As a result, the user loses at least one week of rewards.

Velocimeter

High
DoS

`Voter.replaceFactory()` and `Voter.addFactory()` functions are broken

The Voter contract's addFactory and replaceFactory functions have incorrect validation checks, allowing duplicate factories or gauge factories to be added to arrays. This breaks an invariant and can cause a denial of service when calling createGauge.

Velocimeter

Medium