defi-amm-security
CommunityHarden Solidity AMMs against common exploits
AuthorMaelwalser
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides a focused security checklist and hardened implementation patterns to identify and mitigate common vulnerabilities in Solidity automated market maker (AMM) contracts, liquidity pools, and swap flows so developers and auditors can avoid catastrophic financial loss.
Core Features & Use Cases
- Reentrancy & CEI: Encourages CEI ordering and use of nonReentrant guards to prevent withdraw/swap reentrancy exploits.
- Safe accounting & donation attacks: Recommends measuring actual received tokens and tracking internal asset accounting instead of relying on raw balanceOf(address(this)).
- Oracle and slippage defenses: Advises TWAP-based oracle reads, caller-provided amountOutMin and deadlines for swaps, and overflow-safe reserve math using mulDiv.
- Admin controls & testing: Covers ownership transfer patterns, pause/emergency gates, and recommends static analysis, fuzzing, and testing tools for audits.
Quick Start
Use the defi-amm-security checklist to audit withdraw, deposit, and swap entrypoints in MyAMM.sol for reentrancy, donation attacks, oracle manipulation, slippage protections, and reserve math safety.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: defi-amm-security Download link: https://github.com/Maelwalser/claude-config/archive/main.zip#defi-amm-security Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.