Bitcoin Forum
June 21, 2024, 07:34:54 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: ask about exchange and other  (Read 222 times)
chanel1212 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 27, 2019, 01:02:45 AM
 #1

Hi,

First sorry if it's a newbie question!
I'm try to understand how this platforms work, specially the part for deposit/withdrawal.

I read about bitcoin daemon, so i understand how they generate account/address for users but where i misunderstand it's about the notifications of deposit and withdrawal and the usage of the balance information in database, they use wallet notify for that?

If yes, i read that wallet notify is call when: - a transaction arrive / - a transaction had her first validation / - and when a transaction is send

my questions are how they can use database for balance management, how that update of db work? If they use in add a cold storage system how that work?  Shocked

Because in my head that means:
      1 the user send bitcoin to his address:   first call wallet notify and maybe update of DB (or other script but in this case how and when they update their DB)
      2 the transaction had her first validation:   second call wallet notify who call herself the same script that config in
      3 the coin are move for cold storage or other: third call wallet notify who call herself the same script that config in

someone can explain me how that works please?    Huh

Thanks
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 27, 2019, 08:48:18 AM
 #2

First sorry if it's a newbie question!
I'm try to understand how this platforms work, specially the part for deposit/withdrawal.

I read about bitcoin daemon, so i understand how they generate account/address for users but where i misunderstand it's about the notifications of deposit and withdrawal and the usage of the balance information in database, they use wallet notify for that?
I doubt it... I would expect that exchanges (especially the larger ones) are most probably running custom software, rather than simply using Bitcoin Core and using "walletnotify" to trigger scripts...


The general process that most seem to follow is that after a deposit is made to a given address, a "trigger" will then update a users account, adding the appropriate amount to the balance. Although most exchanges will mark that particular amount as "pending" until a minimum number of confirmations have been received (generally around 6 confirmations).

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3486
Merit: 10666



View Profile
April 27, 2019, 09:04:13 AM
 #3

bitcoin core is not designed for that so as HCP said they have to write a custom script for these purposes which is basically consists of database lookups and other stuff. if you are really interested you can start searching for "open source cryptocurrency exchange engines" on the internet and then look at some of their source codes to get the general idea.
an example: https://github.com/dooglus/intersango

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
chanel1212 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 27, 2019, 11:30:43 AM
 #4

in intersango, what i understand that they use cronjob for first check every minutes if there are news deposits or withdrawals requests and after process to them if there are?
joniboini
Legendary
*
Offline Offline

Activity: 2226
Merit: 1795



View Profile WWW
April 28, 2019, 01:13:25 AM
 #5

in intersango, what i understand that they use cronjob for first check every minutes if there are news deposits or withdrawals requests and after process to them if there are?

Yep, more or less the step is the same even though the coding is different. They're using a database that will generate an approriate address for each user, run a periodical check to see if there's an incoming deposit and then refresh the balance/database after it has some confirmations. And then voila, it shows up on your exchange account.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
chanel1212 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 06, 2019, 11:36:27 PM
 #6

An other question came to my mind, these exchanges need to download all the blockchain of all the coins they use?
TryNinja
Legendary
*
Offline Offline

Activity: 2870
Merit: 7116


Crypto Swap Exchange


View Profile WWW
May 07, 2019, 12:22:50 AM
 #7

An other question came to my mind, these exchanges need to download all the blockchain of all the coins they use?
Yes. You can’t trust anyone when you are running an exchange, so having a SPV client is a big no. Imagine letting a stranger say which tx you will see and which you won’t (and maybe show inexistent transactions - idk if that’s possible tho). They could manipulate deposits/withdrawals and work on stealing your coins.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
chanel1212 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 07, 2019, 01:11:19 AM
 #8

Yeah i see, but with all these coins, when we see the bitcoin's blockchain it's more than 200Gb, ethereum a bit less and all others coins it's a lot of Tb and the bandwidth for sync all these blockchains!!  Shocked
nc50lc
Legendary
*
Offline Offline

Activity: 2450
Merit: 5724


Self-proclaimed Genius


View Profile
May 07, 2019, 01:35:54 AM
 #9

Yeah i see, but with all these coins, when we see the bitcoin's blockchain it's more than 200Gb, ethereum a bit less and all others coins it's a lot of Tb and the bandwidth for sync all these blockchains!!  Shocked
We're talking about Exchanges here, they are definitely well funded and buying a couple of industrial grade storage is a piece of cake.
For regular high-quality drives, one Terabyte isn't that expensive (About $40) to be a problem for someone who's into business.

By the way, most Tokens doesn't have their own blockchain, they use the Ethereum chain thus minimizing the amount of blockchains for the Exchange to store.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HeRetiK
Legendary
*
Offline Offline

Activity: 2968
Merit: 2111



View Profile
May 07, 2019, 01:08:13 PM
 #10

Yeah i see, but with all these coins, when we see the bitcoin's blockchain it's more than 200Gb, ethereum a bit less and all others coins it's a lot of Tb and the bandwidth for sync all these blockchains!!  Shocked

After receiving USD 300MM in funding last year, Coinbase is now evaluated at 8 billion dollars [1]. Binance reportedly made USD 78MM in profits just in the first quarter this year [2]. Heck even the relatively small, German based Bitcoin Group SE (of Bitcoin.de) is currently evaluated at EUR 165 MM [3][4].

That amount of money buys you quite a bit of storage space and bandwidth.

[1] https://cointelegraph.com/news/coinbase-raises-300-million-in-new-funding-round-to-accelerate-cryptocurrency-adoption
[2] https://cointelegraph.com/news/research-cryptocurrency-exchange-binance-registered-66-profit-increase-in-q1-2019
[3] https://www.bitcoingroup.com/?Investor_Relations
[4] https://finanzen.handelsblatt.com/94938/bitcoin-group-se--on-aktie
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!