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

Empty require() Statement

Summary

In ScrvusdVerifierV2 contract function _extractPeriodFromProof there are require() statement without reason string.

contracts/scrvusd/verifiers/ScrvusdVerifierV2.sol#L74

require(slot.exists);

Vulnerability Details

When the require(slot.exists); do not pass - will trigger revert
In functions without reason string.
verifyPeriodByStateRoot contracts/scrvusd/verifiers/ScrvusdVerifierV2.sol#L43
verifyPeriodByBlockHash contracts/scrvusd/verifiers/ScrvusdVerifierV2.sol#L26

Impact

This will lead to hard to detect reverts in 2 external functions in the cases when require(slot.exists); check do not pass.

Tools Used

Manual review

Recommendations

I recommend adding a descriptive reason string just like in the other revert() statements.
This will improve maintainability of the code and also provide more context when the revert happens.

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.