Hunt prep
Before you test Sushi Trident contest phase 2
What 23 disclosed reports say about Sushi Trident contest phase 2: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 15 | 0 | – | – | $0 |
| DoS lesson | 4 | 0 | – | – | $0 |
| Smart contracts lesson | 3 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
ConcentratedLiquidityPoolManager ’s incentives can be stolen
The reclaimIncentive function should reduce incentive.rewardsUnclaimed by the withdrawn amount.
Disclosed
-
Unsafe cast in ConcentratedLiquidityPool.burn leads to attack
A SafeCast library should be used for all type casts to prevent unsafe conversions.
Disclosed
-
ConcentratedLiquidityPosition.sol#collect() Users may get double the amount of yield when they call collect() before burn()
The burn() function should call position.pool.collect() before position.pool.burn(), or collect() should be made public and called by burn() after position.pool.burn().
Disclosed
-
Overflow in the mint function of ConcentratedLiquidityPool causes LPs’ funds to be stolen
The unchecked block should be removed, or both values cast to uint256 before adding and comparing, so overflow is detected.
Disclosed
-
range fee growth underflow
The fix is to swap the condition of feeGrowthGlobal, as confirmed by the team.
Disclosed
-
ConcentratedLiquidityPool: incorrect feeGrowthGlobal accounting when crossing ticks
The fix is to switch the `0` and `1` indices in `Ticks.cross()` so that the correct fee growth variable is updated for each swap direction.
Disclosed
-
Cannot claim reward
The reward-claiming logic should be redesigned so the initialisation flag is actually set and the time calculation cannot underflow.
Disclosed
-
ConcentratedLiquidityPool : secondsPerLiquidity should be modified whenever pool liquidity changes
The secondsPerLiquidity increment logic should be applied before liquidity addition in mint() and removal in burn().
Disclosed
-
ConcentratedLiquidityPoolManager.sol claimReward() and reclaimIncentive() will fail when incentive.token is token0 or token1
The recommendation is to disallow token0 or token1 as incentive tokens, or to track remaining incentive amounts and avoid using those reserved balances when collecting fees.
Disclosed
-
ConcentratedLiquidityPoolHelper : getTickState() might run out of gas
The function should be modified to accept a starting index and a tick count to limit the number of iterations, as suggested in the report.
Disclosed
-
Wrong inequality when adding/removing liquidity in current price range
The inequalities should be changed to include equality on the lower bound, i.e., use less-than-or-equal for priceLower.
Disclosed
-
Incorrect usage of typecasting in _getAmountsForLiquidity lets an attacker steal funds from the pool
The result of DyDxMath.getDy or DyDxMath.getDx should be checked against type(uint128).max and the transaction reverted if it exceeds it, or a safe casting library should be used instead.
Disclosed
-
Wrong usage of positionId in ConcentratedLiquidityPoolManager
Change positionId to incentiveId in the referenced lines of code.
Disclosed
-
Understanding the fee growth mechanism (why nearestTick is unsuitable)
The nearestTick should be replaced by the actual pool tick where relevant.
Disclosed
-
Possible attacks on Seconds * Liquidity calculation
The reporter recommends locking positions during a set time while they are staked, but the project does not intend to fix it.
Disclosed