erc4337-account-abstraction

Solid

Detect ERC-4337 account-abstraction bugs — validateUserOp storage-rule violations, paymaster postOp DoS, session-key scope bypasses, signature aggregation issues, EIP-7702 delegation risks. Activate on `validateUserOp`, `validatePaymasterUserOp`, `postOp`, `UserOperation`, `EntryPoint`, `IAccount`, `IPaymaster`, session-key modules, ERC-7579 modules, EIP-7702 authorization payloads.

AI & Automation 38 stars 5 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# ERC-4337 / Account Abstraction detection ## When this applies - Smart-wallet implementations (SimpleAccount, Safe-AA, Kernel, Biconomy, Light Account, custom) - Paymaster contracts (verifying, deposit, token-paying, sponsorship) - Module systems (ERC-7579, ERC-6900) and session-key managers - Bundler / mempool-side relayer logic (rare in app code, but watch for) - EIP-7702 delegated EOAs ## Detection patterns ### `validateUserOp` storage-rule violation (HIGH) ERC-4337 §6 forbids `SLOAD` on storage slots outside the wallet's own contract during validation. Bundlers reject non-compliant UserOps. Beyond compliance, accessing external state during validate is a *banner attack surface* (e.g. reading from an attacker-controlled contract). ```solidity function validateUserOp(...) external returns (uint256) { uint256 x = IExternal(0xabc).read(); // ← violates storage rules + leaks attack surface ... } ``` ### Missing `msg.sender == entryPoint()` check (CRITICAL) ```solidity function validateUserOp(...) external returns (uint256) { // ← anyone can call directly, bypass bundler entirely } ``` ### Paymaster `postOp` revert risk (HIGH) ```solidity function postOp(PostOpMode mode, bytes calldata ctx, uint256 actualGasCost) external { require(...); // ← if this reverts in postOp, bundler is griefed; reputation system penalizes the paymaster } ``` `postOp` should be revert-free. Use try/catch or never revert. ### Paymaster oracle manipulation for token-paying (H...

Details

Author
iktok90-design
Repository
iktok90-design/ai-smart-contract-auditor
Created
1 weeks ago
Last Updated
2 days ago
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category