Skip to content
Audit finding Beginner

SECURITY.md says frozen closes retain confidence validation, but the oracle replays a cached mark

The security guide states that oracle-frozen voluntary closes keep aggregate confidence-width validation, but the oracle code returns the cached mark without parsing or validating any new price feed payload. A reader relying on that sentence could wrongly believe fresh signed price data improves confidence or freshness during a frozen window.

Tradi3 Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

#98249 [SC-Insight] SECURITY.md says frozen closes retain confidence validation, but the oracle replays a cached mark

Submitted on Nov 6th 2026 at 10:14:51 UTC by @Tradi3 for Audit Competition | Plether

Description

Type: Documentation Improvements Insight. Target: Plether competition commit a82d4fefb02768e5b3bddcc97dee371eee24fea8, packages/perps/src/PletherOracle.sol. This report requests a correction to packages/perps/SECURITY.md; it does not claim a contract exploit or loss of funds.

Bug description

packages/perps/SECURITY.md:655 says oracle-frozen voluntary closes “retain aggregate confidence-width validation.” At this pin, PletherOracle._resolveCurrentBasket returns _frozenBasket as soon as policy.oracleFrozen is true (PletherOracle.sol:749-756). _frozenBasket reads engine.lastMarkPrice() and lastMarkTime() and checks age, but does not parse or validate a supplied Pyth payload (:729-743). Frozen liquidation confidence is synthesized from the cached price and the configured maximum ratio (:741-742), irrespective of the confidence carried by the original feed observation.

The intended frozen behavior is already stated correctly in ORACLE_SYNCHRONIZATION.md:70-80 and WHITEPAPER.md:1071-1076. The single sentence in the audit-facing security guide should be brought into line with those documents. The live/frozen distinction matters to a reviewer or keeper integrator deciding whether providing fresh signed Pyth data during a weekend or holiday can improve confidence or price freshness. It cannot while the oracle remains frozen.

Suggested replacement for the relevant clause:

Aggregate basket confidence is validated and used for live/FAD execution and liquidation. During oracle-frozen operation, the oracle replays the last accepted Engine mark without parsing or validating new Pyth updates. Frozen voluntary closes use the fixed frozen-close spread instead of a Pyth adverse-confidence shift; frozen liquidations use a deterministic confidence equal to markPrice * basketMaxConfidenceRatioBps / 10_000 for their adverse shift.

PR #120 expressly introduced/documented cached-mark replay with no Pyth call, but left this earlier SECURITY sentence. Cecuro MED-20 and SC-M1 concern frozen divergence limits, not this text correction. Other Plether documents accurately describe the behavior, so this is a narrow documentation improvement. A private prior Insight cannot be ruled out by public search.

Proof of Concept

Proof of concept and conditions of value

  1. At the pinned commit, read packages/perps/SECURITY.md:655 and packages/perps/src/PletherOracle.sol:729-756. The documented confidence-width validation on a frozen close has no current-payload validation path: _resolveCurrentBasket returns before the live parser branch.
  2. In a test-only Foundry fixture, install a live Engine mark of 1e8 with zero confidence, enter the Friday oracle-frozen window, commit a normal Router close, and supply a new Pyth payload at 0.90e8 with confidence 20_000_000 (about 22% of its price, far above the release 10 bps basket limit). getOrderExecutionFee returns zero. The normal router.executeOrder succeeds at the cached 1e8 mark and retains the pre-freeze publish time. This shows the supplied price and confidence were ignored; it does not assert a funds impact.
  3. A separate router-pranked Oracle call in the fixture returns a frozen LONG-liquidation price of 100_025_000 from a zero-confidence cached mark. This checks the deterministic confidence rule; it is not a complete public liquidation trace.

Focused test: packages/perps/test/perps/l16/L16DocsPromises.t.sol::test_Lead6_FrozenOracleIgnoresNewPythDataAndSynthesizesLiquidationConfidence in the saved test-only worktree. Explicit Forge 1.5.1, --offline --no-auto-detect --jobs 1, 1/1 PASS. The test source is SHA256 39B704533377E4A64F7D0A279BBD2A712DD31EDE7E76BEB991DB2F6B05A018BE; run log frozen-security-doc-poc-151b.log is SHA256 6849EE36AD0F55F5EABE45E8C57C50CD17AEA48B71DA1DB0CB7797F397DE63B2.

The Insight is valuable when a reader uses SECURITY.md alone to assess frozen-mode oracle guarantees. The code and other specs already disclose the correct behavior. No change to the intentional frozen execution policy is proposed.

The original report as published on Immunefi, by Tradi3. 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 a documentation sentence was left behind after the code was changed to replay the cached mark without parsing new price data.

Impact

The mismatch could mislead reviewers and keeper integrators about frozen-mode guarantees, but the text does not claim any loss of funds or exploitable behaviour.

What the attacker needed

Access to the pinned source; test-only Foundry fixture

The fix

The security guide sentence should be corrected to match the other documents describing cached-mark replay.

How it was found

  1. Read the security guide line and the oracle resolution code at the pinned commit.
  2. In a test-only fixture, set a live mark with zero confidence and enter the frozen window.
  3. Submit a normal close with a new price payload carrying very high confidence.
  4. Observe the order succeeds at the cached mark and the supplied price and confidence are ignored.

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.

An oracle is a service that feeds outside price data into a contract. When the oracle is 'frozen', the contract stops taking new price updates and reuses the last stored price. This report says the project's security document wrongly suggests new price data is still checked during that frozen period, when the code simply reuses the old price.

More by Tradi3

View all

39 more disclosed reports, best first.

More from Plether

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.