“bro, what’s a CLOB?”
imagine a farmers market with a big whiteboard in the middle
on this whiteboard, every farmer who wants to buy or sell apples can write their offer
bob writes “i’m selling 10 apples for $1 each”
jack writes “i’m buying 10 apples for $1 each”
since both offers match, the trade between bob and jack happens
everyone can see all the buy and sell offers on the board
this whiteboard is the CLOB. it holds all the orders and makes sure trades happen fairly: best prices go first
now replace apples with any token you want, and that’s it
“bro how is this different from coinbase?”
coinbase and other centralized exchanges also use CLOBs
the thing is: their CLOBs run offchain, which means they aren’t decentralized
you have to trust coinbase to match orders fairly
“so why is everyone talking about CLOBs?”
because the goal is to build a CLOB that works onchain
before, this was hard (impossible) because of two main problems:
- latency: orders need to be placed super fast
- gas cost: placing an order shouldn’t cost a ton of money
but with new chains like monad, fluent or megaeth, it’s starting to look feasible
“how is this different from uniswap?”
uniswap (and other AMMs) work differently
they use liquidity pools of tokens and a formula to make sure trades happen between a range of prices
with CLOBs, it’s traders who place their own orders. no algorithm in the middle
🫶