4.6.4Decentralised Finance (DeFi)
Module 4.6 · Lesson 4 of 5Cryptoassets in Depth

Decentralised Finance (DeFi): An Introduction

Who protects your money when there's no company to call?

You’ll be able to split a DeFi yield by who pays it and find the fall that closes a DeFi loan.

  • 4 min
  • 4 quick questions
  • Up to 40 XP
  • 9 animated cards
  • A worked example, step by step
  • A common myth, busted

Part of Module 4.6 · Cryptoassets in Depth · Level 4 · Professional Practice · See the full course

What is Decentralised finance (DeFi)?

Financial services run by code on a blockchain, with no company holding your coins. People trade, lend and borrow from their own self-custody wallet. There's no deposit insurance, and a hack often can't be undone.

Decentralised finance (DeFi) · Glossary

Key takeaway

  • DeFi puts code in place of a company you'd trust.
  • Code can't steal your coins, but one fault lets others take them, with no undo.
Lesson notesRead the whole lesson as text

The lesson in full

  1. On 23 March 2022, attackers took almost US$620 million in crypto from the Ronin bridge. A bridge is software that moves coins between two blockchains. The US Treasury called it the largest crypto theft up to then. You'll see what DeFi is and where its main risks sit. No bank could reverse the theft. So Lee wonders who should have protected the coins.

  2. Decentralised finance (DeFi) is financial services run by code on a blockchain, with no company holding your coins. People trade, lend and borrow there without a bank or a broker. You connect your own self-custody wallet, and the code does the rest. IOSCO, the world group of market regulators, studied DeFi in March 2022. It noted that the votes that change the code can still be “in the hands of a few”.

  3. A smart contract is a program on a blockchain that runs by itself when its conditions are met. A vending machine works the same way. Put in the right coins, press a button, and it hands you a drink. No shop assistant is needed. Its code is usually public, so anyone can read it. That includes attackers looking for a fault.

  4. A liquidity pool is coins locked in a smart contract that others trade against, paying fees. A common design keeps the two piles multiplied together the same.

    1. The pool holds 100 coins and 100,000 stablecoins: 100 × 100,000 = 10,000,000.
    2. You buy 10 coins, so 90 remain.
    3. It now needs 10,000,000 ÷ 90 ≈ 111,111 stablecoins.
    4. You pay about 11,111, or 1,111 a coin.

    That's 11% above 1,000 a coin, before fees: market impact, from Module 4.5.

  5. In DeFi lending, you lock US$1,500 of ether and borrow US$1,000 of stablecoins. The code allows a loan of at most 80% of the deposit's value.

    1. Lowest deposit allowed: 1,000 ÷ 0.80 = US$1,250.
    2. Fall to that point: 1,500 − 1,250 = US$250.
    3. 250 ÷ 1,500 × 100 ≈ 16.7%.

    Then others can buy your deposit at a discount to repay the loan. Unlike a margin call from Module 2.2, the code gives no warning.

  6. In Module 4.1, a hypothesis named who is on the other side. Ask the same of a DeFi yield: who pays it? Traders pay fees to a pool. Borrowers pay interest. Or the project prints new tokens as rewards. The first two are payments from real people for a real service. The third is paid in a token whose value depends on buyers. So split any yield into these three parts first.

  7. Like a vending machine with a broken lock, code can have a fault. Then someone can empty a pool. A price feed, the outside data a contract reads, can be wrong, or changed by an attacker. Then loans close at a false price. IOSCO's report warns that hacks can mean “the loss of funds, often with no recourse”. Recourse means a way to get the money back. DeFi rules vary by country and change often.

  8. Common mistake

    Myth: “Earn far more than a savings account, with the same safety.” Truth: there's no deposit insurance, and no bank stands behind it. The yield pays for real risks: faulty code, hacks and reward tokens that fall. The first scam warning sign in Module 1.7 was a high return with little risk. In DeFi, a high yield tells you the risk is high. It never tells you the money is safe.

  9. Key takeaway

    DeFi puts code in place of a company you'd trust. Code can't steal your coins, but one fault lets others take them, with no undo. Before your next session, write “My DeFi rule” in your Safety and readiness file. Make it three questions for any offer. Who pays the yield? Which code must I trust? What does a 20% fall do to my deposit? Or write “no DeFi”.

Quick check

  1. A pool holds 50 coins and 200,000 stablecoins, and keeps the two piles multiplied together the same. You buy 10 coins. About how much do you pay, before fees?
    1. About 50,000 stablecoins
    2. About 40,000 stablecoins
    3. About 33,000 stablecoins
    50 × 200,000 = 10,000,000. With 40 coins left, the pool needs 10,000,000 ÷ 40 = 250,000. You pay 250,000 − 200,000 = 50,000, or 5,000 a coin, not 4,000.
  2. A DeFi app offers 40% a year on stablecoins, paid in its own new token. Fees and loans explain only about 3% of it. What does the lesson’s rule say to do?
    1. Skip it, since most of the yield is printed tokens
    2. Take it, since stablecoins can’t lose value
    3. Take it, since the code is public for all to read
    Ask who pays you. Fees and interest are real payments. The rest is new tokens, whose value depends on buyers, so the 40% is mostly a promise.
  3. Max moves his savings into a DeFi pool. He says it’s like a savings account, only with a higher rate. What does he risk that a bank saver doesn’t?
    1. Losing some or all of it, with no insurance
    2. Only a slightly lower rate than promised
    3. Paying a little more tax on the interest
    DeFi has no deposit insurance and no bank behind it. A code fault or a hack can drain a pool, often with no recourse.
  4. Your DeFi loan nears the point where its code lets others buy your deposit. How is this different from a broker’s margin call?
    1. No warning comes before your deposit is sold
    2. The code waits a day for you to add money
    3. Your deposit is sold only after you say yes
    A margin call is a warning to add money or close trades. A DeFi loan’s code acts as soon as the deposit falls to the limit, often at a discount.

Words in this lesson