DeFiLayer 1Layer 2
14,723 OP
View results
Submission Details
Severity: low
Invalid

Minimal Error Messaging in Critical Require Statements

Description

In several parts of the contracts, require statements lack detailed error messages. For example, in V2’s _extractPeriodFromProof:

require(slot.exists);

has no descriptive message.

Workflow Explanation

  1. Proof Processing:
    The verifier processes the state proof and calls Verifier.extractSlotValueFromProof.

  2. Slot Existence Check:
    If the expected slot does not exist, the require statement reverts without a helpful error message.

Attack Path

  • Misconfiguration or Malicious Input:
    If a state proof is missing the expected storage slot (either due to an error or a malicious attempt), the contract will revert with a generic error.

  • Impact:
    This does not directly allow an attacker to profit, but it hinders debugging, monitoring, and operational response. In a live system, ambiguous errors can delay the detection and mitigation of more severe issues.

Proof of Concept Outline

  • Test Case:
    Submit a proof that deliberately omits the period slot.

  • Observation:
    The transaction reverts with a generic error, making it harder to diagnose the root cause without additional logging.

Mitigation Recommendation

  • Update require statements to include detailed error messages, e.g.:

    require(slot.exists, "Period slot not found in state proof");
Updates

Lead Judging Commences

0xnevi Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

[invalid] finding-error-can-be-more-explicit

Informational, non-acceptable severity given it has arguably no security impact

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.