Skip to content

Code4rena

Polynomial Protocol contest

Every publicly disclosed report for Polynomial Protocol contest and what kind of bugs they were.

disclosed reports
33
most reported class
Business logic
bug classes found
2
first disclosure
2023
Find Polynomial Protocol contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Polynomial Protocol contest chose to make public.

Business logic

Short positions can be burned while holding collateral

The ShortToken contract burns a short position when its short amount reaches zero, even if collateral remains, causing the owner to lose that collateral permanently. An attacker can front-run a user's closeTrade transaction with a liquidation to force the position's short amount to zero and burn it, or a user can mistakenly close without withdrawing all collateral.

Polynomial Protocol contest

High
DoS

Division by zero error causes KangarooVault to be DoS with funds locked inside

The KangarooVault contract's getTokenPrice() function divides by totalSupply without checking if it is zero, causing a division-by-zero error when all vault tokens are withdrawn but funds remain. This locks the remaining funds permanently because deposits and withdrawals are blocked.

Polynomial Protocol contest

High
Business logic

Inexpedient liquidatable logic that could have half liquidable position turns fully liquidable instantly

The liquidation logic in ShortCollateral.sol halves a position's debt when its safety ratio is between 0.95 and 1, but the liquidation bonus reduces the collateral ratio so much that the position immediately becomes fully liquidatable. An attacker could exploit this to liquidate a barely unhealthy position completely in two transactions.

Polynomial Protocol contest

High
Business logic

Users can receive less collateral than expected from liquidations

When liquidating a short position, the collateral returned to the liquidator is capped at the remaining collateral, so if the position is undercollateralised, the liquidator may receive less than expected or nothing. An attacker (or any liquidator) could fully liquidate a position with no collateral and receive no reward.

Polynomial Protocol contest

Medium
Business logic

LiquidityPool._getDelta and LiquidityPool._calculateMargin functions should execute require(!isInvalid && spotPrice > 0) instead of require(!isInvalid || spotPrice > 0)

The LiquidityPool contract uses a logical OR instead of AND when checking whether the asset price is valid, so trades can proceed even when the price feed marks the price as invalid. An attacker could open or close positions using an untrusted price, potentially causing financial loss.

Polynomial Protocol contest

Medium
DoS

LiquidityPool can be DoS when a complete withdrawal is performed

The LiquidityPool's getTokenPrice() function divides by totalSupply, which can become zero after a complete withdrawal while totalFunds remains non-zero due to rounding. This causes a division-by-zero revert, blocking further deposits and requiring redeployment.

Polynomial Protocol contest

Medium
Business logic

Attacker can post-running attack to prevent LiquidityPool from hedging by orders of PerpMarket

The LiquidityPool's hedging mechanism can be blocked by an attacker who repeatedly opens or closes a small position immediately after the pool's delayed order is executed, causing the pool to submit a new order for only the current trade size and preventing it from submitting the accumulated queued size. This leaves the pool unhedged for subsequent trades.

Polynomial Protocol contest

Medium
Business logic

First Depositors will incurr a rebalancing Loss

The vault's token price drops after a deposit is invested because trading fees are paid, so later depositors can buy vault tokens at a discount and receive more tokens for the same funds. The report claims this disadvantages early depositors, though the project disputed that the price drop is intended behaviour.

Polynomial Protocol contest

Medium
Business logic

Lack of price validity check from Synthetix results in loss of funds while liquidating

The liquidation and order-fee code paths read prices from Synthetix without checking the returned 'isInvalid' flag, unlike other functions in the same contract that do check it. An attacker could trigger a liquidation while the price feed is momentarily invalid or stale, causing under- or over-liquidation and a loss of funds for the user or the protocol.

Polynomial Protocol contest

Medium
Business logic

KangarooVault._resetTrade , LiquidityPool.rebalanceMargin , and LiquidityPool._getTotalMargin functions should check isInvalid , which is returned by external perp market contract’s remainingMargin function, and revert if such isInvalid is true

Several functions in KangarooVault and LiquidityPool ignore the isInvalid flag returned by the external perp market's remainingMargin function, so they use a margin value that should not be trusted. This can allow deposits and withdrawals to proceed with an inaccurate token price.

Polynomial Protocol contest

Medium
Business logic

Short positions with minimum collateral can be liquidated even though canLiquidate() returns false

The canLiquidate() function returns false for short positions with exactly the minimum collateral, but maxLiquidatableDebt() treats the same positions as liquidatable, allowing half their debt to be liquidated. An attacker could liquidate such positions even though the protocol's own check says they are safe, causing users to lose collateral.

Polynomial Protocol contest

Medium
Business logic

Attacker can transfer all SUSD’s balance of LiquidityPool as margin to Synthetix perpetual market, and break the actions of users until the pool is rebalanced by the authority

The LiquidityPool contract always transfers a positive margin to the Synthetix perpetual market for every trade, even when reducing position size. An attacker can repeatedly open and close a position in one transaction to drain the pool's SUSD balance into margin, preventing users from withdrawing or trading until the pool is rebalanced.

Polynomial Protocol contest

Medium
Business logic

Supply drain of PowerPerp tokens through liquidations

The PowerPerp token supply can be drained because liquidations burn tokens, reducing total supply and raising the token price, which makes more positions underwater and harder for long traders to close. An attacker could exploit this by triggering liquidations to strain the supply and profit from the price increase.

Polynomial Protocol contest

Medium
DoS

KangarooVault QueuedWithdraw Denial of Service

A queued withdrawal can be made to revert by setting the receiver to the sUSD token contract, which the token refuses to transfer to. Because the queue processes entries in order and stops at the first failure, all later withdrawals are blocked and those users lose their vault tokens without receiving sUSD.

Polynomial Protocol contest

High
Business logic

Users’ collateral could get stuck permanently after fully closing short trades

When closing a short trade, a user could accidentally enter a collateral amount smaller than the position's collateral, causing the position to be burned while some collateral remains locked in the contract. The user could then permanently lose access to that collateral because the ownership check for withdrawal fails after the token is burned.

Polynomial Protocol contest

Medium
Business logic

Collateral removal not possible

The protocol has no way to remove a previously approved collateral token. If an approved token later starts charging a fee on transfers, the deposit logic still credits the user with the full amount even though the contract receives less, creating an accounting mismatch.

Polynomial Protocol contest

Medium
Business logic

Exchange._liquidate function can cause liquidator to burn too much powerPerp tokens

The liquidation function burns the full requested debt amount of powerPerp tokens from the liquidator, but if the collateral returned is capped at the user's available collateral, the liquidator receives less collateral than the burned tokens are worth. An attacker (or unlucky liquidator) could lose powerPerp tokens because the burn amount is not adjusted to the actual collateral received.

Polynomial Protocol contest

High
Business logic

Hedging during liquidation is incorrect

During liquidation of a short position, the Exchange contract burns power perp tokens and reduces the short position, but also calls the LiquidityPool's liquidate function, which hedges the pool by the same amount. This causes the LiquidityPool to be over-hedged, leading to an incorrect position and potential loss of funds.

Polynomial Protocol contest

High
Business logic

Uneven deduction of performance fee causes some KangarooVault users to lose part of their token value

The KangarooVault contract charges a performance fee on premiumCollected when closing all positions, but the token price calculation includes premiumCollected without subtracting the fee. An attacker can withdraw before the fee is deducted, avoiding their share of the fee and leaving remaining users to bear it, reducing their token value.

Polynomial Protocol contest

High
Business logic

Excessive trading fees can result in 99.9% collateral loss for the trader

The slippage fee calculation in the liquidity pool scales linearly with trade size without any upper bound, so for very large trades the total fee (open plus close) can exceed the trader's collateral. An attacker (or any user) could open and close a large position and lose essentially all of their collateral to fees.

Polynomial Protocol contest

High