Skip to content
affaan-m avatar

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
View on GitHub

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, and FullMath.mulDiv
  • Enforces a checklist requiring amountOutMin and deadline on swaps and measured deposits instead of raw balanceOf share 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 -y

Installs 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

Similar to Defi Amm Security

More Web3 & Crypto