defi-amm-security

Audit Solidity AMM contracts for reentrancy, oracle manipulation, and admin controls.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/thangvawn/agent_financial --skill defi-amm-security-thangvawn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defi-amm-security
Source: https://github.com/thangvawn/agent_financial/tree/main/.cursor/skills/defi-amm-security
Command: npx skills add https://github.com/thangvawn/agent_financial --skill defi-amm-security-thangvawn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openzeppelin, uniswap-v3-core, fullmath, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a security checklist for Solidity AMM contracts, addressing common vulnerabilities and ensuring robust implementation.

Core Features & Use Cases

  • Security Checklist: Offers a detailed checklist for auditing and securing AMM contracts.
  • Reentrancy Guard: Enforces contract safety against reentrancy attacks.
  • Share Math Protection: Prevents manipulation of share math through direct balance queries.
  • Use Case: When developing or auditing a DeFi AMM contract, use this Skill to ensure that common security issues are addressed.

Quick Start

Run the defi-amm-security skill to audit the security of your AMM contract and ensure compliance with best practices.

Frequently Asked Questions about defi-amm-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a Solidity AMM contract for reentrancy and donation attacks?

To audit a Solidity AMM contract, run a security checklist that checks for reentrancy, CEI ordering, and donation attacks. It enforces ReentrancyGuard and prevents share math manipulation through direct balance queries.

What security checks are needed for DeFi AMM smart contracts?

Security checks for DeFi AMM contracts include verifying CEI ordering, oracle manipulation via TWAP, slippage protection, admin controls, and integer math issues. The audit requires OpenZeppelin's SafeERC20 for safe token transfers.

Does this DeFi security audit work with Uniswap V3 core contracts?

Yes, the audit applies to contracts handling token balances and admin functions in DeFi protocols. It integrates with uniswap-v3-core and fullmath dependencies to validate oracle reads and integer math.

How do I prevent oracle manipulation and slippage in AMM contracts?

Prevent oracle manipulation and slippage in AMM contracts by using Time-Weighted Average Price (TWAP) for oracle reads and enforcing strict slippage checks. The audit checklist verifies these controls are correctly implemented.

What are the limitations of using a checklist for smart contract security audits?

Checklist-based smart contract audits are limited to known vulnerabilities like reentrancy, donation attacks, and integer math issues. They may not detect novel zero-day exploits or complex protocol-specific logic flaws in DeFi applications.