A cross-contract reentrancy flaw in the liquidation process lets a malicious liquidator transfer phantom shares from the liquidatee to themselves before the second collateral tracker revokes them. The attacker can then redeem these shares for real assets, draining the CollateralTracker vault.
The liquidation bonus calculation subtracts a cross-denominated collateral balance from a required threshold in unsigned arithmetic, assuming the threshold is always at least the balance. When an account is insolvent only by distribution (one token short while the other has a surplus) and cross-margining is disabled, the balance can exceed the threshold, so the subtraction underflows and reverts, making the account unliquidatable.
The UPPER_118BITS_MASK constant in OraclePackLibrary is too short, so when rebaseOraclePack applies it, the mask clears the EMAs and lockMode fields in addition to the intended referenceTick and residuals. This corrupts the OraclePack data, compromising its integrity.
The interest rate target was updated on every call to _accrueInterest even within the same 4-second epoch, while the epoch counter only advanced when time had passed. An attacker could trigger multiple calls in one block to compound the rate error and manipulate the borrow index, leading to incorrect debt calculations.
The highDivergence check in the risk engine's safe mode logic compares the median tick against a slow moving average, but both values are derived from the same clamped input, so their divergence is mathematically bounded well below the trigger threshold. This makes the check dead code, so the intended third layer of oracle-manipulation protection never activates and minting may proceed when it should be blocked.
A short option leg with a very wide tick range causes the solvency calculation to revert when the current price is inside that range, because the code computes a square-root ratio for the range width, which can exceed the supported tick domain. An attacker could create such a position and later block liquidation or collateral-withdrawal checks, leaving an insolvent account unliquidatable.
Liquidity providers could withdraw all available assets from a collateral contract, leaving insufficient liquidity for long positions to be closed. This could trap long holders in their positions and cause losses if the market moved against them.
The oracle update function can be called by anyone and only accepts one update per 64-second epoch, so an attacker can frontrun legitimate updates with a flash-loan-manipulated tick and lock that value in for the rest of the epoch. Repeating this across epochs lets the attacker shift the oracle by up to 149 ticks each time, distorting pricing and solvency checks for all positions.
The settlement and force-exercise functions allow a position owner to act as the caller, but the refund mechanism assumes the caller is a distinct third party who can cover any shortage. When the caller is the same as the account, the refund becomes a self-transfer that injects no real value, so settlement can succeed even when the user lacks sufficient real balance to cover the debt.
The liquidation function values a user's collateral using a stale stored interest figure while valuing their debt with interest calculated up to the current block, so the user's net worth is underestimated. This can cause the protocol to overstate its loss and revoke premiums from sellers, and can underpay liquidators.
When builderCode is zero, commission fees are burned as shares from the option owner without removing assets, which instantly raises the share price for all current shareholders. An attacker can deposit just before such a burn to capture most of the value, or a fee payer can recapture their own fee.
The force exercise function calculates a fee from current and time-weighted ticks and settles it without letting the caller set a maximum they are willing to pay. A caller could therefore pay more than expected when the fee changes with price movement.
The getSolvencyTicks function uses a squared-distance gate that can be bypassed by symmetric tick configurations, causing solvency to be checked at only one tick even when the spot and current ticks diverge significantly. An attacker could exploit this to have a position pass solvency checks while actually being insolvent at the current price.
Liquidity providers in Panoptic can withdraw their shares immediately before a bad debt event is socialised, avoiding their share of the loss. The remaining liquidity providers then absorb the full deficit, so losses are distributed unfairly.
The commission fee calculation in settleBurn uses the minimum of the premium fee and notional fee, but when called from _settleOptions the notional fee is zero, so the commission becomes zero. Also, if realizedPremium is zero, the commission calculation is skipped entirely, allowing users to avoid commission fees by settling premium first and then burning.
The function that calculates required collateral and credits for a position overwrites the credits variable on each qualifying leg instead of accumulating it, so only the last leg's credit is counted. This undercounts a user's margin and can cause a solvent account to be wrongly liquidated.
The twapEMA function in RiskEngine destructured the return values of getEMAs in the wrong order, causing the TWAP to be weighted 60% slow EMA, 30% fast EMA, and 10% spot EMA instead of the intended 60% fast, 30% slow, and 10% eons. This misweighting anchored the TWAP to stale prices, allowing insolvent accounts to appear solvent and block liquidation or force-exercise.
For pools with tickSpacing equal to one, a long position with a one-tick-wide leg evaluated at a tick equal to its strike causes a division-by-zero revert in the risk engine's margin calculation. Because dispatchFrom always includes the current tick, liquidation, force-exercise and settlement actions can hard-revert when the current tick equals the strike, potentially blocking third-party resolution at those prices.
The dispatchFrom function in PanopticPool unconditionally reverts with StaleOracle when the spot tick deviates from the TWAP by more than a threshold, blocking all liquidations, force exercises, and premium settlements. An attacker can front-run a liquidation with a swap to push the price out of range, causing the liquidation to revert and delaying it indefinitely.
The settleBurn function returns a tokenPaid value that excludes commission fees burned afterwards, so the netPaid used in liquidation is understated. A liquidator can therefore receive a larger liquidation bonus than the liquidatee actually paid.
The BuilderWallet contract's init() function had no access control or one-time guard, so anyone could overwrite the stored builderAdmin address. An attacker could then call sweep() as the new admin and drain all ERC20 tokens held by any builder wallet.
The RiskEngine contract's delayed swap collateral calculation used the maximum of the loan requirement and credit value instead of netting the credit against the loan. This inflated collateral requirements, making solvent accounts appear insolvent and potentially triggering unfair liquidations.
PN
Panoptic: Next Core
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.