Roadmap FinTech

Part 05 · Web3 and digital assets

DeFi protocolsبروتوكولات التمويل اللامركزي DeFi

Protocols that lend, swap, and pool tokens with smart contracts. Useful to understand, easy to confuse with a bank.

4 minute read

Share this:

Decentralised finance (التمويل اللامركزي), or DeFi, is financial functions like lending and swapping performed by software running on a shared ledger, with no company owning it and no employee approving your request.

It is not a bank branch without staff. It is open software performing financial functions, and the first thing to know is that lending here bears no resemblance to the lending you know.

Lending here is pawnbroking, not credit

Start with the part beginners find strangest. When a bank lends you 100,000 riyals, it studies your income and credit record and bets that you will repay. That is credit: a judgement about a person.

A lending protocol does not know who you are and cannot chase you. So it will only lend against collateral worth more than the loan. You deposit a thousand dollars of a token and borrow six or seven hundred. That rule is called over-collateralisation (الضمان الزائد).

It can look absurd: why deposit a thousand to take six hundred? Because the depositor does not want to sell what they deposited. Someone holding an asset they expect to rise, who needs cash now, borrows against it instead of selling it. That is closer to a pawnshop than to a personal loan.

Aave and Compound are the best-known protocols here.

Liquidation, with numbers

The most important thing a beginner must understand is what happens when the price falls. Say you deposited a thousand dollars of collateral, borrowed six hundred, and the protocol requires the loan to stay under eighty percent of the collateral.

If the collateral drops to seven hundred dollars, your six hundred loan is now about eighty-six percent of it, past the limit. Liquidation (التصفية) follows: the protocol sells your collateral automatically to repay the loan, and the liquidator takes a bonus out of the collateral value.

There is no phone call, no grace period, and no officer who understands your situation. The code executes the second the condition is met. Plenty of people in this field have lost their collateral while asleep during a sharp overnight drop.

Swapping without a matching buyer

The second major function is swapping. A traditional market needs a seller for every buyer. An automated market maker (صانع السوق الآلي) removes that need with a simple trick.

People deposit two tokens into a liquidity pool (مجمّع السيولة), say dollars and ether. A fixed mathematical formula then sets the price from the ratio between the two quantities. The more ether you buy out of the pool, the less of it remains and the higher its price goes automatically. No seller is needed, because you trade against the pool itself. Uniswap is the best-known implementation.

Liquidity providers earn a fee on every swap in return for putting their money in. But they carry a risk called impermanent loss (الخسارة غير الدائمة): when one token's price moves sharply, the formula rebalances the pool, and the provider ends up with less value than if they had simply held both tokens and done nothing. This is what surprises newcomers most.

Loading diagram…

The two core functions

Where the yield comes from

When you see a screen advertising an annual yield, ask where it comes from before anything else. There are only four sources.

First, real fees paid by users, which is the only sustainable one. Second, interest paid by borrowers, also real, and it moves with demand. Third, token incentives the project hands out to attract liquidity, which is a temporary subsidy that ends. Fourth, not a yield at all but higher risk wrapped in an attractive number.

The famous lesson here is Anchor on the Terra network, which offered close to twenty percent a year on a stablecoin deposit. The yield was not produced by enough underlying economic activity, and the whole project collapsed in May 2022. The rule the market took away: a yield far above what the market produces, with no understandable reason, is capital coming from inside the system, and it ends when new entrants stop arriving.

Risks that do not show in the price

This field adds failure modes banks do not have. A bug in a smart contract can empty a pool in minutes, and this has happened repeatedly since The DAO hack in 2016.

The oracle adds another: feed a protocol a corrupted price and it liquidates healthy positions. Governance adds a third: if a small group controls the votes that change the rules, the terms change under you while you are inside.

How decentralised is it really

The name itself deserves scrutiny. Many of these protocols keep an admin key (المفتاح الإداري) that lets a small team upgrade the contract, pause it, or change its parameters.

That has a useful face and a dangerous one. Useful, because it allows a vulnerability to be patched before a pool is drained. Dangerous, because whoever holds that key can in principle change the rules under you, which is a concentration of power resembling exactly what the protocol was supposed to remove.

The size of these protocols is measured by total value locked (القيمة المقفلة), or TVL, the sum of what users have deposited. It is useful for comparison and misleading on its own, because it rises when the prices of deposited tokens rise rather than necessarily when usage grows.

The front door is still regulated

Most individuals never touch a protocol directly. They use an app that wraps it. And when individuals are served in a regulated market, a licensed intermediary appears at the door however the execution happens inside a smart contract. Disclosure, a complaints route, and loss limits are not replaced by a "connect wallet" button.

In Saudi Arabia, do not let the word decentralised act as cover. If a product raises money against a return, intermediates an investment, or finances, the function is what gets classified and the competent authority decides. An open protocol on the internet is not a local permission under any reading.

New words here

DeFiالتمويل اللامركزي
Financial services delivered mainly through smart contracts and open protocols rather than a single institution's app alone.
Automated market maker (AMM)صانع السوق الآلي
A pool that prices swaps from a formula and reserves, instead of a traditional order book alone.
Liquidationالتصفية
Forced sale of collateral when a loan's value rules are breached.

The short version

  • Lending here is pawnbroking, not credit. The protocol cannot chase you, so you deposit a thousand to borrow six hundred.
  • Liquidation is automatic and instant. Collateral falling from 1,000 to 700 against a 600 loan triggers a forced sale with no call and no grace period.
  • An AMM prices from the ratio inside a pool, so no matching seller is needed. Liquidity providers earn fees and carry impermanent loss.
  • Yield has four sources only: user fees, borrower interest, temporary token incentives, or hidden risk. Anchor's twenty percent collapsed in May 2022.
  • Smart-contract bugs, corrupted oracle prices and captured governance are failure modes banks do not have, and none of them show in the price.

Check your understanding

Answer before reading the explanation. Getting one wrong here is worth more to you than a lucky guess.

  1. 1.A lending protocol demands you deposit a thousand dollars to borrow six hundred. Why would anyone do that?
  2. 2.Your collateral falls in price overnight and crosses the protocol's threshold. What happens?
  3. 3.An automated market maker prices a swap without any counterparty. What is the cost to whoever supplied the pool?
  4. 4.A screen offers twenty percent a year on a stablecoin deposit. What do you ask first?
  5. 5.How decentralised is a typical protocol, actually?

This is a learning guide built from field experience. It is not legal, regulatory or investment advice, and it does not replace qualified professional counsel. FinTech rules change quickly and vary by country, so check the primary source before you make a decision that matters.

Back to the roadmap

DeFi protocols | Roadmap FinTech