<blockquote>
<ul>
<li>Do on-chain transactions actually happen when matched on-exchange? Or just e.g. when a user cashes out their exchange account into a local wallet</li>
</ul>
</blockquote>
<p>Just when users deposit or withdraw from their account with the exchange. There is no on-chain activity from just trading; it's just incrementing one account's internal value on the exchange and decrementing another (and for the asset traded against, in the other direction).</p>
<blockquote>
<ul>
<li>Does the process differ if one is exchanging one cryptocurrency for another, versus fiat for crypto?</li>
</ul>
</blockquote>
<p>No.</p>
<blockquote>
<ul>
<li>How do they ensure privacy if transactions are trackable in the blockchain? (As a systematic trader, it would be quite bad if other participants knew your positions and which trades you had recently made!)</li>
</ul>
</blockquote>
<p>Positions are not visible on-chain.</p>
<blockquote>
</blockquote>

CC BY-SA 4.0
2023-04-22T11:32:10.343Z
Thank you Pieter! So you are saying that exchanges basically have their own wallets, and when a participant opens an account, a virtual account is created for him. The participant then transfers fiat or crypto to the exchange, Trading is then all done 'virtually' until he wants to withdraw cash or crypto; at this point, the cash or crypto is transferred from the exchange to the user. So all of the clearing and settlement is effectively handled by the exchange itself. Do exchanges manage these deposits using a fractional reserve system? Is there no true peer-to-peer on-chain trading exchange?
Zac
CC BY-SA 4.0
2023-04-22T18:33:22.123Z
Generally yes, exchanges create 'virtual' accounts for each user because this prevents them from overpaying on fees. Owning the accounts allows the exchange to consolidate UTXOs, which helps with fees down the line too as well as lowering full node storage requirements. The exchange will still control the funds at the end of the day its unlikely they will opt to give the users more control. This is why they are called 'centralized' exchanges. For a more decentralized option look at bisq: https://bisq.wiki/Frequently_asked_questions#How_is_Bisq_different_from_other_decentralized_exchanges.3F
Poseidon
CC BY-SA 4.0
2023-04-22T03:40:05.990Z
2023-04-22T03:40:05.990Z
Pieter Wuille
<p>I understand that this may differ between trading venues, and may perhaps depend on what specifically is being traded, but I would like to understand, in practice, how the post-trade process works in exchange-traded crypto.</p>
<p>For example, on an equities exchange (e.g. <a href="https://www.londonstockexchange.com/securities-trading/equity-trading/sets" rel="nofollow noreferrer">SETS</a>), a participant (often a broker) will have an order matched against another participant's order, and the exchange will capture this legally-binding agreement to transact. A central-counterparty clearing firm (e.g. <a href="https://www.lch.com/services/equityclear/equityclear-ltd" rel="nofollow noreferrer">LCH</a>) will novate the positions of both participants (as well as other participants) and net off the multilateral positions at EOD. This removes the risk of counterparty default during the period of time between trade and settlement. However it involves multiple firms performing a chain of operations which can take days to complete.</p>
<p>Crypto-currencies are distinguished by having a distributed ledger - so an OTC transaction can settle 'automatically' without requiring this process (assuming crypto-for-crypto trade). However I think this would be extremely onerous for the blockchain, and so the exchange presumably has some form of netting layer, between the matching engine and the actual on-chain transaction. I can see a few different ways for how this might work but haven't been able to find out how it actually does work.</p>
<p>Can you explain the post-trade process on e.g. Kraken / Coinbase / Binance, and how these firms ensure that two matched orders will settle on-chain?</p>
<ul>
<li><p>Do on-chain transactions actually happen when matched on-exchange? Or just  e.g. when a user cashes out their exchange account into a local wallet</p>
</li>
<li><p>Does the process differ if one is exchanging one cryptocurrency for another, versus fiat for crypto?</p>
</li>
<li><p>How do they ensure privacy if transactions are trackable in the blockchain? (As a systematic trader, it would be quite bad if other participants knew your positions and which trades you had recently made!)</p>
</li>
</ul>

<transactions><exchanges><trading>
How does clearing & settlement work on crypto exchanges
Zac
# How does clearing & settlement work on crypto exchanges

(Asked by: username_0 on 2023-04-21)

I understand that this may differ between trading venues, and may perhaps depend on what specifically is being traded, but I would like to understand, in practice, how the post-trade process works in exchange-traded crypto.

For example, on an equities exchange (e.g. [SETS](https://www.londonstockexchange.com/securities-trading/equity-trading/sets)), a participant (often a broker) will have an order matched against another participant's order, and the exchange will capture this legally-binding agreement to transact. A central-counterparty clearing firm (e.g. [LCH](https://www.lch.com/services/equityclear/equityclear-ltd)) will novate the positions of both participants (as well as other participants) and net off the multilateral positions at EOD. This removes the risk of counterparty default during the period of time between trade and settlement. However it involves multiple firms performing a chain of operations which can take days to complete.

Crypto-currencies are distinguished by having a distributed ledger - so an OTC transaction can settle 'automatically' without requiring this process (assuming crypto-for-crypto trade). However I think this would be extremely onerous for the blockchain, and so the exchange presumably has some form of netting layer, between the matching engine and the actual on-chain transaction. I can see a few different ways for how this might work but haven't been able to find out how it actually does work.

Can you explain the post-trade process on e.g. Kraken / Coinbase / Binance, and how these firms ensure that two matched orders will settle on-chain?

* Do on-chain transactions actually happen when matched on-exchange? Or just e.g. when a user cashes out their exchange account into a local wallet
* Does the process differ if one is exchanging one cryptocurrency for another, versus fiat for crypto?
* How do they ensure privacy if transactions are trackable in the blockchain? (As a systematic trader, it would be quite bad if other participants knew your positions and which trades you had recently made!)

**Tags:** transactions, exchanges, trading


---

## 1 answers

### Answer by username_1 on 2023-04-22. Score: 2 | Accepted answer

> * Do on-chain transactions actually happen when matched on-exchange? Or just e.g. when a user cashes out their exchange account into a local wallet

Just when users deposit or withdraw from their account with the exchange. There is no on-chain activity from just trading; it's just incrementing one account's internal value on the exchange and decrementing another (and for the asset traded against, in the other direction).

> * Does the process differ if one is exchanging one cryptocurrency for another, versus fiat for crypto?

No.

> * How do they ensure privacy if transactions are trackable in the blockchain? (As a systematic trader, it would be quite bad if other participants knew your positions and which trades you had recently made!)

Positions are not visible on-chain.

> **Comments:**
> **username_0**: Thank you username_1! So you are saying that exchanges basically have their own wallets, and when a participant opens an account, a virtual account is created for him. The participant then transfers fiat or crypto to the exchange, Trading is then all done 'virtually' until he wants to withdraw cash or crypto; at this point, the cash or crypto is transferred from the exchange to the user. So all of the clearing and settlement is effectively handled by the exchange itself. Do exchanges manage these deposits using a fractional reserve system? Is there no true peer-to-peer on-chain trading exchange?  
> **username_2**: Generally yes, exchanges create 'virtual' accounts for each user because this prevents them from overpaying on fees. Owning the accounts allows the exchange to consolidate UTXOs, which helps with fees down the line too as well as lowering full node storage requirements. The exchange will still control the funds at the end of the day its unlikely they will opt to give the users more control. This is why they are called 'centralized' exchanges. For a more decentralized option look at bisq: https://bisq.wiki/Frequently_asked_questions#How_is_Bisq_different_from_other_decentralized_exchanges.3F  

---

