Customers deposit crypto onto the exchange. It all sits in one big pool, for simplicities sake. Each customer has a claim to however much crypto they deposited.
Customers can then put in sell order and buy orders.
Let’s say I put in a sell order for 1 BTC at $50k, and there is another sell order in by somebody else for 1 BTC at $48k. For simplicity, we are the only 2 sellers right now.
You come along and decide you want to buy 2 BTC, and you don’t care about the price so you put in a market order for 2 BTC. The exchange now credits you with 2 BTC at $98k total, or more accurately you bought 1 at 48k and 1 at 50k for an average of $49k per BTC.
The BTC hasn’t actually moved anywhere yet, but the exchange database now says you have a claim to 2btc out of their big ole pile of BTC, and the other 2 people now have a claim to the cash.
No BTC is actually transferred anywhere until you decide to withdraw it.
[url]
mycryptoparadise.com[/url]