What problem does it solve?
Solidity AMM and liquidity pool contracts are high-value targets for attackers, with common vulnerabilities like reentrancy, donation attacks, and oracle manipulation leading to catastrophic financial losses. This skill eliminates that risk by providing a vetted security checklist and hardened implementation patterns tailored specifically for DeFi AMM use cases.
Core Features & Use Cases
- Comprehensive Security Checklist: Covers all critical AMM vulnerability categories including reentrancy, CEI ordering, donation/inflation attacks, oracle manipulation, slippage protection, admin controls, and integer math errors.
- Hardened Code Patterns: Provides copy-safe Solidity implementation examples for secure deposit, withdraw, swap, and reserve math logic, eliminating the risk of hand-rolled vulnerability pitfalls.
- Use Case: Use this skill when writing, auditing, or reviewing any Solidity AMM, liquidity pool, or DeFi swap contract to catch critical flaws before mainnet deployment.
Quick Start
Use the defi-amm-security skill to review your Solidity AMM contract's withdraw function for reentrancy and CEI ordering vulnerabilities, and apply the provided hardened implementation pattern to fix any identified issues.