Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Dos Vectors

ASecurity

Detect denial-of-service vectors — unbounded loops, gas griefing, push-payment chokepoints, block-stuffing exposure, revert-on-receive blocking. Activate on loops over user-controlled arrays, batch withdrawals, push-style payouts, queues, auctions with "highest-bidder" refunds, large airdrops.

36 stars
0 votes
0 copies
0 views
Added 10/4/2026
blockchain

Security Analysis

A100/100

Scanned 10/4/2026

$npx -y skills add iktok90-design/ai-smart-contract-auditor --skill dos-vectors --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dos Vectors?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Dos Vectors
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iktok90-design-dos-vectors/badge)](https://www.skillsdirectory.com/skills/iktok90-design-dos-vectors)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: dos-vectors
description: Detect denial-of-service vectors — unbounded loops, gas griefing, push-payment chokepoints, block-stuffing exposure, revert-on-receive blocking. Activate on loops over user-controlled arrays, batch withdrawals, push-style payouts, queues, auctions with "highest-bidder" refunds, large airdrops.
---

# DoS vector detection

## When this applies

- Loops iterating over user-supplied or unbounded arrays
- Push-style payment patterns (contract pushes value to N recipients)
- Auctions that refund the previous highest bidder via direct transfer
- Mass `claim()` / `distribute()` functions
- Queues / stacks of withdrawals
- Functions whose gas cost scales with `n` users / `n` tokens
- L2 forced inclusion mechanics

## Detection patterns

### Unbounded loop over user-controlled array (CRITICAL-HIGH)
```solidity
function distribute() external {
    for (uint i; i < holders.length; ++i) {
        payable(holders[i]).transfer(rewards[i]);   // ← gas grows; eventually un-callable
    }
}
```
Worse if attacker can grow `holders` (e.g. anyone can register).

### Push-payment with revert-on-receive (HIGH)
```solidity
function refundPreviousBidder() internal {
    payable(highBidder).transfer(highBid);   // ← attacker bids from contract that reverts on receive → freezes auction
}
```
Use pull-payments: store credits, let users withdraw.

### `.transfer` (2300 gas) blocks smart-wallet receivers (MEDIUM-HIGH)
Smart wallets (Gnosis Safe, Argent) have fallback functions that need >2300 gas. Their users can't receive — effectively DoS for them.

### Gas griefing via large calldata (HIGH on relayers)
Relayer pays gas; user provides bloated calldata to grief. Cap calldata length or charge per-byte.

### `external` reentrant fee-loop DoS (HIGH)
Withdrawals from each strategy in a vault — if any strategy reverts, the entire withdraw fails. Use try/catch per strategy.

### Block-stuffing exposure (MEDIUM)
Auction ending exactly at `block.number == N` lets an attacker fill the block to prevent your bid. Use deadline windows + sniping protection (extend on late bid).

### Underflow-revert DoS on legacy 0.7.x code (MEDIUM)
Unchecked subtraction in Solidity ≥0.8 reverts on underflow — function permanently broken if state lands in that range.

### `selfdestruct` to force ether on a contract that asserts `address(this).balance == X` (HIGH)
Anyone can `selfdestruct` to your contract and break a balance-equality check. Don't rely on `address(this).balance` equality. *(Note EIP-6780 changed selfdestruct semantics — see [[selfdestruct-eip6780]].)*

### Forced inclusion on Arbitrum / Optimism (LOW-MEDIUM)
On rollups, anyone can force-include a tx via L1 — affects "exclusive sequencer" assumptions in auctions.

## Severity rubric

| Pattern | Severity |
|---|---|
| Unbounded loop attacker can grow → permanent function failure | **Critical** |
| Push-payment to attacker-controlled `receive()` blocks core flow | **High** |
| Per-strategy revert blocks entire vault withdraw | **High** |
| Smart-wallet receivers can't get `.transfer` payouts | **Medium-High** |
| Auction block-stuffing | **Medium** |
| Balance-equality reliance | **High** |
| Force-include L2 sequencer assumption | **Medium** |
| Calldata gas-grief on relayer | **Medium** |
| Bounded-but-large loop costing >block gas | **Medium** |

## Remediation patterns

- **Pull over push** — credit balances, users withdraw.
- **Per-iteration isolation** — try/catch around per-element work in batch ops.
- **Batch caps** — `require(arr.length <= MAX)`.
- **Pagination** — `distribute(start, end)`.
- **Use `call` not `transfer`** — forward all gas, then check return.
- **Don't rely on `address(this).balance` equality** — track expected balance separately.
- **Auction extensions** — extend deadline on late bid to defeat block-stuffing.

## False-positive notes

- Loops over a *contract-controlled* small bounded array (e.g. fixed 3 strategies) are fine — note the bound.
- Internal admin functions where DoS only hurts the admin → Info.

## Related

- [[unchecked-calls]]
- [[selfdestruct-eip6780]]
- [[reentrancy]]

Attribution

iktok90-designiktok90-design
View sourceSee grades on GitHubMore from iktok90-design →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Nft Standards

Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.

458250 votes

Nft Standards

Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.

401990 votes

vyper-compiler

Vyper smart contract compiler internals. Use when working on the Vyper compiler codebase — compilation pipeline, Venom IR, semantic analysis, code generation, testing, or contributing. Triggers on vyper compiler development, Venom passes, AST/semantics changes, codegen work, or test writing.

51840 votes

Flash Loan Simulator

Simulate flash loan arbitrage strategies and profitability across DeFi protocols. Use when performing crypto analysis. Trigger with phrases like "analyze crypto", "check blockchain", or "monitor market".

27190 votes

On Chain Analytics

Perform on-chain analysis including whale tracking, token flows, and network activity. Use when performing crypto analysis. Trigger with phrases like "analyze crypto", "check blockchain", or "monitor market".

27190 votes
View all in blockchain →