yaklang avatar

Defi Attack Patterns

This is a comprehensive reference for understanding how DeFi protocols get exploited, covering everything from flash loan mechanics to MEV extraction and bridge vulnerabilities. Load it when you're auditing smart contracts, analyzing post-mortems of exploits, or building protocol defenses. The real value is in the specifics: it breaks down the exact atomicity constraints that make flash loans work, explains why spot price oracles are dangerous compared to TWAP, and walks through attack sequences like vault inflation and JIT liquidity. It won't write exploit code for you, but it will make you think like an attacker when reviewing lending protocols or AMM integrations.

skills.sh installs
3.8K
GitHub stars
2.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add yaklang/hack-skills --skill defi-attack-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

SKILL: DeFi Attack Patterns — Expert Attack Playbook

AI LOAD INSTRUCTION: Expert DeFi exploitation techniques. Covers flash loan mechanics, oracle manipulation (spot vs TWAP), MEV extraction (sandwich, JIT, liquidation), precision loss attacks, governance exploits, bridge vulnerabilities, and token standard pitfalls. Base models often miss the single-transaction atomicity constraint of flash loans and the distinction between spot price and TWAP manipulation.

0. RELATED ROUTING


1. FLASH LOAN ATTACKS

1.1 Mechanism

Flash loans provide uncollateralized borrowing within a single transaction. The entire borrow → use → repay cycle must complete atomically; if repayment fails, the transaction reverts as if nothing happened.

Sponsors

Details

Repository
github.com/yaklang/hack-skills
Categories
Backend & APIs, Finance & Trading, Web3 & Blockchain
First seen
Jun 3, 2026

More from yaklang/hack-skills

All 102
1dotnet avatarcoordinate-componentsdotnet/skillsShare state between components that don't have a direct parent-child parameter relationship, using cascading values, scoped services with change events, or Casc3.7Kskills.sh installs
2yaklang avatarprototype-pollution-advancedyaklang/hack-skillsAdvanced prototype pollution playbook — server-side RCE, client-side gadgets, filter bypasses, and detection techniques. Companion to ../prototype-pollution/ fo3.7Kskills.sh installs
3tradermonty avatarearnings-calendartradermonty/claude-trading-skillsThis skill retrieves upcoming earnings announcements for US stocks using the Financial Modeling Prep (FMP) API. Use this when the user requests earnings calenda3.7Kskills.sh installs
4tradermonty avatareconomic-calendar-fetchertradermonty/claude-trading-skillsFetch upcoming economic events and data releases using FMP API. Retrieve scheduled central bank decisions, employment reports, inflation data, GDP releases, and3.7Kskills.sh installs
5giuseppe-trisciuoglio avatarsonarqube-mcpgiuseppe-trisciuoglio/developer-kitProvides SonarQube and SonarCloud integration patterns via the Model Context Protocol (MCP) server. Enables quality gate monitoring, issue discovery and triagin3.7Kskills.sh installs
6tradermonty avatarsector-analysttradermonty/claude-trading-skillsThis skill should be used when analyzing sector rotation patterns and market cycle positioning. It fetches sector uptrend data from CSV (no API key required) an3.7Kskills.sh installs