iktok90-design/ai-smart-contract-auditor/signature-replay
Claude Code and agent skill by iktok90-design/ai-smart-contract-auditor
- community
Checking that the SKILL.md file is still in the repository.
Detect signature-replay, EIP-712 / EIP-2612 mistakes, malleable signatures, cross-chain replay, missing nonces. Activate on `ecrecover`, `permit`, meta-transactions, signed orders, signed approvals, EIP-712 domain construction, gasless transaction relayers.
Install
npx vskill@latest install iktok90-design/ai-smart-contract-auditor/signature-replaySKILL.md
Signature replay & EIP-712 detection
When this applies
ecrecoverand any signature verification pathpermit(EIP-2612, ERC-4494) implementations- Meta-tx / gasless flows (ERC-2771, EIP-3074 / EIP-7702 wrapping)
- Signed off-chain orders (0x, Seaport, custom)
- Signed governance votes
- Validator-set / bridge signature aggregation (see [[bridge-specialist]])
Detection patterns
Missing nonce (CRITICAL)
Missing chainId in domain (CRITICAL — cross-chain replay)
EIP-712 domain MUST include chainId. Without it, signing on Ethereum replays on Optimism/Arbitrum/etc.
Hardcoded chainId / _DOMAIN_SEPARATOR cached without fork-detect (HIGH)
Re-compute when block.chainid differs.
Signature malleability (HIGH)
ECDSA accepts both (r, s) and (r, n-s) for valid signatures. If you use the digest as a uniqueness key, attacker can flip s and replay. Enforce s ≤ secp256k1n/2 and v ∈ {27, 28}. Or use OpenZeppelin's ECDSA.tryRecover which already does this.
ecrecover returns address(0) on invalid sig — not reverted (HIGH)
Always require(signer != address(0)) after ecrecover, or use OZ ECDSA.
Replay across contracts (HIGH)
Missing address(this) / verifyingContract in the signed payload. Same admin sig usable on multiple deployments.
Front-running of permit (MEDIUM)
See [[mev-frontrunning]] §permit.
Approval-front-run via signed message (HIGH)
Off-chain signed orders where the maker can replay across fills if the order doesn't include salt + nonce + cancellation mechanism.
Permit2 confusion (HIGH)
Mixing Permit2's SignatureTransfer (one-shot) vs AllowanceTransfer (persistent). Read the contract's docs carefully.
Severity rubric
| Pattern | Severity | |
|---|---|---|
| Missing nonce in signed payload | Critical | |
| Missing chainId — cross-chain replay possible | Critical | |
ecrecover without signer != address(0) check | High | |
| Malleable signature accepted (no s-bound check) | High | |
| Cached DOMAIN_SEPARATOR without fork-aware re-compute | High | |
Signed payload omits verifyingContract | High | |
| Order salt missing, no cancellation mechanism | High | |
| Off-by-one chainId for L2 chains (e.g. Polygon = 137 not 1) | High | |
| Permit gas-grief on revert reverts in batch | Medium |
Remediation patterns
- Use OZ
EIP712base +ECDSA.recover— handles s-bound, malleability, zero-address. - Include in every signed payload:
chainId,verifyingContract,nonce,deadline, plus any operation-specific fields. - Re-derive
DOMAIN_SEPARATORlazily whenblock.chainid != cached_chainid. - Nonces: per-signer monotonic OR per-order salt + on-chain seen-bitmap.
- For ERC-1271 (contract signers), validate via
isValidSignature(bytes32, bytes)returning the magic value.
False-positive notes
- Single-use bound to a specific consumed-event flag isn't strictly replayable — but still flag if the bound is fragile.
- Pure off-chain signatures never submitted on-chain don't have replay risk on chain, but watch for accidental reuse.
Related
- [[access-control]]
- [[bridge-specialist]] — validator set signatures
- [[mev-frontrunning]]
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/signature-replay/SKILL.md
Popularity
- Repository stars
- 37
- Repository forks
- 5
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/iktok90-design/ai-smart-contract-auditor/signature-replay)