Common DeFi Exploits Overview
Re-entrancy, flash loan abuse, oracle manipulation, and access control bugs are frequent attack vectors. You will learn what they are and how to avoid exposure.
Who Is This For?
- Non-devs who want to recognize risky protocols
- Builders seeking a checklist of common pitfalls
Learning Objectives
- Describe major exploit categories
- Identify red flags in protocol design
- Choose mitigations like audits and oracles
Key Exploit Types
🔍 Exploit Encyclopedia
Re-Entrancy
CriticalAn attacker repeatedly calls a function before it finishes updating, draining funds in a loop.
Imagine a bank teller handing you cash from your account, but before they update your balance, you walk back to the window and withdraw again — and again. The teller keeps giving you money because their records still show the original balance. That's re-entrancy.
• Checks-Effects-Interactions pattern
• Re-entrancy guards (mutex locks)
• Pull-over-push payment patterns
Use protocols with audited code that follows checks-effects-interactions. Check if the audit report specifically tested for re-entrancy.
📚 Real Exploit Case Studies
🏛️The DAO Hack (2016)
$60MThe original DeFi exploit. Re-entrancy in "splitDAO" function drained 3.6M ETH.
Lesson: Always update state before making external calls.
How to Stay Safer
🔍 Protocol Risk Scanner
Evaluate a protocol before depositing:
🔮 Oracle Architecture Comparison
Chainlink / Pyth
Manipulation: Very HardAggregates price data from multiple independent node operators.
• Decentralized
• Flash loan resistant
• Industry standard
• May lag during volatility
• Limited pair coverage
Gold standard for price feeds.
Due Diligence Steps
✅ Pre-Deposit Checklist
Common Mistakes
🛡️ Golden Rule: DeFi is open-source finance built on code, and code has bugs. Ask: Who audited it? What oracle does it use? Who controls the admin keys? If you cannot answer these, you are gambling, not investing.
Knowledge Check
What is a re-entrancy attack?
Why are flash loans useful for attackers?
How to reduce oracle manipulation risk?
What makes upgradeable contracts risky?
Most important audit check?