Mystery Box

First Flight #25
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

L-1 Reducing Gas Costs Through Centralized Access Control Checks

Summary

Repeated access control checks in functions can lead to increased gas consumption.

Vulnerability Details

In the current implementation, multiple functions perform repetitive access control checks to verify if the caller is the contract owner. This redundancy can unnecessarily increase gas costs for each transaction.

Impact

Increased Gas Costs: Each function call incurs additional gas fees due to repeated checks, making the contract less economical for users.

Tools Used

Manual review

Recommendations

Introduce a single access control check using an onlyOwner modifier to reduce redundancy and simplify the code.

Updates

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!