Code your first flash loan
summary
Explains how Aave’s flash loans actually work: the lendingPool sends funds to a flash loan receiver which must call executeOperation and return principal plus a precomputed fee; the protocol charges a fee that redirects to depositors. Shows a deployed mock flash-exchange repo that returns principal plus 18 basis points (9 bp to pool, 9 bp to caller) and a deliberately exploitable demo gated by a whitelist. Notes the $350k, 14‑second exploit that made flash loans mainstream and why reentrancy guards are applied across contracts.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 5:30Code
- 8:58Flash Loan
- 12:07Flash Exchange
- 15:52Discourse Channel
- 16:55Flash Loans
- 24:37Demo
related talks
14mEfficient Foundation Models for the Agentic Era
23mUsing LLM Generated Formal Specs to Prevent the Next DeFi Hack
15mCompliance-by-Construction for Credit Apps
45mThe State and Future of MEV
09mStellar's Future A Technical Perspective
45mAvoid common LLM pitfalls
01h 00mFrom LLM Theory to Practical Agentic Implementations
31mBuild your First AI Agent With Flow Foundation
