defi-attack-patterns

Analyze DeFi protocols for flash loans, oracle manipulation, MEV, and governance exploits.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/utsavthakur/agenticskills --skill defi-attack-patterns-utsavthakur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defi-attack-patterns
Source: https://github.com/utsavthakur/agenticskills/tree/main/defi-attack-patterns
Command: npx skills add https://github.com/utsavthakur/agenticskills --skill defi-attack-patterns-utsavthakur

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill unit provides a comprehensive analysis of DeFi attack patterns, helping users understand and mitigate vulnerabilities in decentralized finance protocols.

Core Features & Use Cases

  • Flash Loan Attacks: Analyze flash loan mechanics, price oracle manipulation, MEV extraction, and governance exploits.
  • Price Oracle Manipulation: Understand the differences between spot price and TWAP manipulation, and the risks associated with using AMM spot reserves as price oracles.
  • MEV (Maximal Extractable Value): Learn about sandwich attacks, JIT liquidity, and liquidation MEV, along with protection mechanisms.
  • Precision Loss Exploitation: Identify rounding errors in token calculations and first depositor/vault inflation attacks.
  • Governance Attacks: Explore flash loan governance, timelock bypass, and quorum manipulation.
  • Bridge Exploits: Analyze common bridge attack vectors and cross-chain message verification patterns.
  • Token Standard Edge Cases: Understand ERC-20 approval front-running, ERC-777 reentrancy, fee-on-transfer tokens, and rebasing tokens.
  • Defi Exploits Reference: Reference notable DeFi exploits and their primary vectors.

Quick Start

Analyze the attack patterns in the DeFi protocol 'MyProtocol' using the defi-attack-patterns skill.

Frequently Asked Questions about defi-attack-patterns

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

FAQPage Schema
How do I analyze flash loan attack patterns in DeFi protocols?

Analyzing DeFi protocols for attack patterns requires substantial expertise in smart contract analysis and blockchain security. It is suited for users conducting security audits and risk assessments who need to understand complex attack vectors like MEV extraction and oracle manipulation.

What are the differences between spot price and TWAP oracle manipulation in DeFi?

You can identify price oracle manipulation by analyzing the differences between spot price and TWAP manipulation, focusing on the risks of using AMM spot reserves as price oracles. This reveals vulnerabilities where protocols rely on easily manipulated instantaneous pricing.

How do flash loans enable governance attacks in DeFi protocols?

Common governance vulnerabilities include flash loan governance, timelock bypass, and quorum manipulation. Analyzing these DeFi attack patterns exposes how attackers exploit protocol voting mechanisms or emergency functions to execute unauthorized changes.

What token standard edge cases should I audit for in DeFi smart contracts?

Token standard edge cases in DeFi security include ERC-20 approval front-running, ERC-777 reentrancy, fee-on-transfer tokens, and rebasing tokens. Analyzing these vulnerabilities prevents precision loss exploitation and first depositor vault inflation attacks during token calculations.

How do I analyze cross-chain bridge exploits and message verification patterns?

Bridge exploits in cross-chain DeFi protocols involve analyzing common bridge attack vectors and cross-chain message verification patterns. This exposes vulnerabilities in message passing and asset locking mechanisms that allow attackers to forge messages or drain locked liquidity.

Do I need smart contract security expertise to analyze MEV extraction and DeFi attack patterns?

Analyzing DeFi protocols for attack patterns requires substantial expertise in smart contract analysis and blockchain security. It is suited for users conducting security audits and risk assessments who need to understand complex attack vectors like MEV extraction and oracle manipulation.