economic-attack

Detects flash loan, oracle manipulation, and price manipulation vulnerabilities in Solidity smart contracts.

66|17|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/BitterSecurity/Vigilo --skill economic-attack-bittersecurity
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: economic-attack
Source: https://github.com/BitterSecurity/Vigilo/tree/main/packages/claude/skills/vulnerability-patterns/economic-attack
Command: npx skills add https://github.com/BitterSecurity/Vigilo --skill economic-attack-bittersecurity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Auditing DeFi protocols for economic attack vectors like flash loan exploits and oracle manipulation requires deep knowledge of subtle patterns that are easy to miss during manual code review. ## Core Features & Use Cases - Detection Patterns: Identifies six critical vulnerability classes including spot price dependency, oracle staleness, short TWAP windows, donation attacks, missing slippage protection, and flash loan governance. - Price Flow Map: Guides construction of a core artifact tracing how prices flow from sources through reading functions to critical decisions. - Search Query Reference: Provides ready-to-use grep patterns for locating vulnerable code such as getReserves, latestRoundData, and balanceOf(address(this)). - Use Case: While auditing a lending protocol, use this Skill to check whether borrow() relies on manipulable Uniswap reserves and whether Chainlink prices are validated for staleness. ## Quick Start Analyze this Solidity codebase for flash loan and oracle manipulation vulnerabilities using the economic attack detection patterns.

Frequently Asked Questions about economic-attack

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

FAQPage Schema
How do I detect flash loan vulnerabilities in Solidity contracts?▼

Flash loan vulnerability detection focuses on values that can be manipulated within a single transaction, such as DEX reserves from getReserves() or slot0(). Check whether these values feed critical decisions like liquidations or borrowing, and whether flash loaned capital could move them significantly.

What is a donation attack in DeFi smart contracts?▼

A donation attack inflates a vault's pricePerShare by sending tokens directly to the contract instead of depositing. When totalAssets() uses balanceOf(address(this)), an attacker can donate funds, distort share pricing, and steal subsequent depositors' funds through rounding.

How do I check for Chainlink oracle staleness in an audit?▼

Oracle staleness checks verify that latestRoundData() results include an updatedAt timestamp compared against a maximum staleness threshold. Code that reads the price without validating updatedAt can act on outdated prices during volatile markets, enabling unfair liquidations or undercollateralized borrows.

What TWAP window is safe against price manipulation?▼

A safe TWAP window is at least 30 minutes, with 1-4 hours recommended for high-value decisions. Windows under 10 minutes remain manipulable through multi-block attacks or validator collusion, so short observation periods like 60 seconds should be flagged.

When is this economic attack analysis not applicable?▼

This analysis targets DeFi protocols with price dependencies, swaps, oracles, and vaults. It is less relevant for contracts without economic value flows, such as simple token contracts or access-control-only systems, where other vulnerability categories apply.