Bitcoin Forum
June 25, 2024, 07:17:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How exchange's BTC/altcoin market works?  (Read 123 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 12, 2018, 03:07:23 AM
 #1

If user A deposit 1 bitcoin to some exchange, EX.

Then A buy 1000 Xcoin by 1 btc, then he sees his deposit become 0 btc and 1000 Xcoin.
At this time, where actually his 1 btc gone? To EX's bitcoin wallet? But originally A's bitcoin deposit address is EX's wallet's address, right?

Then can A send BTC to its own EX's wallet? This become self send BTC to self, right? Is that possible? How implement this?

hugeblack
Legendary
*
Offline Offline

Activity: 2548
Merit: 3777


View Profile WWW
April 12, 2018, 05:26:12 AM
Last edit: April 12, 2018, 05:54:50 AM by hugeblack
 #2

All that happens is that you have a central database running in the background and sync it with a bitcoin wallet using json to send commands to daemons and get a response back.
When a user creates an account, he gets a wallet address linked to his account. After making deposit, all that happens is a change in the data values of the central database.
Then A buy 1000 Xcoin by 1 btc, then he sees his deposit become 0 btc and 1000 Xcoin.
This means that your data in the central database is 0 btc and 1000 Xcoin

where actually his 1 btc gone?
exchange site wallet (they have the private key)

For more read
How Changelly works
How does Exodus wallet (or other wallet) exchange bitcoin to other cryptocurrency
https://github.com/AdamCox9/nickelbot
nc50lc
Legendary
*
Offline Offline

Activity: 2450
Merit: 5733


Self-proclaimed Genius


View Profile
April 12, 2018, 05:44:27 AM
 #3

In simple words, exchanges aren't using any coins' blockchain in the trades within the platform, they're only displaying the balances and trades "visually" not on-chain... in exception to withdrawals.

At this time, where actually his 1 btc gone? To EX's bitcoin wallet? But originally A's bitcoin deposit address is EX's wallet's address, right?
It will stay in that BTC address if they didn't already moved the balance. | Yes

To understand this, in your own wallets (ex. core or electrum), you have the total control over the private keys of your addresses.
In exchanges, they are only giving you the address (they have the PrivKey) which they issue when you want to deposit your funds that will be "recorded" to their database as your balance.
After that, they can move the funds from that address whenever they want, however, it will not affect your displayed balance in your exchange account.

You can check this your own by checking your deposit address in any blockexplorer like blockchain.info.
You will notice that sometimes the balance is still there even if you already traded your Bitcoins.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!