DeFi University
Skip to lesson

Exercise 10

Flash Loans and Advanced Primitives

About 14 min

Your task

You'll run a flash-loan arbitrage between two real-shaped pools, with the swap fees, price impact, flash fee and gas all counted. Then you'll try the same route at twenty times the size and watch it fail. By the end you can tell whether an arbitrage pays before anyone spends gas on it, and say exactly who is protected when it doesn't.

Time
25 to 30 minutes
You'll need
a calculator (or a spreadsheet)
Builds on
Lessons 7 and 10

Warm-up

Check yourself

A flash-loan transaction fails its repayment check. Who pays what?

Check yourself

Two pools differ in price by 2%. Which costs does an arbitrage between them have to cover before it makes money?

Members only

This course is for members.

The DeFi University membership on Skool opens all 31 courses here, plus the live calls and community. Private coaching clients have access too. Already a member? Sign in with your Skool email.