数据与研究

defi-attack-patterns

yaklang/hack-skills

DeFi attack pattern playbook. Use when analyzing flash loan attacks, price oracle manipulation, MEV sandwich attacks, governance exploits, bridge vulnerabilities, and token standard edge cases in decentralized finance protocols.

  • 3618 次安装
  • 2600 星标
  • 收录于

安装命令

npx skills add https://github.com/yaklang/hack-skills --skill defi-attack-patterns

SKILL.md

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.