Decentralised finance, DeFi, refers to financial services built on public blockchains that operate without banks, brokers, or any centralised intermediary. Instead of a company holding your funds and processing your transactions, smart contracts, self-executing code on the blockchain, do the work automatically. Anyone with an internet connection and a compatible wallet can access them.
DeFi grew dramatically on Ethereum starting around 2020 and has since spread across multiple chains. It offers genuine new capabilities: lending, borrowing, trading, and earning yield without needing an account at a financial institution. But it also introduces new categories of risk that require careful understanding before committing real money.
Decentralised exchanges (DEXs) and AMMs
A decentralised exchange (DEX) allows you to swap one token for another directly from your wallet, without depositing funds with a centralised platform. There is no order book and no company holding your assets.
Most DEXs use an automated market maker (AMM) model instead of traditional buy/sell order matching. In an AMM:
- Liquidity is provided by users who deposit token pairs (e.g. ETH and USDC) into a liquidity pool, a smart contract.
- When a trader swaps ETH for USDC, they interact with the pool, not another person’s order.
- The pool’s price adjusts automatically based on the ratio of tokens in it (the constant product formula).
- Liquidity providers earn a share of the trading fees generated by the pool.
Uniswap (Ethereum) and Raydium (Solana) are among the largest and most established DEXs by volume. Others include Curve (optimised for stablecoins) and Balancer (multi-asset pools).
Lending and borrowing: Aave and Compound
DeFi lending protocols allow you to deposit crypto to earn interest, or borrow against collateral you provide, all without a credit check.
- Aave, one of the largest DeFi lending protocols, operating on Ethereum and several other chains. Depositors earn a variable interest rate; borrowers provide over-collateralised crypto and pay interest.
- Compound, a similar protocol with a history as one of DeFi’s early pillars. Both Aave and Compound pioneered the model of algorithmically set interest rates that adjust based on utilisation of the pool.
Over-collateralisation is key to how DeFi lending works: you must deposit more value than you borrow (e.g. deposit $150 of ETH to borrow $100 of USDC). If your collateral value falls too far, the protocol automatically liquidates part of your position. This protects lenders but means borrowers must actively manage collateral ratios.
| Protocol | Primary chain | Notable feature |
|---|---|---|
| Aave | Ethereum + L2s | Flash loans, wide asset support |
| Compound | Ethereum | Early DeFi pioneer, governance token |
| Curve | Ethereum | Optimised for stable-to-stable swaps |
| Uniswap | Ethereum + L2s | Largest DEX by volume |
Stablecoins in DeFi
Stablecoins, tokens pegged to a stable value, usually the US dollar, are the lifeblood of DeFi. They allow users to hold and transact value without cryptocurrency price volatility. Common types:
- Fiat-backed (e.g. USDC, USDT), backed by real dollar reserves held by a centralised company. Stable and liquid, but with counterparty risk.
- Crypto-backed (e.g. DAI, LUSD), over-collateralised by crypto, managed by smart contracts. More decentralised but more complex.
- Algorithmic stablecoins, attempt to maintain peg through code rather than collateral. This model has produced major failures (notably TerraUSD/LUNA in 2022), demonstrating the serious risks involved.
Yield in DeFi
DeFi users can earn returns in several ways:
- Lending interest, deposit assets on Aave or Compound and earn variable interest.
- Liquidity provision, provide tokens to a DEX pool and earn a share of trading fees.
- Yield farming, stake LP tokens or other assets in protocols that distribute their own governance tokens as additional rewards. Yields can be high but often involve accepting new tokens with uncertain value.
- Liquid staking derivatives, tokens like stETH (Lido’s staked ETH) can be used in DeFi protocols while the underlying ETH is staked, earning staking rewards plus DeFi yield simultaneously.
Impermanent loss explained
If you provide liquidity to an AMM pool, you are exposed to impermanent loss (IL): a reduction in value relative to simply holding the two tokens outside the pool. It occurs because AMMs rebalance the ratio of tokens as prices change.
For example: you deposit equal values of ETH and USDC. If ETH’s price rises significantly, the pool automatically sells ETH and buys USDC to stay balanced. You end up with less ETH than you started with. If you had just held the ETH instead, you’d be better off. Trading fees may or may not compensate for this loss depending on volume. IL becomes “permanent” only when you withdraw from the pool.
Risks in DeFi
DeFi is genuinely powerful, but the risk profile is meaningfully different from holding crypto on a centralised exchange.
Smart-contract risk: A bug in the code can be exploited, leading to total loss of funds in a pool or protocol. Even audited protocols have been drained. The code is the contract; there is no recourse.
Rug pulls and scams: New DeFi projects can launch with the intention of draining liquidity and disappearing. Red flags include anonymous teams, unaudited contracts, and liquidity that can be removed without time-locks. Stick to established protocols with long track records.
Oracle manipulation: DeFi protocols rely on price feeds (oracles) to value collateral. Manipulated oracles have been used in flash loan attacks to exploit protocols.
Liquidation risk: Borrowers who don’t monitor collateral ratios can be liquidated, potentially losing a significant portion of deposited assets quickly.
UI/front-end risk: Even if a smart contract is secure, the website you use to interact with it can be compromised. Use official bookmarks and verify contract addresses independently.
Frequently asked questions
Do I need to know how to code to use DeFi? No. Most DeFi protocols have user interfaces that are not much more complex than a standard financial app. You do need a compatible non-custodial wallet (MetaMask for Ethereum DeFi) and some understanding of gas fees and transaction confirmation.
Is DeFi regulated? Regulation of DeFi varies widely by jurisdiction and is evolving. Regulators in many countries have begun examining DeFi protocols, stablecoins, and yield products. The decentralised nature of many protocols makes enforcement challenging, but participants should be aware of their local legal obligations, particularly regarding taxes.
What is a flash loan? A flash loan is a loan that is borrowed and repaid within a single blockchain transaction. Because it is atomically settled, no collateral is required. They are a legitimate DeFi primitive used for arbitrage, collateral swaps, and liquidations, but have also been weaponised in attacks against other protocols.
This article is for informational purposes only and is not financial advice. See our editorial policy.