Title: ask about exchange and other Post by: chanel1212 on April 27, 2019, 01:02:45 AM 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? :o 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? ??? Thanks Title: Re: ask about exchange and other Post by: HCP on April 27, 2019, 08:48:18 AM First sorry if it's a newbie question! 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...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? 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). Title: Re: ask about exchange and other Post by: pooya87 on April 27, 2019, 09:04:13 AM 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 Title: Re: ask about exchange and other Post by: chanel1212 on April 27, 2019, 11:30:43 AM 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?
Title: Re: ask about exchange and other Post by: joniboini on April 28, 2019, 01:13:25 AM 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. Title: Re: ask about exchange and other Post by: chanel1212 on May 06, 2019, 11:36:27 PM An other question came to my mind, these exchanges need to download all the blockchain of all the coins they use?
Title: Re: ask about exchange and other Post by: TryNinja on May 07, 2019, 12:22:50 AM 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.Title: Re: ask about exchange and other Post by: chanel1212 on May 07, 2019, 01:11:19 AM 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!! :o
Title: Re: ask about exchange and other Post by: nc50lc on May 07, 2019, 01:35:54 AM 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!! :o 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. Title: Re: ask about exchange and other Post by: HeRetiK on May 07, 2019, 01:08:13 PM 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!! :o 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 |