What is DeFi?
DeFi (decentralized finance) refers to financial services and products built on blockchain networks, primarily using smart contracts. These services operate without traditional financial intermediaries like banks or brokers, allowing direct peer-to-peer transactions. DeFi protocols automate financial operations through code, enabling users to trade, lend, borrow, and invest without centralized authorities.
Note on terminology:
The term "DeFi" encompasses financial services implemented through smart contracts on public blockchains. Projects labeled as "DeFi" exist on a spectrum of decentralization:
- Some protocols are fully decentralized with no central control
- Others maintain certain centralized components (like admin keys, geographic location restrictions, etc)
- Many use a hybrid approach combining both decentralized and centralized elements
For this reason, "on-chain finance" is sometimes used as an alternative term, as it describes what these protocols have in common: financial services implemented through smart contracts on public blockchains.
Characteristics of DeFi
- Permissionless access: No central authority controls access to DeFi services. Anyone can participate with a crypto wallet, regardless of location, wealth, or accreditation status. This enables global accessibility 24/7 and true self-custody of assets. It also means anyone has the freedom and ability to build and deploy new DeFi protocols, leading to innovation and expanding available services.
- Transparency: All DeFi transactions are visible on-chain, with smart contract code publicly verifiable. Protocol rules are encoded in smart contracts and can be inspected by anyone.
- Composability: DeFi protocols can interact with and build upon each other, leading to the creation of complex financial services through the integration of multiple protocols. This allows users to combine several protocols in a single transaction and developers to create new applications using existing ones as components.
Core components
Smart contracts
Smart contracts are self-executing programs stored on a blockchain that automatically enforce and execute agreements. Smart contracts form the foundation of DeFi by automating financial operations.
They handle:
- Asset exchanges and swaps
- Lending and borrowing mechanisms
- Interest rate calculations and distributions
- Collateral management and liquidations
- Token minting and burning
- Governance processes
Tokens
DeFi uses multiple token types to represent assets and assign rights:
- Fungible tokens (ERC-20): Interchangeable tokens like cryptocurrencies, stablecoins (USDC, DAI), and tokenized assets.
- Non-fungible tokens (ERC-721): Unique digital assets like NFTs.
- Liquidity pool tokens: Represent a user's contribution to trading pools that earn fees from transactions. Examples include Uniswap's LP tokens and Curve's LP tokens.
- Governance tokens: Grant voting rights in protocols, allowing holders to vote on protocol decisions and changes. Examples include AAVE, used in Aave's governance forum, and UNI for participating in Uniswap's governance forum.
- Wrapped tokens: Represent assets transferred (or bridged) from one blockchain to another. For example, wBTC is a token on Ethereum that represents Bitcoin from the Bitcoin blockchain.
Common DeFi services
Decentralized exchanges (DEXs)
Decentralized exchanges are protocols that enable direct trading of cryptocurrencies without intermediaries. DEXs use smart contracts to execute trades automatically and manage liquidity pools, without requiring a central entity to hold or manage user funds. These protocols use automated market makers (AMMs) for pricing, allow users to provide liquidity and earn fees, support advanced trading features like limit orders, and integrate with other DeFi protocols.
Staking and liquid staking protocols
Staking involves locking tokens in Proof-of-Stake (PoS) networks to help secure blockchain operations and earn rewards. This process supports network security and decentralization by enabling more participants to verify network transactions. This includes:
Traditional staking:
- Users can operate their own validator node or delegate tokens to existing validators and earn staking rewards
- Tokens can’t be used or transferred until they are unstaked
- After unstaking, tokens may be subject to an unbonding period (a waiting time that varies by network) before becoming accessible
Liquid staking:
- Users stake tokens through a liquid staking protocol, which delegates them to validators, and receive liquid staking tokens representing their staked position
- Liquid staked tokens can be used in DeFi protocols (for example: DEXs, lending protocols, trading pools) while the underlying token remains staked
- Enables access to liquidity without unstaking underlying token
- Maintains exposure to staking rewards
A common example of a liquid staking token is Lido's stETH, where users stake ETH and receive stETH tokens. These stETH tokens can be used across DeFi - traded on exchanges, provided as liquidity in pools, or used as collateral.
The main difference between traditional and liquid staking is how tokens can be used: traditional staking locks tokens completely, while liquid staking issues representative tokens that can be used in DeFi while the underlying asset remains staked and generates rewards.
Automated Market Makers (AMMs)
AMMs are smart contracts that enable automated trading and liquidity provision in DEXs. Users can:
- Provide liquidity to trading pools and earn fees from trades
- Earn additional incentive tokens for providing liquidity to a protocol
- Combine liquidity provision with other DeFi activities (for example: using liquid staking tokens in AMM pools).
Lending and borrowing
DeFi lending protocols enable peer-to-peer lending through smart contracts. These platforms enable users to:
- Lend assets to earn interest
- Borrow assets by providing collateral
- Adjust positions based on market conditions
- Participate in flash loans
- Access leverage through lending markets
For example, on Aave, users can lend ETH to earn interest, or borrow USDC by providing ETH as collateral.