How does exchanges like bitrex exchange coins so fast ? For example i transfer my bitcoin to bitrex. It will take mining fee and a huge time ( few hours ) to actually appear in bitrex wallet.

Now from bitrex i can transfer between Bitcoin -> Neo -> Bitcoin -> Eth -> Neo instantly without any mining fee.

How it actually does that ?

Here what i think: 

After i transfer them my bitcoin to my online bitrex wallet, they transfer it to their own secret GLOBAL wallet of that coin.

Then we just do exchange on their database not in real. 

Then when withdrawal they transfer it from their GLOBAL Neo wallet  -&gt; my online neo wallet -&gt; my offline neo wallet.


Thats just my thought i know its wrong but i need someone to explain me that.
Exchanges work with promises. If you deposit 100 USD, they promise to let you withdraw 100 USD later. If you trade for e.g. BTC, they only change this promise to letting you withdraw BTC. Exchanges accomplish this by swapping promises between users.

There are no actual transactions on the blockchain (except you deposit or withdraw to or from the exchange). That is why you e.g. can buy 0.5 NEO, where NEO on the blockchain is not divisible.

This is also why technically you do not own the BTC as long as they are on the exchange.