0

How do cryptocurrency exchanges execute trade without paying gas fees?

For example, in Binance, every user has their own wallet address for each coin they owned. Let's say I just traded 1 BTC for 1 ETH. If I were to go in my wallet info, I would see it's been immediately reflected. Now, this can easily be done by exchanges doing their internal data handling things on their own, not necessarily having to associate with actual blockchain. That part I understand.

What I can't seem to figure out is that when user wants to actually withdraw the funds, they actually let us withdraw that much amount of coin and if I check in blockchain explorer I can see my exchange wallet address as a sender.

So, if trading within exchange and wallet balance immediately being reflected upon it were to be achieved by inner data handling, it must mean I don't actually own that coin on my exchange address because it's just an exchange showing me the number. But then if so, how is it possible that I can just withdraw my funds to another wallet (say like metamask).

How are they achieving two things at once?

2 Answers 2

2

When you deposit funds into an exchange, you pay into the wallet of the exchange, and the exchange shows you what they owe you in your user account. When you trade, the exchange updates your account balances in their database and shows you the corresponding balances. When you withdraw, the exchange sends you funds from their wallet. Only deposit and withdrawal have an on-chain footprint.

I can see my exchange wallet address as a sender.

I assume you must be talking about an account-model based blockchain like Ethereum, where an exchange may be using a single address for all of their funds. I doubt that you would see that for a UTXO-model based blockchain as Bitcoin, where generally each payment is sent to a new address, or at least each user has a unique deposit address.

1

It might be that you are confusing what you see from Binance on their app -- the transaction ID (that you share with others or keep for yourself as proof of payment), not your wallet. Their inputs are usually big (say 20BTC -- that wallet belongs to them) with one small output (say 0.1 BTC to your receiving wallet) and their change address.

Take this one for example (not Binance and chosen randomly from the mempool, but follows that pattern):

https://mempool.space/tx/4adc65757b9eaf1a79b08ba2134e323c41dde8cb224ad9bf22b3b896b877fbee

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.