Immunefi Audit Competitions
Plether | Audit Competition

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

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:

ConditionInterface NatSpecRuntime result
Fully wired; non-degraded; Router paused; pool otherwise readyActive otherwiseuint8(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.