Defi Amm Security
Security checklist and hardened patterns for Solidity AMM contracts, liquidity pools, and swap flows.
- CCM score
- 71 of 100
- skills.sh installs
- 10.5K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math
- Includes vulnerable and hardened Solidity examples using
nonReentrant,SafeERC20, TWAP reads, andFullMath.mulDiv - Enforces a checklist requiring
amountOutMinanddeadlineon swaps and measured deposits instead of rawbalanceOfshare math - Designed for auditing or writing Solidity AMM, liquidity pool, or swap code, with Slither, Echidna, and Foundry fuzzing steps
Install
$ npx -y skills add affaan-m/ecc --skill defi-amm-security -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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.
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Web3 & Crypto, Security
- First seen
- Jul 14, 2026
Questions
What does the defi-amm-security skill check for in Solidity AMM contracts?
It is a security checklist for Solidity AMM contracts, liquidity pools, and swap flows, covering reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math. It gives hardened code patterns to prefer over hand-rolled variants when auditing or writing this code.
How do I install the defi-amm-security skill?
Run npx -y skills add affaan-m/ecc --skill defi-amm-security -y in your project to install it. Once installed, the agent can review your Solidity AMM, liquidity pool, and swap code against the checklist.
Who is the defi-amm-security skill for?
It is for developers writing or auditing Solidity AMM or liquidity-pool contracts, swap, deposit, withdraw, mint, or burn flows that hold token balances, and DeFi admin functions. It is listed in the Web3 and Crypto category on Claude Marketplaces.
Where does defi-amm-security rank in the Web3 and Crypto category?
It ranks in the top 50 on the Web3 and Crypto category page. Other skills in that category include solana-dev, binance-agentic-wallet, okx-dex-market, gmgn-market, and gmgn-token, while this one focuses on Solidity AMM security review.
More from affaan-m/ecc
All 257- Ecc Tools Cost Audit10.4K
- Unified Notifications Ops10.4K
- Messages Ops10.4K
- Hookify Rules10.4K
- Evm Token Decimals10.4K
- Gateguard10.1K
- Frontend Design Direction9.9K
- Fastapi Patterns9.4K
- Hermes Imports9.3K
- Blender Motion State Inspection9.3K
- Vite Patterns9.2K
- Agent Architecture Audit9.1K
- Error Handling9.1K
- Windows Desktop E2e9.1K
- Redis Patterns9.1K
- Mysql Patterns9.1K
- Production Audit9K
- Make Interfaces Feel Better9K
- Motion Patterns9K
- Motion Foundations9K
- Motion Advanced8.9K
- Ecc Guide8.9K
- Mle Workflow8.9K
- Django Celery8.8K
Similar to Defi Amm Security
More Web3 & Cryptosolidity-securitywshobson/agents16.1K installsPractical Solidity security patterns and audit checklists that prevent reentrancy, overflow, and access control flaws.
smart-contract-vulnerabilitiesyaklang/hack-skills3.9K installsSecurity audit playbook for Solidity and EVM contracts covering reentrancy, access control, delegatecall, and signature replay.
llm-trading-agent-securityaffaan-m/ecc10.8K installsLayered security patterns that keep an LLM trading agent with wallet authority from losing funds.
ethereummindrally/skills783 installsExpert Solidity guidance covering security patterns, OpenZeppelin integration, gas optimization, and Hardhat testing workflows.
soliditymindrally/skills763 installsSecurity-focused Solidity guidance that covers gas optimization, testing tooling, and React wallet integration.
web3-testingwshobson/agents11.5K installsComprehensive smart contract testing guide covering Hardhat and Foundry, with unit tests, fuzzing, and mainnet forking.