📑HOW LIQUIDITY IS SOURCED AFTER YOU CLICK ''SWAP'' ON A DEX ••••••••••••••••••••••••••••••••••••• The first time I swapped a token on a DEX, I assumed there was some invisible buyer on the other side, like a normal exchange. The truth is that there isn't. There's just a pool. Think of it like a big shared bucket of two tokens that other users deposited and you're trading against that bucket, not against a person. HERE'S THE BASIC MECHANICS OF HOW THAT WORKS Say a pool holds TON and USDT. When you swap TON for USDT, you're adding TON to the pool and pulling USDT out. That shifts the ratio between the two tokens, and the ratio is what sets the price. Buy enough of one side and you'll notice the price creeping against you that's not the app being unfair, that's just the pool rebalancing in real time as you drain one side of it. The people who deposited the tokens in the first place ''the liquidity providers'' aren't doing it for free. Every swap that goes through the pool pays a small fee, and that fee gets split among everyone who has capital sitting in that pool. More trading volume through the pool, more fees for the people providing liquidity. NOW, HERE'S THE PART THAT SUPRISES ME Providing liquidity isn't automatically profitable. If the price of one of your two tokens moves a lot while your funds are sitting in the pool, you can end up with less value than if you'd just held the tokens separately. It's called impermanent loss, and it's the main thing that separates people who understand pools from people who gets burned in a pool. To conclude, a pool isn't a black box, it's just two token balances and a formula deciding the exchange rate between them. Once you see it that way, the rest of DeFi farming, fees, even impermanent loss stops feeling like magic and starts feeling like math. i hope you learnt something from this! $GRAM @ston_fi
