By the end of this you will understand what DeFi actually does, how a trade goes through with no company behind the counter, and why FTX could spend your money but a swap pool could not.
Walk into a bank and strip away the marble. It does four plain things: swaps one currency for another, lends money out, lets people borrow, and holds deposits.
Behind each of those desks sits a person. DeFi is what happens when you rebuild every desk as software and send all the people home.
Picture a vending machine on the exchange desk. It holds money, follows fixed rules, and serves anyone who walks up. It never calls in sick, never plays favorites, and cannot decide you look suspicious and say no.
That machine has a name. Code that holds funds and runs its own rules with no human in the loop is a smart contract. The whole of DeFi is a row of these machines where tellers used to sit.
You step up to the exchange machine to swap one token for another. It quotes you a price instantly. No trader, no manager, no order desk in sight.
So where did that price come from?
Here is the exchange machine up close. It is a shared pot holding two tokens at once, say dollars and ETH. Traders do not trade against another person, they trade against the pot.
Tap each station on the board to follow 100 USDC through a single swap.
A machine that swaps tokens is useless if the pot is empty. So who funds it? Not a bank. Regular people deposit their own tokens into the pot and, in return, earn a small cut of the fee on every swap that passes through.
People who do this are called liquidity providers. The exchange's capital is crowdsourced. The folks who filled the pot are the reason your swap had anything to trade against.
This is the difference that matters. On a custodial exchange like FTX, your coins sat in the company's own account. You held a claim, the company held the pen. In 2022 it spent the backing and the balances on every screen became worthless.
On Uniswap there is no company account holding your money. Coins move from your wallet, through the contract, back to your wallet, in one motion. There is nothing for a company to freeze or spend, because no company is holding anything.
It is tempting to think the friendly website you click on is the exchange. It is not. The website is a window. The actual machine, the contract holding the pot, lives on the chain, and so does your wallet.
Here is the quiet superpower. Because each desk is just a machine that anyone can call, the output of one can flow straight into the next. Swap on one machine, then hand the result to a lending machine, all in one motion.
Software desks that snap together like this are called composable. It is also why a flaw in one machine can ripple into others, a thread we pull on later.
Your friend has been listening and is fully converted. He insists his cousin, who has never touched crypto, should buy her very first coin on a DEX, because tellers are obsolete now.
So that is DeFi. Every bank desk rebuilt as a machine that holds money, follows fixed rules, and answers to no manager. A swap runs start to finish with no teller, and no company ever holds your coins.
But notice the people who filled the pot. Every swap quietly paid them a fee. They are earning while they sleep.
Which raises the real question: where does that yield actually come from, and when are YOU the one paying it?