Skip to content
Business logic Audit finding Advanced

Frozen-window liquidation is electable while solvent, so the 50 bps LP spread is never assessed

While the oracle is frozen, a position holder can elect the liquidation route instead of a voluntary close, and the liquidation plan never assesses the 50 bps frozen-close spread or the 4 bps execution fee. Because the frozen window also raises the maintenance bar to 3%, a still-solvent position can be liquidated by anyone, including its own holder, who is credited the keeper bounty.

ChaseTheLight Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#99731 [SC-Medium] Frozen-window liquidation is electable while solvent, so the 50 bps LP spread is never assessed

Submitted on Nov 15th 2026 at 01:44:02 UTC by @ChaseTheLight for Audit Competition | Plether

Description

Brief/Intro

While the oracle is frozen the engine offers two full-exit routes for the same position at the same pinned mark, and prices them about 46 basis points of notional apart. A voluntary close assesses the LP-owned frozen-close spread, 50 bps of reduced notional, plus the 4 bps execution fee: libraries/CloseAccountingLib.sol:122-124 sets frozenSpreadAssets whenever inputs.oracleFrozen, and libraries/CfdEnginePlanLib.sol:1041-1044 folds it and the fee into the close action charge. The liquidation plan computes neither. LiquidationAccountingLib.buildLiquidationState takes ten parameters and none of them is the frozen-close spread or the execution fee (libraries/LiquidationAccountingLib.sol:47-58), its whole action charge is unpaid carry plus VPI clawback (libraries/CfdEnginePlanLib.sol:1562), and the liquidation plan never enters CloseAccountingLib at all.

The cheaper route is electable by the position holder while the position is fully solvent. For the whole frozen span the liquidation-eligibility test runs against the elevated frozen-market margin: libraries/CfdEnginePlanLib.sol:1450 substitutes fadMarginBps for maintMarginBps whenever snap.isFadWindow, and oracleFrozen implies isFadWindow on every branch of MarketCalendarLib.marketStatus (libraries/MarketCalendarLib.sol:30-58). At the release parameters that is a 3% bar against a 0.1% bar, while the bar a position had to clear at open is the 0.2% initial margin (libraries/CfdEnginePlanLib.sol:431-437 with libraries/OpenAccountingLib.sol:137). So any position between 0.2% and 3% equity is liquidation-eligible while far from insolvent, for about 48 hours every week, on a calendar the contract computes itself.

Anyone may make that call. OrderRouter.executeLiquidation carries no role modifier (OrderRouter.sol:493-496), the credited keeper is msg.sender (router/OrderLiquidationBatchLogic.sol:728), and the only test that address faces where the bounty is credited is a zero-address check (MarginClearinghouse.sol:1264-1269). The holder opens the position themselves while the FX market is open, holds it into the freeze, calls the liquidation on themselves, and is credited half of the liquidation charge. The same call made by a stranger force-closes the solvent position against the holder's will and pays the stranger 5 bps of the holder's own liquidation reserve.

That liquidation does not assess the spread is declared design, stated in five places and tabulated in a sixth. The reason the document gives for it sits two lines below the exemption itself, at SECURITY.md:845: "This is a deliberate trade-off: preserve close and liquidation liveness during real closures without weakening live-market MEV protections." That rationale is general. It does not discuss a holder who calls the liquidation on their own solvent position, or the choice between two exits that are both available at the same pinned mark. The design also names what liquidation retains in place of the spread, and that substitute is worth 2.5 bps against the 50 bps it replaces. Per elected exit the pool receives about 42 bps less of LP-owned trading revenue than the protocol's own pricing assigns to that exit, and the treasury receives none of the 4 bps execution fee.

The proof of concept was run locally and offline, in process inside a network namespace whose only interface is loopback and which had no route off it, with nothing signed and nothing broadcast. The run's own self-check attempts one connection, to an unbound loopback port, and records that it failed; no chain RPC, no fork endpoint and no system of the project's is configured anywhere in it (Proof of Concept).

Vulnerability Details

Root cause

One position in one regime has two priced exits, and only one of them carries the charge the regime exists to collect.

Declared voluntary close Elected liquidation
Plan entry libraries/CfdEnginePlanLib.sol:846-847, _buildCloseState libraries/CfdEnginePlanLib.sol:1495-1502, _buildLiquidationState
Frozen-close spread notional * frozenCloseSpreadBps / 10_000, 50 bps (libraries/CloseAccountingLib.sol:123) not a parameter of the call (libraries/LiquidationAccountingLib.sol:47-58)
Execution fee 4 bps, folded with the spread (libraries/CfdEnginePlanLib.sol:1043) absent from the action charge (libraries/CfdEnginePlanLib.sol:1562)
Execution price the stored mark, returned unshifted (PletherOracle.sol:937-939) the stored mark shifted 2.5 bps adversely (PletherOracle.sol:742, :963)
Charges assessed on the exit 54 bps of notional max(notional * bountyBps / 10_000, minBountyAssets), capped at the account's liquidation reserve (libraries/LiquidationAccountingLib.sol:65-72)
Who is paid LPs take the spread (SECURITY.md:839), the treasury takes the execution fee (CfdEngineSettlementSidecar.sol:703-711, recipient at :709) keeperShareBps to the caller, protocolShareBps to the treasury, the remainder to LPs (libraries/LiquidationAccountingLib.sol:74-78)
Who may call it the account owner anyone (OrderRouter.sol:493-496)

The spread is not omitted from liquidation by a branch a guard might cover. It is unreachable from the liquidation plan by construction. frozenCloseSpreadBps matches twenty-one lines in packages/perps/src and is consumed for computation at exactly one of them, CloseAccountingLib.sol:123. The other twenty are the public declaration (CfdEngine.sol:150), a constructor and an admin bound check with their assignments (CfdEngine.sol:293, :328, :335, :681; CfdEngineAdmin.sol:116), snapshot plumbing that copies the value toward the close plan (CfdEngineLens.sol:751, CfdEngineSettlementSidecar.sol:224, CfdOrderPolicyEvaluatorBase.sol:255, libraries/CfdEnginePlanLib.sol:1343), three interface getter declarations (CfdEngineSettlementSidecar.sol:97, CfdOrderPolicyEvaluatorBase.sol:95, interfaces/ICfdEngineCore.sol:80), struct fields and doc comments. The computational site is reachable only through _buildCloseState, which has one caller, libraries/CfdEnginePlanLib.sol:847, on the close plan. The liquidation plan reaches _buildLiquidationState and stops there.

The second half of the asymmetry is what makes the exempt route available to an account that does not need it. libraries/CfdEnginePlanLib.sol:1450, verbatim:

Solidity
        uint256 maintMarginBps = snap.isFadWindow ? snap.riskParams.fadMarginBps : snap.riskParams.maintMarginBps;

That rate becomes the maintenance requirement at libraries/PositionRiskAccountingLib.sol:143, and eligibility is state.equityAssets <= int256(state.maintenanceMarginAssets) at :144. The flag reaches the liquidation snapshot from the same calendar the engine exposes publicly: CfdEngine.isFadWindow() (CfdEngine.sol:882-884) is read into snap.isFadWindow at CfdEngineSettlementSidecar.sol:218. MarketCalendarLib.marketStatus sets both fadWindow and oracleFrozen true for the whole of Saturday, sets fadWindow 30 minutes earlier than oracleFrozen on Friday and releases it 15 minutes later on Sunday (FAD_LEAD at :15, FAD_LAG at :17), and returns (true, true) for an override day. So the elevated bar is in force for every moment the oracle is frozen, and strictly longer.

The bar the position cleared at open is a different number. An open reverts INSUFFICIENT_INITIAL_MARGIN unless projected equity is strictly above the initial-margin requirement and the projected position is not liquidatable (libraries/CfdEnginePlanLib.sol:431-437), and that requirement is newLots * price * initMarginBps / 10_000, floored at minBountyAssets (libraries/OpenAccountingLib.sol:137-139). At the release parameters the open bar is 0.2% and the in-window eligibility bar is 3%, so a fifteenfold band of solvent positions is liquidation-eligible for the duration of the freeze. The revert that reads as a solvency gate does not close it: CfdEngine.sol:1037-1038 reverts CfdEngine__PositionIsSolvent() only on !delta.liquidatable, and delta.liquidatable was computed against the elevated bar three frames earlier. The error name describes solvency; the predicate tests the window.

Nothing on the call path refuses the liquidation or withholds the bounty when the external caller is the account being liquidated. OrderRouter.executeLiquidation is external payable nonReentrant with no role modifier, and the project's own docstring at OrderRouter.sol:486 reads "Permissionlessly liquidates an unsafe account using an account-adverse oracle price." router/OrderLiquidationBatchLogic.sol:728 passes msg.sender as the keeper, and the project's own parameter doc at router/OrderLiquidationHandler.sol:22 reads "Original external caller credited with any liquidation bounty." No guard in the handler tests the external caller's identity: executeLiquidationBatchItem checks internal dispatch at :34 and a zero size at :38, and msg.sender is read nowhere else in the file. Payment is settlementBalances[execution.keeper] += execution.keeperBountyAssets at MarginClearinghouse.sol:1268, guarded by a zero-address test at :1265 and nothing else, funded by debiting liquidationReserveBalances[account] at :1236-1240. A census over all of packages/perps/src for a keeper comparison returns three sites, and none of them conditions the bounty credit on the caller's identity: CfdEngine.sol:1331 gates the keeper's terminal-curve mutation, :1336 gates the keeper's bounty-recipient checkpoint, and MarginClearinghouse.sol:1265 is the zero-address test that stands immediately before the credit. The two engine sites both run before CfdEngine.sol:1339, which hands the same keeper to the sidecar either way. They are also affirmative evidence that keeper == account is a state the authors knew was reachable: with the two addresses equal the same account would otherwise be opened for terminal-curve mutation twice, so the collision had to be handled for carry accounting. It was not handled for payment.

The last piece is the size of the mitigation the design names as liquidation's replacement for the spread. SECURITY.md:843 states it: "liquidation pricing and settlement retain adverse-confidence pricing and do not assess the spread." While the oracle is frozen that pricing is synthetic. PletherOracle.sol:742 sets the basket confidence to basket.price * basketMaxConfidenceRatioBps / 10_000, under the project's own comment at :741 ("Liquidations receive a deterministic, conservative confidence shift while Pyth is closed"), and PletherOracle.sol:963 takes confidence * adverseConfidenceMultiplierBps / 10_000 as the shift. At the checked-in release values, basketMaxConfidenceRatioBps = 10 and adverseConfidenceMultiplierBps = 2_500 (packages/perps/DEPLOYMENT.md:146-147, corroborated by script/VerifyPerpsArbitrumSepolia.s.sol:44 and its deployment assertion at :424), the confidence is 10 bps of the mark and the shift is 2.5 bps of it. The frozen voluntary close is returned completely unshifted (PletherOracle.sol:937-939), under a comment that states the relationship in the project's own words:

Solidity
        // The fixed frozen-close spread replaces the Pyth adverse-confidence shift for voluntary
        // close/reduce execution while the oracle is frozen. Basket confidence-width validation still
        // applies when the basket is built, and opens (if called directly) retain the adverse shift.

The shift and the spread are declared substitutes for the same risk, and one of them is twenty times the other.

What the design declares, and what it does not

Two of the three mechanics this report composes are declared, and both are design rather than defect.

The spread exemption is declared at ACCOUNTING_SPEC.md:156 ("Liquidations never assess this spread."), :1188, :1250, SECURITY.md:843 and WHITEPAPER.md:1304, and tabulated beside the voluntary close at WHITEPAPER.md:1107-1113, whose "Oracle frozen, within limit" row reads "Stored Engine mark plus fixed spread" for a voluntary close against "Stored mark with conservative confidence shift" for a liquidation. The elevated frozen-market bar is declared at WHITEPAPER.md:1110 ("Elevated FAD margin") and :1119 ("The reference FAD maintenance margin is 3%"), and setting a parameter to a value the code allows is a trusted action under the programme's own terms.

What is not declared is the composition of the two, exercised by an account no rationale in the package's documentation describes. The stated reason for the liquidation exemption is SECURITY.md:845, the summary sentence of the bullet list the exemption closes: "This is a deliberate trade-off: preserve close and liquidation liveness during real closures without weakening live-market MEV protections." It names closure liveness in general terms, and it does not address an account that holds both exits and takes the cheaper one. The lines that turn on collectibility govern a different mechanic: SECURITY.md:841, :990 and :1308 each describe the waiver of an uncollectible spread portion on a terminal full close, and :1335 is a bullet in the list whose subject at :1333 is "oracle-frozen voluntary close/reduce execution", so it waives the spread on the voluntary route rather than explaining why the liquidation route never assesses it. Those lines do not describe the account exercised here: at about 1.8% equity on a 5,000 USDG position it holds about 91 USDG of equity against 25 USDG of spread, so the spread is collectible, the account is solvent, the voluntary route is open to it at the same mark, and it elects the exempt route anyway. The third mechanic, payment of the liquidation bounty to the position holder, appears nowhere in the package's documentation: a search across all sixteen Markdown files under packages/perps for self-liquidation, liquidating one's own position, or a keeper-equals-account condition returns nothing. ACCOUNTING_SPEC.md:1146-1147 states the allocation rule, crediting the keeper and treasury shares and transferring the LP remainder, and says nothing about the keeper being the liquidated account.

Trigger and preconditions

Three conditions, no privileged role, and the actor supplies all three themselves.

  1. An open position whose equity sits between the two bars. Strictly above notional * initMarginBps / 10_000 (0.2% at release) because that is what the open required, and at or below notional * fadMarginBps / 10_000 (3% at release) because that is what the window tests. In ordinary terms, anything from roughly 33x leverage up to the 500x the 0.2% initial margin permits.
  2. The position must be opened while the FX market is open. The frozen and FAD regimes are close-only for opens and increases. libraries/OracleFreshnessPolicyLib.sol:59-62 sets closeOnly = oracleFrozen || isFad for open execution; a fresh open commit reverts OrderRouter__CloseOnlyWindow() on that policy (router/OrderLiquidationBatchLogic.sol:332-334), an open already committed is left pending with PendingReason.CloseOnly (OrderRouterExecutionSidecar.sol:442-443), and the project tabulates the same thing as a blocked risk increase for both regimes (WHITEPAPER.md:1110-1111). An in-window open is refused before the elevated bar at libraries/CfdEnginePlanLib.sol:685 is reached. The position is opened on a weekday and held into the freeze. This is a step of the path, not an obstruction.
  3. The account's liquidation reserve must cover the liquidation charge. It does by construction: the open plan sizes the reserve to max(notional * bountyBps / 10_000, minBountyAssets) and funds it out of the trader's own pledge (libraries/CfdEnginePlanLib.sol:551-556, applied by CfdEngineSettlementSidecar.sol:480-483 through MarginClearinghouse.reclassifyPnlPledgeToLiquidationReserve).

Nothing else is needed. The window arrives on the clock. No Pyth payload and no ETH are required to call the liquidation inside it, because PletherOracle.getUpdateFee returns zero when the payload is empty or the oracle is frozen (PletherOracle.sol:465-467), and the stored mark stays valid for the whole span against fadMaxStaleness = 3 days (CfdEngine.sol:140, consumed at PletherOracle.sol:695).

The numbered path from funding to settled exit, with every hop's entry point, is in the Proof of Concept section.

Recommended fix

Charge the frozen-close spread on an exit that is only eligible because the window raised the bar, and charge it through the liquidation action charge rather than through the bounty.

libraries/CfdEnginePlanLib.sol:1450 already computes the active rate from both candidates, so the plan can cheaply learn which bar made the position eligible, and the spread then belongs in the liquidation action charge at libraries/CfdEnginePlanLib.sol:1562 (the change that does it, and what it flips, are in the Proof of Concept). That is the right lever for three reasons. The collected and withheld action charge is recorded to the pool as LP revenue (CfdEngineSettlementSidecar.sol:836-845), which is where a voluntary close's spread goes, so the LP share then matches what the declared route would have paid LPs for the identical exit at the identical mark. The action-charge path already waives whatever it cannot collect (libraries/CfdEnginePlanLib.sol:1609) and never reverts, so a liquidation cannot be made to fail by adding a charge, which keeps the liveness the exemption was written for. And a genuinely unsafe account, liquidatable at the maintenance bar too, is left untouched by the condition.

The bounty is the wrong lever, and it is the lever a reader will reach for first. The charge computed in LiquidationAccountingLib is capped at reachableCollateralAssets (libraries/LiquidationAccountingLib.sol:70-72), and the value passed for it is snap.liquidationReserveAssets (libraries/CfdEnginePlanLib.sol:1499). That bucket is sized at open to max(notional * bountyBps / 10_000, minBountyAssets) (libraries/OpenAccountingLib.sol:148-152), which is 10 bps of notional at the release parameters. For a position already open against a reserve sized at the old rate, raising bountyBps or the floor is clamped straight back down to that reserve. For positions opened afterwards that same open-time sizing funds the larger reserve too, so the lever works prospectively only, and it raises the charge on every liquidation rather than on the exits this report is about.

The fix needs no new plumbing. The snapshot the liquidation plan receives already carries both inputs: CfdEnginePlanTypes.RawSnapshot declares oracleFrozen and frozenCloseSpreadBps (CfdEnginePlanTypes.sol:144-145), the engine's own liquidation path builds that snapshot through CfdEngineSettlementSidecar.buildRawSnapshot with the close-commit flag false (CfdEnginePlanningReader.sol:61-63, CfdEngineSettlementSidecar.sol:154-161), and both fields are therefore populated at CfdEngineSettlementSidecar.sol:223-224. Each is then read at exactly one place in the planner, libraries/CfdEnginePlanLib.sol:1343-1344, inside the close-state inputs. The liquidation plan holds the frozen flag and the spread rate and reads neither.

The structural fix is to make a frozen-window exit cost one thing regardless of which route carries it. Either assess the spread on every frozen-window exit and let the collectibility cap waive it where it genuinely cannot be paid, which is the rule the voluntary path already uses, or raise the frozen liquidation shift to match the spread, which the comment at PletherOracle.sol:934-936 describes as its substitute on the voluntary route. Equalizing the two is a proposal here rather than something that comment requires. Today the two numbers differ by a factor of twenty and the account picks which one applies to it.

A third change closes the smallest limb on its own: pay no keeper share when keeper == delta.account. The engine already tests that identity twice, at CfdEngine.sol:1331 and :1336, so the condition is available where the bounty is allocated. It moves the elected exit from about 7.5 bps to about 12.5 bps against a declared route at 54 bps, which recovers roughly 5 bps of a 46 bps gap and leaves the remaining 41 bps carried by the spread exemption itself. It is not a substitute for either change above.

Impact Details

The in-scope impact this maps to

The impact tier this report files on, condensed from the programme's Impacts in Scope list:

Text
Medium: theft of gas; SC unable to operate due to lack of token funds; block stuffing; griefing (no
profit motive but damage to users/protocol); unbounded gas consumption; temporary freezing of funds ≥1h.

The entry within it that governs is griefing, which the page states as "no profit motive but damage to users/protocol". This report establishes that damage on both counts, to users and to the protocol. What the holder gains on the route they elect is a charge that was never assessed rather than a transfer out of a balance at rest, and the figure is in the sections above. Where the damage falls on another account, the caller's own gain on the call is the keeper share the deployment sets for a liquidation it treats as eligible, 5 bps of notional as measured (packages/perps/DEPLOYMENT.md:139-141, and Proof of Concept test 5).

This report files at Medium on that entry, and both halves of the damage it names are present: about 42 bps of notional in LP-owned revenue and the treasury's 4 bps fee on each elected exit, and the forced closure of a solvent position when the caller is a stranger. The two limbs rest on different parts of that entry. A liquidation called by a stranger meets it as written: the caller's only gain is the protocol's own posted bounty, 5 bps of notional as measured, and the damage is the forced closure. A liquidation elected by the holder rests on the damage to users and the protocol, measured at 42.2 bps of LP-owned revenue and the treasury's 4 bps on each elected exit. Against the voluntary close at the same mark the elected route is about 46 bps of notional cheaper for the holder, a figure the sections above derive from the two routes' costs at the release parameters and that the Proof of Concept measures on the withdrawal and the conservation identity.

Damage to the protocol is the LP-owned charge. The frozen-close spread is LP-owned trading revenue by the protocol's own definitions: "the spread is LP-owned and never protocol-treasury revenue" (SECURITY.md:839), "assessed spread actually retained or collected as LP trading revenue" (ACCOUNTING_SPEC.md:153), reaching the pool through recordClaimantInflow(..., Revenue, ...) at CfdEngineSettlementSidecar.sol:606-613 and the retained-revenue path at :616. On the elected route it is never assessed, so the pool is paid about 42 bps of notional less for the same exit, and the treasury is paid none of the 4 bps execution fee. No LP claim to that spread ever accrues on the elected route and none is taken: libraries/CloseAccountingLib.sol:122-124 computes it only inside if (inputs.oracleFrozen) on the close path, and the liquidation plan never enters that library.

Damage to a user is the same call made by someone else. A stranger can force-close a fully solvent position for the whole of every frozen window and be credited 5 bps of the holder's own liquidation reserve for doing it. The holder loses the position at a mark pinned to the pre-freeze price, cannot reopen until the window ends because the frozen and FAD regimes are close-only for opens and increases (libraries/OracleFreshnessPolicyLib.sol:59-62, enforced at router/OrderLiquidationBatchLogic.sol:332-334 and OrderRouterExecutionSidecar.sol:442-443), and has one prospective defence: CfdEngine.addMargin is gated only on msg.sender == account, a nonzero amount and an open position, with no window gate (CfdEngine.sol:501-515), so a holder who is watching can top up above the elevated bar. That bounds this limb; it does not remove it, because the holder has to know the bar moved.

The programme's own keeper rule puts the caller in scope either way:

Text
**KEEPERS ARE NOT TRUSTED: anyone can execute orders, liquidations, price updates and protections, so
harm caused by any caller acting as a keeper is IN SCOPE.** Keepers have no special privileges; all
actions remain subject to on-chain checks. Consider any contract-permitted behavior, including
deviations from the reference implementation.

Loss mechanism and its bound

The two page-named charges fix the size. At the configuration the programme names as the one severity is assessed at, the declared route assesses 50 bps of frozen-close spread plus 4 bps of execution fee, 54 bps of notional, folded into one action charge at libraries/CfdEnginePlanLib.sol:1043. The elected route assesses none of it.

What the elected route charges instead follows from the checked-in liquidation defaults: bountyBps = 10, keeperShareBps = 5_000, protocolShareBps = 0 (packages/perps/DEPLOYMENT.md:139-141). The charge is 10 bps of notional, half of it credited to the caller and the rest to LPs, so when the caller is the holder the net charge is 5 bps. Add the 2.5 bps adverse price shift the elected route retains and the holder pays about 7.5 bps where the declared route costs 54 bps. The gap is about 46 bps of notional per elected exit: about 42 bps of it LP-owned revenue, 4 bps of it the treasury's fee. As measured, the voluntary close also returns the 0.28 bps of VPI the position paid at open and the liquidation does not, so the gap is 46.2 bps, of which 42.2 is the pool's. The Proof of Concept section measures the atoms on both branches from one shared state and asserts that the holder's gain equals the pool's loss plus the treasury's loss exactly.

On both routes the pool's balance rises. The finding is the size of the rise, measured against the route the protocol's own pricing assigns to this exit. That is also what bounds the claim: this is revenue forgone on an exit that happened, not value removed from a balance at rest, so the per-exit figure applies to a frozen exit that would otherwise have gone through the declared route, not to every open position.

Per call the absolute size is the position's notional, and that is bounded by the engine's own open-side skew limit, a fraction of pool depth given by maxSkewRatio (libraries/CfdEnginePlanLib.sol:473, checked in at 0.4e18). The rate is the stable number and it does not vary with size: at the checked-in minimum open notional of 1,000 USDG (packages/perps/DEPLOYMENT.md:148) the saving is about 4.6 USDG against cents of Arbitrum gas, so the election pays at every size the router accepts.

The frequency is fixed by the calendar rather than by an attacker. The frozen span runs from the 17:00 New York Friday boundary to the 17:00 Sunday boundary, with the elevated bar extending 30 minutes earlier and 15 minutes later, and the engine recomputes it from block.timestamp on every read (libraries/MarketCalendarLib.sol:30-58, docstring at CfdEngine.sol:878-880). Governance may add all-day holiday overrides. So the election is available roughly 48 hours in every week, to every account in the band, without coordination.

Why not lower, and the out-of-scope entries to weigh

The effect is a recurring per-call loss of LP-owned revenue to the pool together with the forced closure of a solvent account's position, which is the damage the griefing entry above names. The comparison that decides it is against the best legitimate alternative rather than against nothing:

The holder's alternatives inside the window What it costs them Does the fix change it?
Wait for the reopen, then close the execution fee; no spread applies outside the window (SECURITY.md:1333) No
Voluntary close inside the window 54 bps at the page configuration No
Elect the liquidation inside the window about 7.5 bps Yes, to about 57 bps, so the declared route becomes the cheaper one

For a holder content to wait, the fix changes nothing and LPs were never owed a spread by them. For a holder who wants out during the freeze, the fix moves LP revenue on that exit from about 7.5 bps to about 50 bps if they then take the declared route, and to about 57 bps if they elect the liquidation anyway. That second population is the one the spread was built to price: a trader pays 54 bps to exit early only when exiting early is worth more than 54 bps to them, which is the adverse-selection exit the charge exists for. WHITEPAPER.md:1422-1433 tabulates the historical Friday-to-Monday reference-rate moves, then states that the sample does "not validate a 3% FAD margin basis as sufficient", and then says that those thresholds are not liquidation buffers and that actual eligibility depends on starting equity measured against "the applicable maintenance basis". The applicable basis is the quantity this window changes.

"Best-practice recommendations (except as Insights)" does not apply. Value measurably moves between named parties on a permissionless call: the c

The original report as published on Immunefi, by ChaseTheLight. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the liquidation plan was built without the frozen-close spread and execution fee as inputs, and the frozen window raises the eligibility bar so solvent positions qualify for that cheaper path.

Impact

Each elected exit costs LPs about 42 bps of notional in unassessed spread and the treasury its 4 bps fee, and a stranger can force-close a solvent position for a 5 bps bounty.

What the attacker needed

Position opened while market open; equity between 0.2% and 3% of notional; liquidation reserve covers the charge; no privileged role needed

The fix

The frozen-close spread should be charged through the liquidation action charge when eligibility came only from the raised frozen bar, and no keeper share should be paid when the keeper is the liquidated account.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A trading contract charges a fee when you close a position during a period when price feeds are paused. The same contract also lets anyone force-close a position that looks risky, and that path skips the fee. The report shows the owner can trigger the cheap path on their own healthy position and keep part of the reward, costing the liquidity providers money.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by ChaseTheLight

View all

8 more disclosed reports, best first.

More from Plether

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.