Skip to content
Basis Desk
DeFi · 6 min read Last reviewed September 29, 2026

What Is DeFi? Decentralized Finance Explained

An institutional-grade primer on decentralized finance, detailing the mechanics of smart contracts, automated market makers, overcollateralized lending, and systemic risks.

Neutral

Key points

  • DeFi replaces traditional financial intermediaries with self-executing smart contracts on public blockchains.
  • Decentralized exchanges use automated market makers and liquidity pools instead of traditional order books to facilitate asset swaps.
  • Lending protocols manage default risk through automated overcollateralization and programmatic liquidations.
  • Composability allows protocols to connect like building blocks, increasing capital efficiency but introducing systemic cascading risks.

Decentralized finance, or DeFi, is an umbrella term for financial applications built on blockchain networks that operate without central intermediaries. By replacing traditional institutions like banks and brokerages with self-executing computer code, DeFi allows users to lend, borrow, trade, and manage assets directly with one another. This infrastructure relies on open-source protocols, cryptographic security, and automated smart contracts to execute transactions globally and continuously.

The Foundation: Smart Contracts and Blockchains

To understand DeFi, one must first understand its underlying infrastructure. Traditional finance relies on legal contracts, courts, and trusted intermediaries to ensure that parties honor their agreements. DeFi replaces these institutions with smart contracts, which are self-executing programs stored on a blockchain that automatically run when predetermined conditions are met 1.

Most DeFi applications operate on smart-contract-enabled blockchains, primarily the Ethereum network 1. When a user interacts with a DeFi protocol, they submit a transaction to a smart contract. The contract evaluates the input against its programmed rules. If the conditions are satisfied, the contract executes the state change—such as transferring ownership of an asset—and records the result permanently on the blockchain ledger. Because the ledger is distributed across thousands of independent computer nodes, no single entity can alter the transaction history or halt the execution of the code.

This architecture introduces two core properties to financial services:

  • Non-custodial asset management: Users retain control of their private keys, meaning they do not hand over custody of their funds to a third party.
  • Permissionless access: Anyone with an internet connection and a compatible software wallet can interact with these protocols, regardless of geographic location or credit history.

Decentralized Trading and Liquidity Pools

In traditional markets, trading requires an intermediary, such as a centralized exchange, which matches buyers and sellers using an order book. In contrast, decentralized exchanges (DEXs) often use a mechanism called an automated market maker (AMM) 2.

Instead of matching individual buy and sell orders, an AMM relies on liquidity pools. These pools are smart contracts containing reserves of two or more tokens, deposited by users known as liquidity providers. Traders execute swaps directly against these reserves. The price of the assets in the pool is determined mathematically based on the ratio of the tokens in the contract.

To see how this works in practice, consider the constant product formula used by early AMM protocols:

$$x \times y = k$$

In this equation, $x$ represents the quantity of Token A, $y$ represents the quantity of Token B, and $k$ is a constant value that must remain unchanged during a trade.

Suppose a liquidity pool is initialized with 10 units of Token A ($x$) and 100 units of Token B ($y$). The constant $k$ is established as $1,000$ ($10 \times 100 = 1,000$).

If a trader wants to purchase Token A using Token B, they must add Token B to the pool and withdraw Token A. If the trader adds 50 units of Token B to the pool, the new balance of Token B ($y$) becomes 150. To maintain the constant $k$ at $1,000$, the quantity of Token A ($x$) must decrease:

$$x = \frac{1,000}{150} \approx 6.67$$

Therefore, the pool can only retain approximately 6.67 units of Token A. The trader receives the difference:

$$10 - 6.67 = 3.33 \text{ units of Token A}$$

Because the price shifts dynamically with the size of the trade relative to the pool's depth, large trades can experience significant price slippage. Liquidity providers earn a pro-rata share of the transaction fees generated by the pool as compensation for depositing their assets, though they face the risk of impermanent loss if the market prices of the deposited tokens diverge significantly from their original ratio.

To compare how this model differs from traditional order-book execution, readers can explore our detailed guide on Centralized vs Decentralized Exchanges 2.

Decentralized Lending and Overcollateralization

Traditional banks assess a borrower's creditworthiness using credit scores, income verification, and legal recourse. Because DeFi protocols operate permissionlessly and anonymously, they cannot rely on these mechanisms. Instead, DeFi lending protocols use overcollateralization to mitigate default risk 1.

To borrow an asset, a user must deposit another asset of higher value into a lending smart contract as collateral. The protocol establishes a maximum loan-to-value (LTV) ratio, which dictates how much a user can borrow against their collateral.

For example, if a protocol requires a minimum collateralization ratio of 150% (equivalent to a maximum LTV of 66.7%), a user who deposits $1,500 worth of $ETH can borrow a maximum of $1,000 worth of a stablecoin.

If the market value of the collateral falls below the liquidation threshold (for instance, if the ETH collateral drops to $1,400, pushing the collateralization ratio below the required limit), the smart contract automatically triggers a liquidation. Third-party liquidators are incentivized to purchase the collateral at a discount to repay the outstanding debt, ensuring the protocol remains solvent. This automated liquidation process eliminates the need for manual debt collection but exposes borrowers to sudden asset loss during volatile market conditions.

Stablecoins: The Unit of Account

Because major cryptocurrencies like $BTC and ETH experience high price volatility, DeFi relies heavily on stablecoins to serve as a stable unit of account, medium of exchange, and store of value 3. Stablecoins are digital assets designed to maintain a stable value relative to a target asset, typically the US dollar 3.

There are three primary mechanisms used to maintain this peg:

  1. Fiat-collateralized: These stablecoins are backed 1:1 by traditional reserves, such as cash and government debt, held in centralized bank accounts by an issuing entity 3.
  2. Crypto-collateralized: These stablecoins are backed by other cryptocurrencies held within public smart contracts. To account for the volatility of the underlying collateral, these systems require overcollateralization 3.
  3. Algorithmic: These protocols attempt to maintain a peg using algorithmic supply adjustments and incentive mechanisms, often without direct fiat backing 3. These models carry higher systemic risks if market confidence collapses.

For a broader look at how these assets interact with trading venues, see our analysis of Crypto Market Structure.

Composability: "Money Legos"

One of the unique characteristics of DeFi is composability, often referred to as "money legos." Because DeFi protocols are open-source and run on shared public blockchains, they can interact with one another seamlessly.

A single transaction can route assets through multiple independent protocols in a fraction of a second. For example, a user can deposit collateral into a lending protocol, receive an interest-bearing token representing their deposit, use that token as collateral in a secondary protocol to mint a stablecoin, and then swap that stablecoin on a decentralized exchange.

While composability enables rapid innovation and capital efficiency, it also introduces systemic vulnerability. A vulnerability or failure in one foundational smart contract can trigger a cascading failure across dozens of connected protocols.

Common Misconceptions

  • "DeFi is completely decentralized." In practice, decentralization exists on a spectrum. Many protocols rely on centralized admin keys held by core developers, use centralized oracle networks to feed external price data to smart contracts, or depend on centralized stablecoins as their primary collateral.
  • "Smart contracts are risk-free because they are code." Code is written by humans and can contain bugs, logical errors, or security vulnerabilities. Malicious actors routinely exploit these vulnerabilities to drain funds from smart contracts. Unlike traditional banking, there is no central authority to reverse fraudulent transactions or recover lost funds.
  • "DeFi eliminates all transaction fees." While DeFi eliminates intermediary bank fees, users must pay network transaction fees (often called "gas") to the underlying blockchain to process their transactions. During periods of high network congestion, these fees can rise significantly, sometimes making small transactions economically unviable.

Regulatory and Market Outlook

As DeFi has grown, it has drawn increasing scrutiny from global regulators. Organizations such as the US Securities and Exchange Commission (SEC), the UK Financial Conduct Authority (FCA), and the European Securities and Markets Authority (ESMA) are actively working to apply existing financial regulations to decentralized protocols 4.

Key regulatory challenges include:

  • Compliance: Applying Anti-Money Laundering (AML) and Know Your Customer (KYC) requirements to permissionless, peer-to-peer networks 4.
  • Classification: Determining whether specific governance tokens or yield-generating mechanisms constitute unregistered securities offerings 4.
  • Taxation: Tax authorities, including the US Internal Revenue Service (IRS) and the UK's His Majesty's Revenue and Customs (HMRC), treat crypto transactions as taxable events. The specific rules regarding capital gains, income from staking, and liquidity provision vary by jurisdiction and are subject to frequent updates. Users are advised to consult qualified professionals regarding their local tax obligations.

For market participants, navigating this landscape requires a rigorous approach to risk. To learn more about protecting capital in volatile environments, refer to our guide on Risk Management for Crypto.

Questions this story raises

What is a smart contract in DeFi?
A smart contract is a self-executing computer program stored on a blockchain. It automatically executes transactions when specific, pre-programmed conditions are met, removing the need for a trusted intermediary.
Can I lose money in DeFi?
Yes. DeFi carries substantial risks, including smart contract bugs, protocol exploits, liquidation of collateral due to market volatility, and impermanent loss for liquidity providers.
How does borrowing work without a credit check?
DeFi lending protocols use overcollateralization. Borrowers must deposit assets worth more than the loan amount into a smart contract. If the collateral value falls below a set threshold, the contract automatically liquidates it to repay the loan.
What is gas in DeFi?
Gas refers to the transaction fees paid to blockchain validators to process and record transactions on the network. These fees fluctuate based on network congestion.

References

  1. [1] Introduction to DeFi — Ethereum Foundation
  2. [2] What is a DEX? — Ethereum Foundation
  3. [3] Stablecoins Explained — Ethereum Foundation

Evergreen explainer written by Basis Desk's system and checked by an independent model pass for factual errors and advice language. Figures, fees and rules change — the references above are where to verify current specifics. Market figures marked "at the time of writing" come from live exchange data. Report an error: hello@basisdesk.news.

Not financial advice. Basis Desk publishes information, not recommendations. Crypto assets are volatile and you can lose what you invest.