Skip to content

Code4rena

Panoptic

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

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

Disclosed reports

Newest first. Only what Panoptic chose to make public.

Smart contracts

CREATE2 address collision during pool deployment allows for complete draining of the pool

The PanopticFactory contract allows users to supply the salt used in CREATE2 when deploying new Panoptic pools, making the resulting pool address predictable. An attacker could brute-force a salt to find a collision with an address they control, then deploy a contract at that address, set an infinite allowance, self-destruct it, and later deploy the Panoptic pool to the same address, allowing them to drain all funds sent to the pool.

Panoptic

Medium
Business logic

Panoptic pool can be non-profitable by specific Uniswap governance

The contract converts a Uniswap pool fee into basis points by integer division, so any pool fee below 0.01% rounds down to zero. If Uniswap governance ever adds such a low fee level, the Panoptic pool would charge no swap commission on in-the-money positions.

Panoptic

Medium
Business logic

Partial transfers are still possible, leading to incorrect storage updates, and the calculated account premiums will be significantly different from what they should be

The token transfer function only checks that the sender's net liquidity (right slot) is fully transferred, ignoring the removed liquidity (left slot). This allows partial transfers that corrupt the stored account liquidity, causing incorrect premium calculations and, for naive users, an enormous removed liquidity value due to an unchecked subtraction.

Panoptic

High
Smart contracts

removedLiquidity can be underflowed to lock other user’s deposits

An unchecked subtraction in the liquidity accounting of the SemiFungiblePositionManager can underflow, letting an attacker set the stored removed liquidity to a huge value. By front-running a victim's deposit with a crafted position, the attacker can make the victim's later withdrawal revert, locking their funds.

Panoptic

Medium
Business logic

Wrong leg chunkKey calculation in haircutPremia function

The haircutPremia function always used leg index 0 when computing the chunkKey for settledTokens, so during liquidation only the first leg's premium was correctly accounted for. This caused an uneven distribution of the haircut, effectively refunding premium for other legs to the liquidatee.

Panoptic

Medium
Smart contracts

Overflow in CollateralTracker allows minting shares for free

The mint function in CollateralTracker calculates required assets in an unchecked block, so a very large shares value overflows the multiplication and yields a tiny asset cost. An attacker can mint a huge number of shares for almost nothing and then withdraw all collateral.

Panoptic

High
Business logic

Incorrect validation during checking liquidity spread

The liquidity spread check in Panoptic's option minting and burning logic is skipped when net liquidity is zero, allowing a buyer to mint a long leg that consumes all selling amount without paying the premium. When the long leg is later burned, the premium is not updated because net liquidity remains zero, so the buyer avoids paying.

Panoptic

Medium
Business logic

_updateSettlementPostBurn() may not correctly reduce s_grossPremiumLast[chunkKey]

The function _updateSettlementPostBurn only updates s_grossPremiumLast when legPremia is non-zero, so when a user burns a position with zero premium, the stored value is not reduced even though totalLiquidity changes. This leads to incorrect accounting of available premium for sellers.

Panoptic

Medium
Race condition

Attacker can steal all fees from SFPM in pools with ERC777 tokens

The SFPM contract updates liquidity and feesBase in the wrong order when minting a short option, allowing an attacker with an ERC777 token to reenter via a hook and transfer the ERC1155 position before feesBase is set. The attacker can then burn the position and steal all outstanding fees belonging to the SFPM.

Panoptic

High
DoS

Premia calculation can cause DOS

The premia calculation in the SemiFungiblePositionManager contract can revert when netLiquidity is very low and removedLiquidity is high, because the result of a multiplication and division cannot be cast to uint128. An attacker can cause a denial of service for specific addresses by manipulating liquidity to leave a dust amount, and normal operations can also lead to self-DoS due to rounding down.

Panoptic

Medium
Audit finding

The Main Invariant “Fees paid to a given user should not exceed the amount of fees earned by the liquidity owned by that user.” can be broken due to slight difference when computing collected fee

Panoptic calculates collected fees as the difference of two separately rounded products, which can exceed the correct fee amount computed by Uniswap V3. An attacker could collect more fees than earned, potentially taking fees from other users in the same position.

Panoptic

Medium
Crypto

validateCallback() is vulnerable to a birthday attack

The validateCallback function in the SemiFungiblePositionManager contract verifies a callback sender by computing a counterfactual address from pool features and truncating a keccak256 hash to 160 bits, which is vulnerable to a birthday attack. An attacker could theoretically find a collision between a malicious address and a legitimate pool address, allowing them to call uniswapV3MintCallback directly and transfer approved tokens from users.

Panoptic

Medium