FundamentalsBeginner

What is DeFi? A Beginner's Guide to Decentralized Finance

How decentralized finance works: smart contracts, self-custody wallets, DEXs and lending, what it does better than banks and the risks to know first.

ChainBridge ResearchUpdated 5 min read

On this page6 sections

Key takeaways

  • DeFi replaces banks and brokers with smart contracts: public programs that hold funds and execute trades, loans and transfers by fixed rules.
  • You keep custody: your wallet signs every action, and no company can freeze or lend out your funds.
  • The core services are swaps on decentralized exchanges, lending and borrowing, and stablecoins.
  • The trade-off is responsibility: transactions are final, and contract bugs, scams and phishing are real risks.

What is DeFi?

Decentralized finance (DeFi) is a set of financial services that run on public blockchains instead of inside a bank or a broker. Swapping tokens, lending, borrowing and sending money are handled by smart contracts: programs deployed on a blockchain such as Ethereum that hold funds and follow their code exactly.

There is no account to open. Anyone with a wallet can use the same contracts, at any hour, from any country the front-end serves. The blockchain is the settlement layer: every transaction and every balance is public and can be checked by anyone.

The movement took off in 2020 and now spans Ethereum and the many networks built around it, from layer 2 rollups like Arbitrum and Base to independent chains like BNB Chain and Avalanche.

How DeFi works

Three building blocks make it possible.

A shared ledger

A blockchain records every balance and transaction. Thousands of independent nodes keep a copy, so no single party can rewrite history or block a valid transaction for long.

Smart contracts

Think of a vending machine: put in the right input and the contract delivers the output, with no clerk involved. Its code is usually public, so anyone can check what it does before using it.

Self-custody wallets

Your wallet holds the private key that controls your funds. Nothing moves until you sign. Lose the key and nobody can recover it; share it and anyone can empty the wallet.

Composability

Contracts can call other contracts. A DEX aggregator can route your swap through several exchanges in one transaction because each one is an open building block.

Your walletsigns the swapSmart contractchecks and executesLiquidity pooltrades the tokenstokens land in your wallet in the same transaction
A swap in DeFi: your wallet signs, a contract executes, and the result settles back to your wallet.

DeFi vs traditional finance

DeFi compared with traditional finance
AspectTraditional financeDeFi
AccessID checks, account approval, country restrictionsA wallet and an internet connection
Opening hoursBusiness hours, settlement pauses on weekendsAlways on, every block
Who runs itBanks, brokers, clearing housesSmart contracts anyone can read
CustodyThe institution holds your moneyYou hold your keys and your assets
SettlementHours to daysSeconds to minutes, depending on the network
If something goes wrongSupport desk, chargebacks, deposit insuranceUsually no reversal, no insurance

Neither column is strictly better. DeFi gives you control, speed and transparency; traditional finance gives you someone to call when things go wrong. Knowing which trade-off you are making is the first step.

The core services

Decentralized exchanges

A DEX lets you swap one token for another straight from your wallet. Most use automated market makers: pools of two tokens that price trades with a formula instead of an order book. See What is a DEX? for how they work.

Prices differ between DEXs, so aggregators search many of them at once. ChainBridge goes one level up: it asks three aggregators, 0x, KyberSwap and ParaSwap, for a quote and keeps the one that leaves you the most after fees and gas. How DEX aggregators work explains the process.

Lending and borrowing

Lending protocols such as Aave and Compound pool deposits and lend them to borrowers. Borrowers post more collateral than they borrow; if its value falls too far, the contract sells it automatically to repay the loan. Rates move with supply and demand.

Stablecoins

Tokens like USDC, USDT and DAI track the US dollar. They are the unit of account of DeFi: what you sell into when you want to step out of volatile assets without leaving the blockchain. See What are stablecoins?

Liquidity provision and staking

You can also deposit tokens into exchange pools to earn a share of trading fees, or stake tokens to help secure a proof-of-stake network. Both carry their own risks, such as impermanent loss for liquidity providers. ChainBridge focuses on swaps and does not offer either.

Getting started

  1. Install a self-custody wallet

    MetaMask, Rabby and Rainbow are common choices. Write the recovery phrase on paper, store it offline and never share it. Wallet security covers the essentials.

  2. Fund it

    Buy crypto on an exchange or through your wallet's on-ramp, then withdraw it to your own address. Start small while you learn.

  3. Make a small first swap

    Connect to ChainBridge, pick a pair such as ETH to USDC, and read the quote before you sign: rate, minimum received and fees. Buy your first crypto walks through every step.

Risks to know first

Smart contract bugs

A flaw in a contract can drain the funds it holds. Audits lower the odds but never remove them. Older, widely used contracts with a clean history are safer than new ones.

Scams and phishing

Fake sites, fake tokens and malicious approval requests are the most common way people lose funds. Check the URL, check the token contract, and never type your recovery phrase into a website.

Irreversible mistakes

Sending to the wrong address or the wrong network cannot be undone by anyone. Send a small test amount first when moving funds somewhere new.

Volatility and depegs

Most tokens can lose half their value in days, and even stablecoins have briefly lost their peg. Size positions for the worst case, not the expected one.

ChainBridge adds guard rails on every swap: the transaction is simulated before you sign, tokens are checked for honeypots and high sell taxes, and the contracts you interact with are matched against an allowlist. For the warning signs to watch elsewhere, read DeFi scam red flags.

Put it into practice

Compare 0x, KyberSwap and ParaSwap in one quote, with every route checked before you sign.

Start swapping