/auditsentry:dos-vectorsfrom auditsentry
Detects DoS vectors in Solidity: unbounded loops, push-payment chokepoints, gas griefing, block-stuffing, revert-on-receive blocking. Activates on loops over user arrays, batch withdrawals, auctions.
Ships in auditsentry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
claim() / distribute() functionsn users / n tokensfunction 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).
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.
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.
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).
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]].)
On rollups, anyone can force-include a tx via L1 — affects "exclusive sequencer" assumptions in auctions.
| 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 |
require(arr.length <= MAX).distribute(start, end).call not transfer — forward all gas, then check return.address(this).balance equality — track expected balance separately.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dos, denial-of-service, smart-contracts, solidity, ethereum, security-audit
npx claudepluginhub iktok90-design/ai-smart-contract-auditor --plugin auditsentry45 skills in this plugin
/access-controlDetect missing or incorrect access control — missing modifiers, wrong role checks, privileged function exposure, public initializers, and role-escalation paths. Activate on any function that mutates state, transfers funds, mints tokens, sets admin parameters, upgrades implementations, or pauses/unpauses./approval-issuesDetect ERC-20 approval pitfalls — approve race (front-run), missing safeApprove, infinite approvals, approval-without-revoke, Permit2 misuse, max-approval to untrusted contracts. Activate on `approve`, `safeApprove`, `permit`, `forceApprove`, `Permit2`, `IERC20.allowance`./caching-and-incrementalAlways-on meta-skill — cache audit results per file by content hash so unchanged files aren't re-analyzed on subsequent runs. Activate on every /audit, /quick-scan, /audit-changes invocation.Other plugins' skills for the same job