defi-amm-security

defi amm security

affaan-m 232k ↓ 3.6k MIT updated 25d ago
Claude Code
View source ↗

What it does

  • 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
  • Reentrancy-exposed entrypoints use nonReentrant
  • CEI ordering is respected
  • Share math does not depend on raw balanceOf(address(this))

Requirements & configuration

  • 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
  • require(balances[msg.sender] >= amount);
  • token.transfer(msg.sender, amount);
  • import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

defi amm security

Source

Repository: https://github.com/affaan-m/everything-claude-code

defi-amm-security FAQ

What does the defi-amm-security skill do?

Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math. Writing or auditing a Solidity AMM or liquidity-pool contract Implementing swap, deposit, withdraw, mint, or burn flows that hold token balances

What does defi-amm-security require?

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 require(balances[msg.sender] >= amount); token.transfer(msg.sender, amount); import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

How do I install defi-amm-security?

Run: npx -y skills add https://github.com/affaan-m/everything-claude-code --skill defi-amm-security --agent claude-code — the source lives at github.com/affaan-m/everything-claude-code.

Maintain defi-amm-security?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[defi-amm-security on getagentictools](https://getagentictools.com/skills/affaan-m-everything-claude-code-defi-amm-security?ref=badge)
npx agentictools info skills/affaan-m-everything-claude-code-defi-amm-security

The second line is the CLI lookup for this page — handy in READMEs and docs.