dos-gas-limit

Detect Denial-of-Service vulnerabilities from block gas limit exhaustion in Solidity smart contracts.

1|1|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/Apegurus/solidity-argus --skill dos-gas-limit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dos-gas-limit
Source: https://github.com/Apegurus/solidity-argus/tree/main/skills/vulnerability-patterns/dos-gas-limit
Command: npx skills add https://github.com/Apegurus/solidity-argus --skill dos-gas-limit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses Denial-of-Service (DoS) vulnerabilities where contract operations can fail due to exceeding the block gas limit, often caused by unbounded loops or time-sensitive logic exploited by attackers.

Core Features & Use Cases

  • Unbounded Iteration Detection: Identifies loops that iterate over dynamic arrays or mappings that can grow indefinitely.
  • Time-Sensitive Logic Analysis: Flags functions where block stuffing by attackers can delay transaction inclusion, causing failures.
  • Use Case: Protects against scenarios where a payment distribution function, designed to send rewards to many recipients, becomes unusable when the recipient list grows too large, causing all transactions to revert.

Quick Start

Analyze the provided Solidity code for potential DoS vulnerabilities related to gas limits.

Frequently Asked Questions about dos-gas-limit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect DoS vulnerabilities caused by block gas limit exhaustion in Solidity smart contracts?

To prevent gas limit exhaustion in Solidity smart contracts, you must detect unbounded loops iterating over dynamic data structures and time-sensitive functions susceptible to block stuffing. Analyze loop conditions, data structure growth, transaction batching support, and attacker incentives.

What causes a Denial of Service vulnerability in smart contracts due to gas limits?

A Denial of Service vulnerability due to gas limits occurs when contract operations fail from exceeding the block gas limit. This is typically caused by unbounded loops iterating over dynamic arrays or time-sensitive logic exploited by attackers to delay transaction inclusion.

How do I secure payment distribution functions from block stuffing attacks in Solidity?

To secure payment distribution functions from block stuffing attacks, analyze time-sensitive functions where transaction inclusion can be delayed. Ensure transaction batching support is implemented to prevent scenarios where large recipient lists cause all transactions to revert.

Why does my Solidity loop fail when the dynamic array grows too large?

Your Solidity loop fails because unbounded iteration over a dynamic array exceeds the block gas limit as the data structure grows indefinitely. When operations like payment distribution scale beyond gas limits, all transactions revert, causing a Denial of Service.

Can I analyze Solidity mappings for unbounded iteration and gas limit risks?

Yes, you can analyze Solidity mappings and dynamic arrays for unbounded iteration risks. The analysis flags loops that can grow indefinitely and identifies whether transaction batching support is needed to prevent block gas limit exhaustion.