PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, September 25, 2022

[FIXED] How exchanges (Binance, Coinbase) record user trade into blockchain

 September 25, 2022     binance, blockchain, coinbase-api, cryptocurrency     No comments   

Issue

My question is how cryptocurrency exchanges like Binance or Coinbase record users trade into blockchain technically. For example when Mr.X buys BTC/USDT pair from Mr.Y, how does the exchange record these two Transactions into the blockchain. as far as I know, We have two transactions now, Mr.X has to sign a USDT transaction to Mr. Y's account & Mr.Y has to sign a transaction for Mr. X's BTC wallet on that exchange. I was wondering how exchanges manage network fees? & how they record these trades into blockchain I also know Mr.X order will probably fulfill with different accounts but I just want to simplify my question thank you.


Solution

As far as I know both of them are centralized entities so what happens is:

Mr X and Mr Y send their crypto to the exchange controlled wallets. The exchanges keep the record in their own DB/ledger who owns what. Then when Mr Y and Mr X make a trade the exchanges record that trade in their own DB/ledger and nothing is recorded on public blockchain. Now Mr X withdraws the crypto from one of the exchanges and it gets recorded on public blockchain (If he withdraws BTC then it will be recorded on BTC blockchain). So Mr X and Mr Y can do thousands of trades without paying network fees as everything happens in the exchange's internal system (they may have per trade fee)

DeFi - I have no idea how it works, as didn't dig into it :)



Answered By - Tom
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing