
Defi Amm Security
A practical security checklist that walks you through the standard AMM vulnerability surface: reentrancy guards, check-effects-interactions ordering, donation attacks from raw balanceOf calls, oracle manipulation via spot prices, and missing slippage protection. Each category shows a vulnerable snippet next to the hardened fix using OpenZeppelin or Uniswap libraries. If you're writing or auditing swap functions, LP deposits, or anything that tracks reserves, this gives you the pattern library and a final checklist to run through before deployment. The examples are concrete enough to paste and adapt. Includes audit tool commands for Slither, Echidna, and Foundry fuzzing at the end.
- skills.sh installs
- 3.5K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill defi-amm-security --agent claude-codeInstalls into .claude/skills of the current project.
Files
DeFi AMM Security
Critical vulnerability patterns and hardened implementations for Solidity AMM contracts, LP vaults, and swap functions.
When to Use
- Writing or auditing a Solidity AMM or liquidity-pool contract
- Implementing swap, deposit, withdraw, mint, or burn flows that hold token balances
- Reviewing any contract that uses
token.balanceOf(address(this))in share or reserve math - Adding fee setters, pausers, oracle updates, or other admin functions to a DeFi protocol
How It Works
Use this as a checklist-plus-pattern library. Review every user entrypoint against the categories below and prefer the hardened examples over hand-rolled variants.
Execution Safety
The shell commands in this skill are local audit examples. Run them only in a trusted checkout or disposable sandbox, and do not splice untrusted contract names, paths, RPC URLs, private keys, or user-supplied flags into shell commands. Ask before installing tools or running long fuzzing/static-analysis jobs that may consume significant local or paid resources.
Never include secrets, private keys, seed phrases, API tokens, or mainnet signing credentials in command examples, logs, or reports.
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Categories
- Security, Finance & Trading, Web3 & Blockchain
- First seen
- May 16, 2026
More from affaan-m/everything-claude-code
All 256- Ecc Tools Cost Audit3.5K
- Email Ops3.5K
- Hookify Rules3.5K
- Messages Ops3.5K
- Nodejs Keccak2563.5K
- Product Capability3.5K
- Research Ops3.5K
- Unified Notifications Ops3.5K
- Evm Token Decimals3.4K
- Gateguard3.1K
- Everything Claude Code2.7K
- Claude Api2.4K
- Hermes Imports2.3K
- Literature Review1.9K
- Fastapi Patterns1.8K
- Frontend Design1.8K
- Mysql Patterns1.8K
- Pubmed Database1.8K
- Windows Desktop E2e1.8K
- Agent Architecture Audit1.7K
- Agentic Os1.7K
- Angular Developer1.7K
- Cisco Ios Patterns1.7K
- Django Celery1.7K