NEOAcademy
Lv 100
Crypto BasicsLesson 7 of 9

DeFi: finance without banks

Lending, swapping, and earning yield through code instead of institutions. The promise, the moving parts, and the very real risks.

8 min read4 quiz questions +1 +10 on pass

DeFi stands for "decentralized finance." It is the umbrella name for the financial products people have built on top of public blockchains: lending, borrowing, trading, earning yield, insurance, derivatives. The same activities a bank or broker offers, except there is no bank or broker. There is just code.

Anyone can use these protocols. You connect a wallet, click, sign, and the smart contract does its part. There is no signup, no KYC at the protocol level, no business hours. A teenager in Indonesia and a hedge fund in New York interact with exactly the same software.

What you can actually do

A handful of building blocks cover most of DeFi. Once you understand them, the hundreds of protocols you see are just remixes.

Swap one token for another

Decentralized exchanges (DEXes) like Uniswap let you trade tokens directly from your wallet, no account needed. Instead of an order book, most of them use an automated market maker (AMM): a pool of two tokens where the price is set by a simple formula based on the ratio of what is in the pool. Anyone can put their tokens into a pool and earn a share of the trading fees.

Lend and borrow

Protocols like Aave and Compound work like an automated pawn shop. Lenders deposit tokens into a pool and earn interest. Borrowers post collateral (usually more crypto than they want to borrow) and take loans. Interest rates float automatically based on how much of the pool is being borrowed. Everything is overcollateralized, so the protocol can liquidate the collateral if a borrower's position becomes risky.

Earn yield

Yield in DeFi can come from lots of places: trading fees from providing liquidity, interest from lending, rewards in a protocol's native token. Real yields tend to be modest (a few percent) and reflect actual usage. Implausible yields (50%+ on stablecoins, with no clear source) are usually a red flag.

How an AMM swap actually works

Trading on a DEX
You connect your walletno account neededPick tokens, see quoted priceset by pool ratiosSign the swap transactionwallet, not the siteContract swaps tokens atomicallyall-or-nothing

The swap is atomic: either both sides of the trade happen, or neither does. The protocol cannot take your tokens without giving you the other side. This guarantee is enforced by the chain itself, not by trusting the team behind the protocol.

Why people care

For users in well-served financial markets, a lot of DeFi looks like a slightly weirder version of products they already have. The interesting part is who else can use it.

  • A small business in a country with no functioning banking system can still borrow against crypto collateral.
  • A freelancer can earn yield on their savings without needing a brokerage account.
  • A startup can issue and trade its own token without going to the SEC.
  • A developer can take an existing protocol's code, fork it, and deploy a competitor in a weekend.
  • A user can hold their assets, prove what they own, and access financial tools, all without a bank ever being involved.

The risks are real

DeFi removes counterparty risk (no bank to fail) but replaces it with new ones. The most important categories:

  • Smart contract bugs: code can have errors. A buggy contract can be drained in a single transaction.
  • Oracle failures: many DeFi protocols rely on outside price feeds. If the feed is wrong or manipulated, the protocol can be tricked.
  • Liquidations: if you borrow against volatile collateral, a fast price move can wipe out your position.
  • Impermanent loss: providing liquidity to an AMM can earn fees but lose money if the underlying tokens move sharply against each other.
  • Scams: anyone can deploy a contract. New protocols with anonymous teams sometimes turn out to be exit scams.

Established protocols with years of operation, large amounts of value secured, and audited code are meaningfully safer than brand-new ones. The age of a protocol is a real signal.

In DeFi, the code is the contract. Reading it (or trusting people who can) is the new risk management.

DeFi shows what a public, programmable financial system looks like. The next lesson covers another whole category of programs that live onchain: NFTs and the broader idea of onchain ownership.