DEFI
Mega DeFi Edition Part Two π

Welcome to day two of the Mega DeFi Edition of the Litepaper. π«
Todayβs focus is on Decentralized Exchanges (DEXs) and the various Automated Market Makers (AMMs) that make DEXs work. Weβll also hit on DEX aggregators.
DEXs
Decentralized Exchanges: Your Direct Ticket to Peer-to-Peer Trading π§βπ§
Letβs dive into the world of Decentralized Exchanges (DEXs). Essentially, DEXs let you trade your favorite crypto tokens directly with other folksβno middlemen, no long-winded sign-up process, no βwe regret to inform youβ emails shutting you down. Instead, DEXs run on smart contracts (bits of code on the blockchain) that automatically handle trades once you confirm them.
Hereβs the best part: your coins stay in your own wallet until the very last click. Unlike on a centralized exchange (CEX), thereβs no big corporate entity babysitting your crypto (and no separate deposit address you have to trust). Youβre in charge from start to finish. π
DEXs
Why Bother With a DEX? π€
You Keep Your Keys
Ever heard βNot your keys, not your cryptoβ? Thatβs basically the DEX mantra. On a DEX, you hold onto your tokens until the second you confirm a trade. No handing them over to a corporate exchange wallet that might get hacked or go bankrupt.Censorship Resistance
Since DEXs are built on decentralized networks, itβs way harder for one personβor one governmentβto shut them down or tell them which tokens they can list. If you have an internet connection, youβre (mostly) good to go.No Borders, No Permission Slips
While local regulations can still vary, the spirit of a DEX is global and open to everyone. Thereβs no 20-page sign-up form, no waiting for your account to get βapproved.β Itβs like stepping into a global crypto bazaar, free to browse as you please.Community-Driven Innovation
Most DEXs are open-source, meaning the code is out there for people to inspect, clone, and improve. This makes it easier for new features to pop upβand for the community to keep pushing the envelope.
DEXs
So, How Do DEXs Actually Work? π€·
Automated Market Makers (AMMs) π€
Chances are, if youβve used a DEX like Uniswap, SushiSwap, or PancakeSwap, youβve run into an AMM (Automated Market Maker). This is a fancy way of saying there are liquidity pools (imagine big community piggy banks full of two different tokens) that users like you and me can deposit our tokens into. In return for contributing, you earn a slice of the trading fees.
Liquidity Pools in a Nutshell:
Letβs say you have ETH and DAI. You throw them both into the ETH-DAI pool. When someone comes along to swap ETH for DAI, they take a bit of your DAI and leave ETH behind. The poolβs algorithm recalculates the exchange rate based on whatβs left inside. And you get a portion of the trading fees for playing along!Swaps Without Middlemen:
With AMMs, thereβs no βbig exchangeβ matching your buy or sell order with someone elseβs. You just trade directly against that shared pool of tokens. Simple, streamlined, and no need to beg for a specific trading pair to be listed.
Order Book DEXs π
Not every DEX uses liquidity pools. Some rely on order booksβbasically a list of all the buy and sell offers. Traditional centralized exchanges also do this, but on DEXs, it happens on-chain (or partially on-chain). This can be pricier on certain blockchains, but new tech solutions (like layer-2s) are making it more feasible.
DEX Aggregators π―
1inch, ParaSwap, and others are known as DEX aggregators. They check a bunch of different DEXs at once to score you the best deal on your trade. Itβs like a travel site that compares flights across airlines so you donβt have to hunt for the best price on your own.

