There's a secret world that
you probably aren't aware of.
Traders borrowing millions to
invest with no collateral.
But there's a catch.
If they can't return the money within
10 seconds, they could lose everything.
So who are these traders?
Well, they call themselves
and they aren't making your average order book trade.
This is lending on steroids, and it
could jeopardize the entire crypto ecosystem.
So welcome to the dangerous
dog eat dog world of flash trading.
Speaking of only 10 seconds to take advantage, you
can take advantage of signing up for my Patreon
linked in the description that you'll have access to
my full portfolio and buy alerts that have landed
me up more than 100%.
The year is 2018, and Marble, a now defunct smart
contract bank, introduces us to something radically new
flash loans, a type of loan that could never exist
in our traditional lending system, so foreign to what
we're used to in traditional finance that even today
there isn't a good analogy for it.
The term comes from this book by Michael Lewis.
Flash Boys is about the wild world of
high frequency trading in the US.
With flash loans for the very first time,
you could borrow as much as you wanted
to with zero collateral as long as the
funds were returned within the same transaction.
Suddenly, people were borrowing millions.
Yes, millions of dollars owning, guess how much? Nothing.
This meant anyone could be a crypto whale.
However, the idea didn't get much traction at
first because the market was turning bearish at
the time and hype was starting to slow
down in the crypto markets and the world
started forgetting about flash loans altogether.
And that is until Aave jumped in the scene in 2020.
So you might be asking yourself, why would
anyone borrow millions of dollars within one transaction
if you give it back within 10 seconds?
And the answer is profit.
Help us understand how much could
be made with flash loans.
I chatted with software engineer Andreas.
- I mainly used them for arbitrage trading.
There was no use case for flash loans back then because
people didn't know what to do with those flash loans.
If we want to see a more clear example, that one
we know that a flash loan happening here for sure.
- So that one guy made $300,000 in 10 seconds?
- Yeah, that one guy.
- There are three main reasons you might
choose to take out a flash loan.
The most popular is to take
advantage of an arbitrage opportunity.
So picture this,
Your mom trades apples for $2 and
your dad trades apples for $3.
They're competitors.
If this remains constant,
you just discovered an infinite money glitch by buying
from your mom and selling to your dad.
Yes, this is going to mess up your inheritance,
but you can make money in the short run.
This is known as an arbitrage opportunity.
Eventually your dad says, hey,
I have way too many apples.
So he lowers the price, hoping to
get rid of that extra supply.
This means the opportunity has essentially closed,
and the range between the three and
two dollar apples narrows with each transaction.
This is what makes markets efficient.
There's actually an interesting book on this
called 'A Random Walk Down Wall Street'
that explores these concepts even further.
Here's how arbitrage could work in crypto.
If Solana is $160 on Kucoin,
but it's only $157 on Coinbase.
Depending on fees, you could profit
off of this price discrepancy.
Flash loans allow you to do
this without ever actually buying Solana.
[Max] So basically this person found that there was a
big price discrepancy between Uniswap and SushiSwap.
[Andreas] Yeah, among three different pairs
and exploited that difference to get the profits.
- Now a second reason for flash
loans is called collateral swaps.
This would make a traditional banker's head spin.
In order to borrow an asset, traditionally
you need collateral something worth money that
shows that you're good for the loan.
In regular finance, collateral is fairly fixed.
If you borrow $100,000 against your home,
you can't easily decide tomorrow that you'd
rather switch and instead borrow against the
pile of gold that you conveniently own instead.
You would have to do all sorts of paperwork.
You need to go through a refinancing
process and get the proper approvals.
With a flash loan, you're actually able to
swap out your collateral on a loan for
another asset within a single ten second transaction.
And then we have self liquidation.
If it's found that the collateral you put up for
a loan is no longer worth enough to keep that
loan, you will be liquidated, losing all of your money.
With a flash loan, you can actually borrow
money for free, plus transaction fees, and then
liquidate yourself and repay your own loan, a
concept that is confusing because it goes against
everything we know about traditional finance.
It's like having your cake and eating it too,
borrowing money for free to trade, or to pay
back your own loan to save yourself.
It doesn't seem real or legal,
for that matter, but it is.
Now, even though there's no collateral,
there are still risks of your
transaction not going through successfully.
So remember that analogy where the mom and
dad are trading apples for whatever reason?
Well, arbitrage opportunities don't last forever.
That's because once someone takes advantage of
an opportunity, it gets closed off.
A bot may notice your transaction in queue for
an opportunity and bid a higher transaction gas fee,
taking that transaction right out of your hands.
Now another problem is
So let's say you find an arbitrage opportunity or
an asset has a price mismatch of 10%.
You buy it for $100 and you aim to sell it for $110.
You need to consider slippage,
supply and demand.
As you sell your asset, you
are supplying it into an exchange.
This increase in supply may lead
the assets price to drop.
Lower if demand doesn't keep up
at that same $110 price.
This is mostly an issue on large trades.
Finally,
In Aave's case, they take a 0.09% fee.
Not too shabby, considering that you're
leveraging potentially millions of dollars.
So if you borrow $1 million to buy from one
exchange and sell it off on another, you could be
looking at a five digit profit while only losing out
on a $900 fee, plus some additional transaction fees.
That's where you can potentially lose some money.
So if borrowing millions without any collateral and
having free rein to send funds from a
smart contract to pretty much anywhere on the
same network sounds like a recipe for disaster.
You'd only kind of be right.
So if you understand basic computer programming, you're
probably ready to execute a flash loan.
But at what point does the ten second probably ready to execute a flash loan.
But at what point does the ten second
loan become Nicolas Cage's Gone in 60 Seconds?
Well, take a look at the cruel fate of PancakeBunny.
On May 19, a hacker made off with about
$45 million in a flash loan exploit, tanking the
price of Bunny tokens by 96% from $220 down
to around $10 within a single day.
Weeks later, it still couldn't manage to break $15.
And that wasn't the end for Bunny Finance, because
on July 16, the company's new Polygon blockchain fork,
PolyBunny, got hit with yet another flash loan
attack, minting $2.1 million worth of PolyBunny tokens,
tanking that token from around $10 to below $2.
Some people think that PancakeBunny knew about
this exploit and it was an inside job.
But whether it was or not, here's how it was done.
First, the hacker borrowed more than 700 million
in BNB from seven Pancake Bunny lending pools
and around 3 million in Tether.
They used this to manipulate the price of BNB using
a bug in PancakeBunny's BNB-USD liquidity pool.
This allowed them to mint
almost 7 million Bunny tokens.
The hacker then dumped these tokens for about two 4
million BNB, causing the price of Bunny to plummet.
After repaying the flash loans, the hacker was left
with over 100,000 BNB worth about $45 million.
The exploit here was a result of
a flaw in the PancakeBunny protocol.
Once the hacker knew how the protocol was determining prices,
all he had to do was manipulate the price of
each component to game the system and steal the money.
A Bunny that even Nicholas Cage couldn't put back in the box.
- Put the bunny back in the box.
Now another example is the attack on
Cream finance through a similar flash loan attack.
This was the third largest hack in DeFi history.
The breach involved several different tokens that took
advantage of a loophole in how automatic market
makers discover the price of an asset.
The various hacks did have one big benefit though.
The community did some digging and found that
the vulnerability in a lot of these attacks
was due to using centralized oracles.
Just one reason why many people have been rushing
to Chainlink over the past two years.
Without oracles, blockchains are basically stuck in
their own world without any idea of
what's happening outside of their own ecosystem,
making them ripe for exploitation.
The completely new technology of flash loans are causing profiteers
to take a look at old dApps to see if
they can go ahead and exploit their systems.
And this is where we're at now.
A new gold rush in crypto.
A pirate era of flash loans where anyone can
search for opportunities within smart contracts as long as
they can get out within 10 seconds.
So here's a question that I want to ask you.
Is it ethical to exploit code for profit?
[Andreas] Of course, this is the other side of flash loans
and I believe we should not put a
black label on those new financial products and
it's just what happens with every new technology.
To me, I don't see a major issue with flash loans.
Every system has their own individual quirks and
blockchains have the quirk of settling transactions in
batches because transactions are settled in batches.
This allows people to use the funds within
that transaction as long as they put everything
back where they found it before the transaction
settles and ultimately no one should be hurt.
Of course we don't want black hat actors to
steal from people or steal from exchanges, but it
seems with time systems will be built in order
to prevent the darker side of flash loans.
From here I'd like to thank today's sponsor iTrustCapital
iTrust allows you to place your
crypto in a Roth retirement account.
What this means is you can buy, sell and trade
crypto and pay zero capital gains on your wins.
This is amazing for traders.
With a Roth, you pay your tax upfront
when putting money into the
account and at retirement you pay no tax
once you start pulling out at age
59 and a half years old.
This is probably the most simple way
to save on all capital gains.
iTrust will be linked in the description of this video.
If you use that link to open an account,
you'll receive $100 in free Bitcoin just for joining.
Now next up I recommend you watch this video
covering other underground investment strategies.
Now I would like to thank you so much for watching
and I hope you have a profitable day!