Skip to content

Code4rena

Sushi Trident contest phase 2

Every publicly disclosed report for Sushi Trident contest phase 2 and what kind of bugs they were.

disclosed reports
23
most reported class
Business logic
bug classes found
4
first disclosure
2021
Find Sushi Trident contest phase 2 on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Sushi Trident contest phase 2 chose to make public.

Business logic

ConcentratedLiquidityPoolManager ’s incentives can be stolen

The reclaimIncentive function does not reduce the incentive.rewardsUnclaimed field, allowing repeated claims. An attacker can create their own incentive, wait for expiry, and repeatedly reclaim the same amount until the contract's token balance is drained.

Sushi Trident contest phase 2

High
Smart contracts

Unsafe cast in ConcentratedLiquidityPool.burn leads to attack

The burn function in ConcentratedLiquidityPool casts a user-supplied uint128 amount to a signed int128 without checking, so a large value like 2^128-1 becomes -1. This lets an attacker mint LP tokens for free and redeem an extremely large amount of pool tokens.

Sushi Trident contest phase 2

High
Smart contracts

Overflow in the mint function of ConcentratedLiquidityPool causes LPs’ funds to be stolen

The mint function of the ConcentratedLiquidityPool contract performed a balance check inside an unchecked block, so adding the amount owed to the existing reserve could wrap around to a small number. An attacker could then mint a very large liquidity position while paying almost nothing, and later burn it to take other liquidity providers' funds.

Sushi Trident contest phase 2

High
DoS

range fee growth underflow

The RangeFeeGrowth function in a concentrated liquidity pool can revert when calculating fees because the sum of feeGrowthBelow and feeGrowthAbove can exceed the global fee growth. This prevents users from adding or removing liquidity, locking funds in the contract.

Sushi Trident contest phase 2

High
Business logic

Cannot claim reward

The claimReward function in the ConcentratedLiquidityPoolManager checks a stake.initialized flag that is never set, and also computes 128 minus incentive.secondsClaimed, which almost always underflows and reverts. As a result, users cannot claim their rewards.

Sushi Trident contest phase 2

Medium
Business logic

Incentive should check that it hasn’t started yet

The addIncentive function does not check whether an incentive has already started, allowing an incentive with a non-zero secondsClaimed to be added. This could lead to incorrect reward calculations.

Sushi Trident contest phase 2

Medium
DoS

ConcentratedLiquidityPoolHelper : getTickState() might run out of gas

The getTickState() function iterates over all ticks in a concentrated liquidity pool, which can cause it to run out of gas depending on tick spacing. An attacker could call this function to cause a denial of service by exhausting gas.

Sushi Trident contest phase 2

Medium
Business logic

Wrong inequality when adding/removing liquidity in current price range

The mint and burn functions in a concentrated liquidity pool use a strict inequality to check if the current price is within the liquidity range, so when the current price equals the lower bound, liquidity is not added or removed correctly. This can lead to incorrect swap amounts and users losing funds when adding liquidity in that specific range.

Sushi Trident contest phase 2

High
Smart contracts

Incorrect usage of typecasting in _getAmountsForLiquidity lets an attacker steal funds from the pool

The concentrated liquidity pool contract casts the results of its maths helpers from a 256-bit integer down to a 128-bit integer without checking for overflow. An attacker could craft mint parameters so the amount they must pay is truncated to a tiny value while they receive a huge amount of liquidity, which they could then burn to take other users' funds.

Sushi Trident contest phase 2

High
Business logic

Wrong usage of positionId in ConcentratedLiquidityPoolManager

The ConcentratedLiquidityPoolManager contract uses positionId instead of incentiveId when looking up incentives in the subscribe, getReward, and claimReward functions. This causes the wrong incentive to be used or the transaction to revert because the incentive is not found.

Sushi Trident contest phase 2

High
Business logic

Understanding the fee growth mechanism (why nearestTick is unsuitable)

The report explains that using the nearestTick instead of the actual pool tick for fee growth calculations leads to incorrect initialisation of feeGrowthOutside and ambiguous case handling. This could cause positions to receive wrong fee amounts.

Sushi Trident contest phase 2

High
Business logic

Possible attacks on Seconds * Liquidity calculation

The report describes a possible attack on a staking contract where a user can mint a tight-range liquidity position, claim rewards, then burn and re-mint at a new price to continuously earn incentives without risk. The attacker could steal incentive funds by maintaining a high-liquidity position in the correct price range.

Sushi Trident contest phase 2

High
Business logic

Burning does not update reserves

The burn function in the ConcentratedLiquidityPool contract sends out tokens but only reduces the reserves by the fee amounts, not the full token amounts. This leaves the pool's recorded reserves higher than its actual balance, causing subsequent mint and swap operations to fail or require users to pay extra tokens.

Sushi Trident contest phase 2

High
DoS

ConcentratedLiquidityPool : rangeFeeGrowth and secondsPerLiquidity math needs to be unchecked

The fee growth and seconds-per-liquidity calculations in a concentrated liquidity pool can legitimately produce negative intermediate values, but the code performs these subtractions with checked arithmetic. An attacker could trigger a revert by moving the price so that the computed fee growth inside a range goes negative, causing the affected position operations to fail.

Sushi Trident contest phase 2

High
Business logic

ConcentratedLiquidityPool.burn() Wrong implementation

The burn function in the ConcentratedLiquidityPool contract incorrectly updates reserves by subtracting only the fees instead of the full burned amounts, causing reserves to be larger than actual balances. This can break essential functions like swap and mint.

Sushi Trident contest phase 2

High
Access control

TridentNFT.permit should always check recoveredAddress != 0

The permit function in TridentNFT fails to check that the recovered address from a signature is not the zero address when the zero address is approved as an operator. If a user accidentally sets the zero address as an operator, anyone can steal tokens by submitting an invalid signature that recovers to the zero address.

Sushi Trident contest phase 2

Medium