Skip to content
Audit finding Beginner

Document Paused in IProtocolViews instead of describing every remaining phase as Active

The public interface comment for the protocol status view lists only Configuring, Degraded and Active, but the implementation can also return a Paused phase when the Router is paused. A consumer relying on the comment could mislabel a governance-paused protocol as Active or treat the paused value as unknown.

FestiveSRT Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

#98816 [SC-Insight] Document Paused in IProtocolViews instead of describing every remaining phase as Active

Submitted on Nov 10th 2026 at 11:47:20 UTC by @FestiveSRT for Audit Competition | Plether

Description

Summary

IProtocolViews.getProtocolStatus() documents Configuring, Degraded, and then Active otherwise. The implementation has a fourth valid outcome: Paused. For a fully wired, non-degraded protocol whose Router is paused, the view returns numeric phase 3 (ProtocolPhase.Paused), while the public interface comment places that state in its Active otherwise remainder.

This is a Documentation Improvements Insight. The runtime phase derivation is correct; the interface's semantic contract is incomplete.

Affected asset, category, and location

PerpsPublicLens.sol is excluded from the selected asset and is cited only as corroborating implementation evidence.

Exact discrepancy

The interface says the phase is Configuring until the system is ready, Degraded when insolvency is latched, and Active otherwise. It never names Paused.

The canonical ProtocolPhase enum contains four values and expressly places Paused after the degraded check. The returned ProtocolStatusView exposes that phase as a numeric uint8. The PerpsPublicLens derivation returns Paused when Router governance is paused; only the final ready case returns Active.

Concrete value of the improvement

A product consumer that derives an exhaustive phase mapping, generated API documentation, or an operational label from the public interface NatSpec can treat numeric phase 3 as unknown or apply the documented Active otherwise fallback. Either result can misrepresent a governance-paused protocol in a status page, alert, or integration.

The audience is repository-defined: the canonical entrypoint guide directs protocol/status consumers to PerpsPublicLens and IProtocolViews. The correction changes one interface comment and requires no ABI, runtime, storage, caller, or migration change.

Relationship to Cecuro LOW-15

Cecuro LOW-15 reported the earlier runtime problem: protocol status could return Active while Router risk-off blocked new opens. Its remediation added the ProtocolPhase.Paused enum value and the runtime branch that returns it.

The current runtime now reports Paused correctly. The remaining issue is the different documentation defect left after that remediation: the public IProtocolViews comment still describes only three outcomes and labels the remainder Active. This report requests only completion of that interface contract; it does not re-report LOW-15's fixed runtime behavior.

Recommended correction

Update IProtocolViews.getProtocolStatus() to document the exact implemented order:

  1. missing mandatory dependency code, or a Router admin with no code, is Configuring;
  2. otherwise degraded mode is Degraded;
  3. otherwise Router pause is Paused;
  4. otherwise a pool that cannot increase risk is Configuring; and
  5. only the remaining fully ready state is Active.

Limitations and non-claims

  • No pause bypass, incorrect runtime phase, transaction failure, fund impact, or vulnerability severity is claimed.
  • No external consumer failure or production occurrence was observed.
  • The excluded PerpsPublicLens.sol is evidence, not the selected bug location.
  • The requested change is limited to this one interface NatSpec.

Proof of Concept

Proof of Concept

Runnable code is not required for this Documentation Improvements Insight. The deterministic source comparison is:

  1. Read IProtocolViews.getProtocolStatus(). Its NatSpec names Configuring and Degraded, then says Active otherwise; it does not name Paused.
  2. Read the ProtocolPhase enum. Solidity's zero-based enum encoding makes Configuring = 0, Active = 1, Degraded = 2, and Paused = 3.
  3. Read the ProtocolStatusView return type. It exposes the phase as uint8, not as a self-describing string.
  4. Read the _getProtocolPhase() implementation. After the wiring and degraded checks, a paused Router admin returns ProtocolPhase.Paused; only the remaining ready case returns Active.

The decisive state comparison is:

Condition Interface NatSpec Runtime result
Fully wired; non-degraded; Router paused; pool otherwise ready Active otherwise uint8(ProtocolPhase.Paused), value 3

Conditions under which the Insight is valuable

The correction is valuable whenever a maintainer, product consumer, monitoring integration, generated-documentation consumer, test author, or incident responder uses the public interface NatSpec to understand, implement, test, or expose the protocol's complete phase model. The protocol need not currently be paused and no consumer failure must already have occurred: the source-defined paused branch proves that Paused is a valid public result which the present interface contract omits.

In the concrete paused state shown above, a consumer that maps the numeric uint8 result can treat value 3 as unknown or apply the documented Active otherwise remainder. The proposed comment-only correction prevents that misunderstanding by naming all four valid values and their precedence without changing the ABI or runtime behavior.

No Gist, attachment, transaction, RPC call, or runtime exploit is needed.

The original report as published on Immunefi, by FestiveSRT. 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 interface NatSpec was not updated when a Paused phase was added to the runtime derivation, so the documented contract omits a valid return value.

Impact

A consumer that maps the numeric phase could treat the paused value as unknown or apply the documented Active fallback, misrepresenting a governance-paused protocol in a status page or alert; no runtime, fund or pause-bypass impact is claimed.

What the attacker needed

None

The fix

The interface comment should be updated to document all four phases and their precedence, with no ABI or runtime change.

How it was found

  1. Read the getProtocolStatus interface comment and note it names only Configuring, Degraded and Active.
  2. Read the ProtocolPhase enum and note it has four values, with Paused encoded as 3.
  3. Read the status view return type and note the phase is exposed as a plain number.
  4. Read the phase derivation and note a paused Router returns Paused, with Active only for the remaining ready case.

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 smart contract interface is like a public manual: other programs and people read its comments to learn what a function can return. Here the manual lists three possible states but the code can actually return a fourth one, Paused, so someone building a status page from the manual could show the wrong label. Nothing is broken at runtime; only the written description is incomplete.

More by FestiveSRT

View all

22 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.