Decentralized finance, usually shortened to DeFi, is the name for financial services built as software on public blockchains. Instead of a bank or brokerage matching trades, holding deposits or approving loans, programs called smart contracts do those jobs automatically, and anyone with a crypto wallet can use them without opening an account.
Supporters see DeFi as a more open financial system. Critics point to the hacks, collapses and scams that have cost users billions of dollars. Both views contain truth, and the useful thing for a reader is to understand the mechanics clearly enough to judge the risks for yourself.
This guide explains how the main building blocks work, walks through the math of a loan being liquidated, and lays out the risks in detail. It is educational, not a recommendation to use any protocol or buy any token. DeFi sits at the riskiest end of an already risky asset class: losses can be total and are usually irreversible, scams are widespread, and US regulation is still evolving. It is not a place for money you may need soon, and never for your emergency fund.
How DeFi differs from traditional finance
In traditional finance, a regulated company stands in the middle of almost every transaction. It holds your money, checks your identity, enforces rules and, if something goes wrong, there is a customer service desk, a complaints process and often a regulator or insurance scheme.
In DeFi:
- Code replaces the middleman. A smart contract, which is a program deployed on a blockchain such as Ethereum, holds funds and follows its rules automatically. Every computer running the network executes the same code and reaches the same result.
- You keep custody until you deposit. You connect a self-custody wallet and approve transactions directly. Once you deposit into a contract, your funds are controlled by that contract’s code.
- There is usually no one to call. If you send funds to the wrong place or a contract is exploited, there is often no recovery.
- Everything is public. Transactions and contract code are generally visible on the blockchain, though reading and understanding the code takes expertise most users do not have.
The main building blocks
Stablecoins
Stablecoins are tokens designed to track the value of another asset, most often the US dollar. They are the main unit of account in DeFi. They come in a few broad designs:
- Reserve-backed: a company holds cash and short-term assets meant to back each token. You rely on that company’s reserves, disclosures and redemption process.
- Crypto-collateralized: backed by other crypto deposited in smart contracts, usually more than the value issued, to absorb price swings.
- Algorithmic: rely mainly on code and incentives rather than full collateral. Some well-known algorithmic designs have collapsed completely.
A stablecoin can lose its peg, meaning it trades below $1, sometimes far below. “Stable” describes the goal, not a guarantee.
Decentralized exchanges
A decentralized exchange (DEX) lets you swap one token for another directly from your wallet. Many use an automated market maker design: instead of an order book, a smart contract holds a pool of two tokens, and a formula sets the price based on the ratio of tokens in the pool. When you buy one token, its supply in the pool falls and its price rises.
Users called liquidity providers deposit pairs of tokens into these pools and receive a share of trading fees. They also take on a risk called impermanent loss: if the price of one token moves sharply relative to the other, the provider can end up worse off than if they had simply held the two tokens.
Lending and borrowing protocols
Lending protocols let users deposit crypto that others can borrow. Borrowers must post collateral, typically worth more than the loan. This is called overcollateralization. Interest rates for both sides usually adjust automatically based on supply and demand, so they are variable and can change quickly.
If the value of a borrower’s collateral falls too far, the protocol liquidates it: it sells some or all of the collateral to repay the loan, usually with a penalty to the borrower.
Governance tokens
Many protocols issue tokens that let holders vote on changes. In practice, voting power is often concentrated among founders, early investors and large holders, so “decentralized” governance can be less decentralized than it sounds.
Worked example: how a liquidation happens
The numbers below are illustrative and do not describe any specific protocol. Each protocol sets its own rules.
Suppose you deposit crypto worth $1,000 as collateral and borrow $500 in a dollar stablecoin. The protocol has a liquidation threshold of 80%, meaning your loan must stay at or below 80% of your collateral’s value.
Step 1: Starting position. Maximum loan allowed = $1,000 x 0.80 = $800. You borrowed $500, so you are safe for now.
Step 2: Find the liquidation price. Liquidation happens when collateral value x 0.80 falls below $500.
Collateral value at liquidation = $500 / 0.80 = $625.
Step 3: How big a price drop is that? ($1,000 - $625) / $1,000 = $375 / $1,000 = 37.5%.
So if the collateral’s price falls 37.5%, your position can be liquidated. In crypto, drops of that size have happened within days, sometimes within hours.
Step 4: The cost of liquidation. Suppose the protocol sells enough collateral to repay the $500 loan and charges a 10% liquidation penalty on the amount repaid. Collateral sold = $500 x 1.10 = $550. You keep the $500 you borrowed, but of your $625 in collateral, $550 is gone, leaving $75.
Compare: you started with $1,000 of collateral. You now have $500 in stablecoins plus $75 of collateral, $575 in total. Had you simply held the original asset, you would have $625. The liquidation penalty cost you the extra $50, on top of the price drop itself.
Step 5: Interest makes it worse. If borrowing interest accrues, your loan balance grows over time, which pushes the liquidation price higher even if the collateral price stays flat.
This is why borrowing against volatile collateral is one of the riskier activities in DeFi. Leverage turns a price drop into a forced sale.
The risks, in detail
Smart contract risk
If the code has a bug, attackers can exploit it, and the contract will still execute as written. Audits by security firms reduce this risk but do not eliminate it; audited contracts have been exploited.
Oracle risk
Smart contracts cannot see the outside world, so they rely on “oracles” to feed in prices. If an oracle is manipulated or fails, a protocol can liquidate users wrongly or let attackers drain funds.
Bridge risk
Bridges move tokens between blockchains, often by locking tokens on one chain and issuing representations on another. They hold large pools of funds and have been the target of some of the largest hacks in crypto history.
Rug pulls and outright fraud
Anyone can launch a token or protocol. Some teams build in hidden controls, attract deposits with high advertised yields, then withdraw everything. Anonymous teams, unverified code and pressure to deposit quickly are warning signs.
Variable and unsustainable yields
Advertised yields in DeFi are variable and can change from one block to the next. Very high yields are often paid in a protocol’s own token, which can fall in value faster than the yield accumulates. A yield figure is not a promise. If you cannot explain where the return comes from, treat it as a warning.
Your own mistakes
Approving a malicious contract, sending to the wrong address or using the wrong network can mean permanent loss. Our guide to storing crypto safely covers wallet approvals and common scams.
Regulation and taxes
Regulators in the US have taken action against some DeFi projects and are still developing rules for others. The rules may change what services are available to US users. Swaps, rewards and liquidations can also create tax obligations; see our crypto tax primer and consider a tax professional. The CFTC publishes consumer education on digital asset fraud that is worth reading.
A quick comparison
| Activity | What it involves | Key risks |
|---|---|---|
| Swapping on a DEX | Trading one token for another from your wallet | Price impact, fake tokens, malicious approvals, fees |
| Providing liquidity | Depositing token pairs into a pool for a share of fees | Impermanent loss, contract bugs, token collapse |
| Lending | Depositing tokens for others to borrow, earning variable interest | Contract bugs, protocol insolvency, oracle failures |
| Borrowing | Posting collateral to take a loan | Liquidation, rising interest, volatility |
| Holding stablecoins | Holding tokens designed to track a currency | Loss of peg, issuer or collateral failure |
Common mistakes
- Chasing the highest advertised yield without understanding its source.
- Borrowing close to the maximum allowed, leaving little room before liquidation.
- Treating an audit as a guarantee.
- Clicking links to “new” protocols from social media or direct messages.
- Leaving old token approvals active long after using a protocol.
- Using DeFi before the basics are in place: emergency savings, no high-interest debt, and a long-term plan for building a portfolio.
Key takeaways
- DeFi replaces financial intermediaries with smart contracts, which means no account to open and, usually, no one to call when things go wrong.
- Stablecoins, decentralized exchanges and lending protocols are the core building blocks, and each has its own failure modes.
- Borrowing against volatile collateral can trigger liquidation after a price drop, with penalties on top.
- Yields are variable, not promised, and very high yields often signal very high risk.
- Losses in DeFi can be total and irreversible, and US rules are still evolving.
Next steps
- Re-run the liquidation example with your own numbers to see how small a price drop can trigger it at different borrowing levels.
- If you hold any crypto in a self-custody wallet, review which contracts you have granted approvals to and revoke ones you no longer use.
- Read our guide to storing crypto safely before interacting with any protocol, and make sure anything you commit is money you could lose entirely.
This article is for general education only and is not financial, investment, tax or legal advice, or a recommendation to buy any cryptocurrency. Crypto assets are highly volatile and you can lose everything you put in. See our editorial policy and disclaimer. Spotted an error? Email hello@minetofive.com.
