Skip to main content

What Is Decentralized Finance (DeFi)? How It Works, What It Does and Where It Breaks

DeFi explained: how smart contracts replace intermediaries for lending, stablecoins and trading, how much is locked in it, and the risks.

· By ZIPMEX · 20 min read

Decentralized finance (DeFi) is a set of financial services, such as lending, borrowing, trading and stablecoins, that run as smart contracts on public blockchains instead of through banks or brokers. Ethereum's own documentation calls it "an open and global financial system built for the internet age". Anyone with an internet connection and a crypto wallet can use these services. They run around the clock, users usually keep custody of their own funds, and the code and transactions can be inspected by anyone. The trade-off is that no institution stands behind a failed contract, a run on a stablecoin or a forced liquidation.

On 25 October 2026, DefiLlama put the total value locked (TVL) in DeFi protocols at about $89.2 billion. That is roughly half of the series high of about $177.5 billion, recorded on 9 November 2021.

How DeFi differs from traditional finance

In traditional, or centralized, finance (CeFi), an intermediary keeps the ledger, holds the customer's money and decides who gets served. A bank takes deposits, lends them out and keeps the spread between the interest it pays and the interest it charges. When something goes wrong, there is a legal entity to hold responsible. Many jurisdictions also have deposit insurance, a lender of last resort and courts.

DeFi swaps the intermediary for code. Ethereum.org lists the main differences:

  • Open access: "DeFi products open up financial services to anyone with an internet connection." You don't need an account approval.
  • Always on: "the markets are always open."
  • Self-custody: "You hold your money." Most protocols never take custody of user funds in the way a bank does.
  • Transparency: "anyone can look at a product's data and inspect how the system works."
  • Pseudonymity: activity is tied to wallet addresses, not to names.

Open code is not the same as no one being in charge. A Bank for International Settlements (BIS) study by Sirio Aramonte, Wenqian Huang and Andreas Schrimpf (BIS Quarterly Review, 6 December 2021) concluded that "full decentralisation in DeFi is illusory". Governance tokens and blockchain consensus tend to concentrate power in large token holders and validators.

The engine: smart contracts

A smart contract is a program stored on a blockchain. Ethereum.org says such programs "are guaranteed to execute according to the rules defined by its code, which cannot be changed once created". It compares them to a vending machine, where "specific inputs guarantee predetermined outputs". Nick Szabo coined the term in a 1994 essay.

In DeFi, smart contracts hold the deposits, calculate interest, check collateral and settle trades. Because a deployed contract cannot simply be edited, a bug becomes part of the product. That is why security audits and the protocol's track record matter more than marketing.

What you can do with DeFi

Lend and borrow

Lending protocols pool deposits from suppliers, who earn interest, and lend them to borrowers, who must post collateral. In practice, the collateral usually has to be worth more than the loan.

Aave shows how the rules are enforced. Its help centre describes a "health factor" that "measures the safety of a borrow position". The health factor is total collateral value multiplied by the weighted liquidation threshold, divided by total debt. Aave's own example: $10,000 of ETH with an 80% threshold against $6,000 borrowed gives a health factor of about 1.33. "A liquidation in the Aave Protocol occurs when a borrower's health factor falls below 1." Third-party liquidators then repay some or all of the debt and receive the borrower's collateral plus a bonus. No loan officer is involved and there is no grace period.

Use stablecoins

Stablecoins are tokens whose "value stays pegged to an another asset, usually a popular currency like dollars" (ethereum.org, typo in the original). They let DeFi users hold a dollar-like unit without leaving the blockchain, and they serve as the main unit for borrowing and trading. They are also a weak point: the BIS authors warn that stablecoins are prone to runs, and that fire sales of reserve assets could spread stress to banks and companies.

Regulation has caught up with dollar stablecoins in the United States. The GENIUS Act (S. 1582) was signed into law on 18 July 2025, after the House passed it 308–122 on 17 July and the Senate 68–30 in June. It limits issuance of payment stablecoins for US persons to permitted issuers and requires reserves of at least one dollar for every stablecoin dollar issued.

Swap tokens

A decentralised exchange lets users swap one token for another directly from their wallet, with smart contracts settling the trade instead of a broker. Ethereum.org notes that some also offer limit orders and margin trading.

Flash loans

Flash loans need no collateral because "the loan is taken out and paid back within the same transaction" (ethereum.org). If the loan is not repaid, the whole transaction is reversed. Developers use them for arbitrage and refinancing. Attackers have also used them to borrow large sums for price manipulation.

Insurance

Decentralised insurance "aims to make insurance cheaper, faster to pay out, and more transparent" (ethereum.org). Coverage is usually limited to specific events such as a smart-contract failure.

How close is a loan to liquidation?

Enter your collateral, its liquidation threshold, what you borrowed and a price fall to see the health factor that Aave's formula gives.

Worked examples (health factor = collateral value after the price fall × liquidation threshold ÷ total debt (liquidation when below 1))
Collateral value before any price fallWeighted liquidation threshold of the collateralTotal debt borrowedFall in the collateral priceHealth factor
10,000 $80 %6,000 $0 %1.33
10,000 $80 %6,000 $20 %1.07
10,000 $80 %6,000 $30 %0.93
  • All values are your own inputs; the defaults reproduce Aave's example of $10,000 collateral, an 80% threshold and $6,000 borrowed, which gives about 1.33.
  • Aave says a liquidation occurs when the health factor falls below 1. A result under 1 means the position could be liquidated on these inputs.

This applies only the health-factor arithmetic to your inputs. It leaves out interest building up on the debt, changes in the debt asset's price, the liquidation bonus and how much of the debt a liquidator repays, and it is not investment advice.

Where the money is

DefiLlama figures for 25 October 2026:

MeasureValue
Total DeFi TVL, all chainsabout $89.2 billion
TVL on Ethereumabout $48.9 billion (around 55% of the total)
Series highabout $177.5 billion (9 November 2021)

Ethereum still holds more than half of the value locked in DeFi. DefiLlama's chain list also shows Base, BSC, Solana, Tron and Bitcoin each at roughly $4–6 billion. TVL moves with token prices, so a falling market shrinks it even when no one withdraws.

The risks

  • Smart-contract bugs and exploits. Code that cannot be changed can still be attacked. Chainalysis counted over $3.4 billion stolen across crypto from January to early December 2025. It said DeFi hack losses "remained suppressed" while TVL recovered, and pointed to better protocol security and attackers moving to personal wallets and centralized services.
  • Liquidation. A sharp fall in collateral prices can trigger automatic liquidation, often at a penalty.
  • Stablecoin and run risk. A stablecoin that loses its peg can pull down everything built on it.
  • Leverage and interconnection. The BIS study flags leverage, liquidity mismatches, links between protocols and the "lack of shock absorbers such as banks".
  • Governance concentration. Large token holders can change protocol rules.
  • Weak consumer protection. Lost keys, wrong addresses and approvals of malicious contracts usually cannot be reversed.

How regulators approach DeFi

The global securities regulators' body IOSCO published its final policy recommendations for DeFi on 19 December 2023: nine recommendations in six areas. They cover understanding DeFi structures, common regulatory outcomes, identifying and managing risks, disclosure, enforcement and cross-border cooperation. The recommendations are addressed to regulators and follow a "same activity, same risk, same regulation" approach. The BIS authors argue along the same lines ("same risks, same rules"). They also note that DeFi's identifiable governance groups give authorities a way to apply that approach.

Bottom line

DeFi replaces intermediaries with code. That brings open access, constant availability and transparency. It also brings a new set of risks: bugs, automatic liquidations, stablecoin runs and power concentrated in a few governance holders. In the BIS authors' 2021 assessment, DeFi's promise of reducing the rents collected by intermediaries "seems yet to be realised".

Limitations: TVL figures are DefiLlama snapshots for 25 October 2026 and change daily. Regulatory details differ by jurisdiction. This article is not investment advice.

Updated on Oct 25, 2026