What really happen when user moves fund between Main Account and Trading Account in HitBTC? I am building a crypto exchange and I wonder how HitBTC exchange (https://hitbtc.com/) is handling "Main account" and "Trading account", as the image below:



According to them, Main Account is like cold wallet, while Trading Account is like hot wallet. Storing your fund in Main Account (cold wallet) will be safer to your fund.

Now, let's talk about definition of cold wallet and hot wallet. Cold wallet means private key is stored offline, while hot wallet means private key is stored online. 

So, am I correct that, when user store his fund in "Trading Account", what really happens is, HitBTC moves private key of that particular user's wallet to an online server? And when the user moves the fund to "Main Account", what really happens is, HitBTC remove the private key from online server and store it in online offline servers?

If yes, then how can HitBTC, when necessary, moves private key from offline server to online server, without making the offline server online?
This is purely an internal accounting move, no keys are involved.

Their comparison to a hot/cold valid is likely just an analogy. In reality, their application layer (or some middleware) enforces some checks to make sure you can only trade values inside your trading account.

When you transfer funds between them, their internal database accounts are updated. This has nothing to do with blockchains or private keys or utxos. It's purely an internal movement.