defi-amm-security

Audit Solidity AMM contracts against reentrancy, donation, and oracle manipulation risks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the security vulnerabilities in Solidity AMM contracts, liquidity pools, and swap flows, ensuring robust protection against common threats.

Core Features & Use Cases

  • Security Checklist: Comprehensive guidelines for identifying and mitigating vulnerabilities in AMM contracts.
  • Reentrancy Prevention: Techniques to prevent reentrancy attacks and enforce correct execution order.
  • Admin Control: Strategies for implementing secure admin controls and emergency pause mechanisms.
  • Use Case: When auditing or implementing Solidity-based AMM contracts, this Skill provides the necessary checks and best practices to ensure contract security.

Quick Start

Run the security checklist for your Solidity AMM contract to identify potential vulnerabilities and implement necessary defenses.

Frequently Asked Questions about defi-amm-security

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

FAQPage Schema
How do I prevent reentrancy attacks in Solidity AMM contracts?

To prevent reentrancy attacks in Solidity AMM contracts, apply a targeted security checklist enforcing correct execution order and robust checks-effects-interactions patterns. This ensures liquidity pools and swap flows execute safely without malicious recursive calls.

What is a donation attack on a liquidity pool and how do I mitigate it?

A donation attack on a liquidity pool manipulates asset ratios by artificially inflating balances. Mitigate this vulnerability using a comprehensive AMM security checklist that validates token deposits and enforces strict pool integrity checks during swap operations.

How do I secure admin controls and implement an emergency pause for DeFi AMM contracts?

Secure admin controls in DeFi AMM contracts by following checklist guidelines for access restriction and implementing emergency pause mechanisms. This protects liquidity pools by allowing rapid response to exploit attempts or unexpected market anomalies.

How do I audit Solidity smart contracts for oracle manipulation vulnerabilities?

Audit Solidity smart contracts for oracle manipulation by applying a security checklist that verifies price feed integrity and validates external data sources. This prevents attackers from exploiting AMM swap flows through artificially inflated or deflated asset valuations.

Can I use this security checklist for any DeFi automated market maker implementation?

Yes, you can use this checklist for any DeFi automated market maker implementation built in Solidity. It broadly covers liquidity pool integrity, admin controls, and swap flow protections, making it applicable to various AMM architectures.