Crypto — Intermediate
What Is DeFi? Decentralised Finance, Explained
DeFi replaces banks and brokers with software running on public blockchains. Understanding it means understanding how lending, trading and earning can happen without a company in the middle — and what can go wrong.
Key concepts in this guide
- What DeFi is and how it differs from traditional finance
- Smart contracts: the engine of DeFi
- Decentralised exchanges (DEXs) and automated market makers (AMMs)
- Lending protocols and how over-collateralisation works
- Yield farming and liquidity pools
- The real risks: smart-contract exploits, liquidation, and rug pulls
The basic idea
Traditional financial services — opening an account, lending money, trading assets — require a company to operate them. DeFi replaces those companies with smart contracts: programs that run on public blockchains and execute automatically when their conditions are met.
Because the contract code is public and runs on a decentralised network, no single entity controls it. Users interact directly from their own wallets. There is no account sign-up, no identity check in most cases, and no permission needed from anyone.
Decentralised exchanges (DEXs)
A DEX lets you swap one token for another directly from your wallet. Most use an automated market maker (AMM) — a formula that prices tokens based on the ratio of each held in a pool. Traders pay a small fee on every swap; that fee goes to the people who supplied the tokens in the pool.
Lending protocols
DeFi lending protocols let users borrow against crypto collateral without a credit check. Because the protocol cannot enforce repayment through courts, borrowing is always over-collateralised — you must lock up more value than you borrow. If your collateral falls below a threshold, a liquidation bot sells it automatically to cover the debt.
Lenders deposit tokens and earn interest paid by borrowers. Rates are set algorithmically by supply and demand, not by a bank.
Liquidity pools and yield farming
A liquidity pool is a pair of tokens locked in a DEX contract. Liquidity providers earn trading fees but take on impermanent loss if the token ratio in the pool drifts from their deposit ratio. Yield farming means moving capital between protocols to maximise the return, sometimes earning additional governance tokens on top of fees.
Risks that headlines skip
- Smart-contract exploits. A bug in a contract can be drained in seconds. Billions of dollars have been stolen this way. "Audited" reduces but does not eliminate this risk.
- Rug pulls. Project developers drain a liquidity pool or treasury and disappear. Anonymous teams with no locked liquidity are the highest-risk case.
- Liquidation cascades. During sharp drops, collateral liquidations can amplify the move, wiping out leveraged positions faster than expected.
- Oracle manipulation. DeFi protocols rely on price feeds from oracles; a manipulated feed can trigger unwarranted liquidations or allow theft.
Headline APYs in DeFi protocols are often temporary and carry all of the above risks. Evaluate what generates the yield before chasing the number.
Further reading
- Smart contract — the code that powers every DeFi protocol
- Automated market maker — how DEX pricing works
- Liquidity pool — what you provide and what you earn
- Total value locked (TVL) — the main size metric for DeFi protocols
Educational content only. Not financial advice. DeFi carries significant financial and technical risks. Never deposit funds you cannot afford to lose.