DEX
A Decentralized Exchange (DEX) is a peer-to-peer marketplace where users trade cryptocurrencies without an intermediary or central authority. Unlike centralized exchanges (CEXs) that hold user funds and process trades internally, DEXs utilize smart contracts to execute trades directly between wallets. This setup ensures that users maintain custody of their assets until the moment of the trade, promoting censorship resistance and financial sovereignty.
Explain Like I'm 12
A DEX is like an open-air marketplace where you trade items directly with others using a magic box (a smart contract) that guarantees the trade happens safely. Nobody is in charge, and you always hold your own keys.
Why It Matters
DEXs remove the need for centralized intermediaries, reducing the risk of fund theft or platform manipulation. They are essential for the vision of a censorship-resistant financial system.
How It Works
DEXs operate using smart contracts on a blockchain. Traders connect their self-custody wallets and trade against liquidity pools. The smart contract automatically swaps the tokens from the user's wallet and returns the requested asset once the terms of the trade are verified.
Real-World Example
Uniswap, the leading decentralized exchange on Ethereum, facilitating automated swaps via liquidity pools.
Advantages
- Full user asset custody
- Permissionless access
- No KYC required
Limitations
- High transaction fees during congestion
- Slippage during low liquidity
- No customer support
Common Misconceptions
- Many think all exchanges with 'swap' features are DEXs.
- People assume DEXs are safer than CEXs without considering smart contract risk.
Knowledge Explorer
Explore This Concept in the Knowledge Graph
See how DEX connects to other concepts, books, research, and developer resources.
Related Terms
AMM
An Automated Market Maker (AMM) is a type of decentralized exchange protocol that relies on a mathematical formula to price assets instead of using a traditional order book. In an AMM, assets are pooled into smart contracts, known as liquidity pools, where traders interact with the pool rather than a counterparty. This infrastructure enables continuous liquidity and automated trade execution, removing the need for intermediaries such as market makers or centralized exchanges in the pricing and settlement process.
Liquidity Pool
A liquidity pool is a crowdsourced collection of digital assets locked in a smart contract to facilitate decentralized trading and lending. Unlike traditional order books where buyers and sellers must be matched, liquidity pools use Automated Market Makers (AMMs) to enable permissionless exchange. By pooling funds, the protocol ensures that there is always a counterparty available for trades, maintaining market depth even for less popular tokens and reducing reliance on centralized intermediaries.
Self-Custody
Self-custody refers to a method of storing digital assets where the user maintains exclusive control over their private keys, thereby negating the need for a third-party intermediary or centralized custodian. By holding the cryptographic keys, the user retains total authority over their funds, ensuring they do not rely on institutional solvency or external permission to authorize transactions or manage assets. This paradigm shift aligns with the core decentralized ethos of blockchain technology, prioritizing individual sovereignty over financial assets.
Smart Contract
A smart contract is a self-executing program stored on a blockchain that automatically runs when predetermined conditions are met. These contracts eliminate the need for intermediaries by encoding terms directly into lines of code, ensuring that the agreement is enforced exactly as written without human interference. Because they reside on an immutable ledger, the execution results are verifiable, transparent, and impossible to tamper with once deployed.
Smart Contract
A self-executing program stored on a blockchain that automatically enforces and executes the terms of an agreement when predetermined conditions are met. Smart contracts are deterministic, immutable once deployed, and form the backbone of decentralized applications.