And yes, I messed up - actual wording at paragraph 1.4 says "Segregation customer's assets from proprietary assets" that means exchange does not really have to segregate each user's assets from each other individually, just keep em separate from exchange's own wallet. Still I see some hole in this, since exchange can't instantly deduct it's trade fee from user's wallet so there is a period, when assets of both user and exchange are mixed up in a wallet. I still wonder how real exchange manage their wallets.
I wouldn't think this is the case...
You don't really have any "assets" after depositing to an exchange... In effect, you basically have a promissory note or "IOU" for the value of your deposit. This is your "number in a database". When an order is executed, they simply update 4 values in the database... The "buy" and "sell" coin totals for yourself and the trading partner... There "fee" is automatically created by simply crediting your account with a lower number than your trade... ie. if you bought 10 BCH with a 0.1% fee, they'd only increase your balance by 9.999 BCH.
As far as I can tell, it really doesn't require any changes to any "wallets" until "settlement" occurs when users wish to withdraw (or deposit more funds). For instance:
User account = 0 BTC, 0 BCH
Exchange BTC Wallet = 100 BTC
Exchange BCH Wallet = 1000 BCH
User then deposits 1 BTC:user account = 1 BTC
Exchange BTC wallet = 101 BTC
Exchange BCH walelt = 1000 BCH
User then exchanges 1 BTC for 10 BCH:User account = 0 BTC, 9.999 BCH (assuming 0.1% fee)
Exchange BTC wallet = 101 BTC
Exchange BCH wallet = 1000 BCH
User then withdraws BCH:User account = 0 BTC, 0 BCH
Exchange BTC wallet = 101 BTC
Exchange BCH wallet = 9990.001 BCH
As you can see, pretty much limitless trades can occur without the actual wallet values actually changing... they only change when deposits/withdrawals happen... and by simply crediting users with lower values than the "true" value of the trade they generate their fee.