Pages:
Author

Topic: How exchanges make wallet adresses? (Read 801 times)

jr. member
Activity: 203
Merit: 3
May 09, 2018, 04:28:35 AM
#47
I would suggest you to look at
https://github.com/cryptocoinjs/awesome-cryptocoinjs
to get some more info and the technical details that are most important to your project
legendary
Activity: 1624
Merit: 2481
May 09, 2018, 03:45:27 AM
#46
There are 2 options:
2) (Not recommended) Each user has an unique ID and new addresses are generated via seed, so they are actually pre-generated and easy to recover if you now the seed. Then it goes like that:
[seed]-> [Purpose][Coin][Account][External / Internal][address id]

m/44'/0'/111'/0/1  -> Bitcoin address, user_id 112, second address
m/44'/145'/48271'/0/3  -> Bitcoin Cash address, user_id 48271, fourth address
m/49'/0'/54'/0/0  -> Bitcoin SegWit address, user_id 55, first address

What are these seed? m/44'/0'/111'/0/1,  m/44'/145'/48271'/0/3 ,  m/49'/0'/54'/0/0

I just thought made bunch of address from one bitcoin daemon.

Where is seed and how to know what seed used from above?


First: I don't like this approach. It is kinda 'dirty'.

The seed is your mnemonic seed. Your 12/18/24 word seed.
m/0'/0'/0 is a derivation path (specified in BIP 32).





If you want to use a seed you have to actively generate one. Then derive private-/public- keypairs from your seed.


A better approach would be to use the xpub key or to generate a bunch of addresses and store them in your database. Then just link user ID's to the addresses in your database.
jr. member
Activity: 413
Merit: 5
May 09, 2018, 01:29:20 AM
#45
There are 2 options:
2) (Not recommended) Each user has an unique ID and new addresses are generated via seed, so they are actually pre-generated and easy to recover if you now the seed. Then it goes like that:
[seed]-> [Purpose][Coin][Account][External / Internal][address id]

m/44'/0'/111'/0/1  -> Bitcoin address, user_id 112, second address
m/44'/145'/48271'/0/3  -> Bitcoin Cash address, user_id 48271, fourth address
m/49'/0'/54'/0/0  -> Bitcoin SegWit address, user_id 55, first address

What are these seed? m/44'/0'/111'/0/1,  m/44'/145'/48271'/0/3 ,  m/49'/0'/54'/0/0

I just thought made bunch of address from one bitcoin daemon.

Where is seed and how to know what seed used from above?
newbie
Activity: 140
Merit: 0
May 04, 2018, 06:18:44 PM
#44
So then, how to pregenerate addresses like 100,000 numbers at once without click [Request payment] button in wallet program 100,000 times?

The easiest probably would be to use a small script to generate private-/public- keypairs.
It is important to pick a script (or better: write one yourself) with good entropy. Any bug/vulnerability/mistake in implementation could make your private keys 'guessable' and therefore unsafe.



And so this means, exchange generate whole address for users with exchange his own private key, exchange can access whole user's addresses?

Of course.

An (deposit-)address from an exchange is always in full control of the exchange itself.
You (as a customer) are depositing to the exchange. From this moment on the exchange is in control of your funds.
In return they give you 'credits' which match your deposited amount/crypto. Those are just assigned numbers in their database.

Only after withdrawing (after transaction got confirmed) you are in control of your cryptos again.

You are right on this. I made a transaction today to my exchange wallet and I noticed that the TXHash shows my transfer to the exchange wallet but under it I saw that the funds was actually moved from my exchange wallet to another wallet though, the funds actually showed in my wallet as balance. As I saw your post it now became clear to me. Thanks for that clarification.
jr. member
Activity: 30
Merit: 1
May 02, 2018, 02:12:56 PM
#43
There are 2 options:
1) RPC call to the daemon to generate new address (the wallet addresses are pre-generated in key pool) and each user_id own some addresses (see open source crypto-trading platforms source code in PHP).
2) (Not recommended) Each user has an unique ID and new addresses are generated via seed, so they are actually pre-generated and easy to recover if you now the seed. Then it goes like that:
[seed]-> [Purpose][Coin][Account][External / Internal][address id]

m/44'/0'/111'/0/1  -> Bitcoin address, user_id 112, second address
m/44'/145'/48271'/0/3  -> Bitcoin Cash address, user_id 48271, fourth address
m/49'/0'/54'/0/0  -> Bitcoin SegWit address, user_id 55, first address
legendary
Activity: 1624
Merit: 2481
May 02, 2018, 12:44:26 PM
#42
How to make this automatic monitoring and doing some commands part?

You can do this with the language you are most used to.
There are libaries available for the most commonly used languages.
You simply code the logic in your desired language and then use RPC calls via a libary.
jr. member
Activity: 413
Merit: 5
April 30, 2018, 09:22:17 AM
#41
  then you will need to build a small bot to periodically check the balances of the receiving addresses, and then make a payment to the wallet address
How to make this automatic monitoring and doing some commands part?
Using linux shell programming and event? Then how to get object of bitcoin daemon?
newbie
Activity: 168
Merit: 0
April 27, 2018, 05:55:34 PM
#40
How to apply this to alt-coin?

Depends of your altcoin (especially the address prefix, which is 0x00 for bitcoin). Change prefix, recompile, should work.

As for me how exchange make wallet address  This depends on what you're trying to do.  If you don't mind the multiple receiving addresses holding balances, then use some wallet software which will give you as many addresses as you need, and it will let you select which addresses you want to send from Online wallet: http://www.blockchain.info If you really actually want to sweep coins from the receiving addresses into wallet address (perhaps you keep the private key of the wallet address offline for security), then you will need to build a small bot to periodically check the balances of the receiving addresses, and then make a payment to the wallet address - I don't believe there is a strong wallet service that currently has this functionality at the moment, but I look forward to be corrected thank you.
jr. member
Activity: 413
Merit: 5
April 21, 2018, 04:23:11 AM
#39
Are you creating an exchange?

Huh

Please let us know what the name of your exchange will be.
Yes not myself alone, but making exchange is true.
Why?

Probably because he wants to make sure to never use your exchange.
Without offending you, but if you have to ask such basic questions i highly suspect your 'exchange' will be vulnerable to any kind of attacks.

DannyHamilton is one of the nice guys who ask you this question to never use your exchange.
But there are also another kind of people.. those who will definetely make use of your weak exchange to get a quick buck.

If you really want to open an exchange, i'd suggest you hire a professional team.
Of course I am not in charge about security, professional will involve soon.
This is just curiosity and learn.
legendary
Activity: 1624
Merit: 2481
April 21, 2018, 04:09:08 AM
#38
Are you creating an exchange?

Huh

Please let us know what the name of your exchange will be.
Yes not myself alone, but making exchange is true.
Why?

Probably because he wants to make sure to never use your exchange.
Without offending you, but if you have to ask such basic questions i highly suspect your 'exchange' will be vulnerable to any kind of attacks.

DannyHamilton is one of the nice guys who ask you this question to never use your exchange.
But there are also another kind of people.. those who will definetely make use of your weak exchange to get a quick buck.

If you really want to open an exchange, i'd suggest you hire a professional team.
jr. member
Activity: 413
Merit: 5
April 21, 2018, 01:33:41 AM
#37
How do you think this article? This says HD wallet's flaw?

https://bitcoinmagazine.com/articles/deterministic-wallets-advantages-flaw-1385450276/
sr. member
Activity: 518
Merit: 250
April 21, 2018, 12:43:42 AM
#36
So at exchanges, so many coins. For each of them, they provide deposit addresses.

If you are engineer, need to implement that, how to do?

Maybe using that coin's daemon?

How is specific procedure of it?

Thanks.
Depending on the specific currency, they will use different wallet and management methods. For example, with XMR coin, they use a Payment ID, with Bitcoin or other coin using the same algorithm they will use for Public key!
jr. member
Activity: 413
Merit: 5
April 20, 2018, 11:40:59 PM
#35
If a coin does not have HD feature, then you will have to go to the old way, i.e. pre generate lots of keys and addresses, and assign them to customers.

Actually, uses DOES need multiple addresses, most exchanges let the use generate new addresses as they want.

The point of HD is, you don't make bunch of address beforehand, you can generate new addresses on demand, but you neither store multiple private keys(only one master key), nor do you need to store keys in db, you just need to store the hd key path. When transactions are needed, you can always generate keys from the key path.
Thanks.
So what is HD key path?
and are there any  bad things to use old wallet? There are coins not having HD wallet listed on some exchange right?

And how about none-HD coin and just realtime generate when user request with coin daemon on server? Why this is dangerous?

jr. member
Activity: 413
Merit: 5
April 20, 2018, 11:24:08 PM
#34
And how to make like 1 million bitcoin addresses? I am running bitcoind at my server.

Are you creating an exchange?

Huh

Please let us know what the name of your exchange will be.
Yes not myself alone, but making exchange is true.
Why?
legendary
Activity: 3472
Merit: 4801
April 20, 2018, 08:47:43 PM
#33
And how to make like 1 million bitcoin addresses? I am running bitcoind at my server.

Are you creating an exchange?

Huh

Please let us know what the name of your exchange will be.
member
Activity: 61
Merit: 15
April 20, 2018, 10:06:23 AM
#32
For online bitcoin wallets, most exchanges will use HD(BIP32) wallets, it will generic the extended key offline, store the correspondent public key on the server, and it only needs to allocate an index number to each user, then new addresses can be generated on the fly whenever user requested a new address.
By using HD wallets, it is much easier to manager, because there is only one private key. Also it is much simple to operate, because each user can have as many new addresses as they want, technically 232-1 addresses, and no private key is needed to generate new addresses.
Then what if the alt-coins that does not have HD wallet features?

And most exchange just give 1 address for each coin per 1 user. And user also does not need more than 1 address. And it(multiple addresses per coin per user) only confuses and make it complicated to manage from point of view of exchange.

Are there any actual reason for give more than 1 address?

So point is, you saying about make bunch of addresses before (like 1 million addresses) and store them in DB?


If a coin does not have HD feature, then you will have to go to the old way, i.e. pre generate lots of keys and addresses, and assign them to customers.

Actually, uses DOES need multiple addresses, most exchanges let the use generate new addresses as they want.

The point of HD is, you don't make bunch of address beforehand, you can generate new addresses on demand, but you neither store multiple private keys(only one master key), nor do you need to store keys in db, you just need to store the hd key path. When transactions are needed, you can always generate keys from the key path.
legendary
Activity: 1624
Merit: 2481
April 20, 2018, 06:03:08 AM
#31
Why this is risky? (bump)

So user can try http injection attack to know wallet's secret key?
When user click that [generate address] button?


You don't have to store the private keys / seed on your online server just to create new addresses.
You could simply use the Master public key. Public keys (and therefore addresses) can be dervied from this key, without the risk of private keys getting exposed/compromised.




So point is, you saying about make bunch of addresses before (like 1 million addresses) and store them in DB?

This can definetely be done. It does not expose any private keys to theft.
jr. member
Activity: 413
Merit: 5
April 20, 2018, 01:43:59 AM
#30
And how to make like 1 million bitcoin addresses? I am running bitcoind at my server.

so there I can use [ bitcoin-cli getnewaddress ]

then how to do it?
jr. member
Activity: 413
Merit: 5
April 19, 2018, 07:16:22 PM
#29
For online bitcoin wallets, most exchanges will use HD(BIP32) wallets, it will generic the extended key offline, store the correspondent public key on the server, and it only needs to allocate an index number to each user, then new addresses can be generated on the fly whenever user requested a new address.
By using HD wallets, it is much easier to manager, because there is only one private key. Also it is much simple to operate, because each user can have as many new addresses as they want, technically 232-1 addresses, and no private key is needed to generate new addresses.
Then what if the alt-coins that does not have HD wallet features?

And most exchange just give 1 address for each coin per 1 user. And user also does not need more than 1 address. And it(multiple addresses per coin per user) only confuses and make it complicated to manage from point of view of exchange.

Are there any actual reason for give more than 1 address?

So point is, you saying about make bunch of addresses before (like 1 million addresses) and store them in DB?
member
Activity: 61
Merit: 15
April 19, 2018, 06:58:31 PM
#28
For online bitcoin wallets, most exchanges will use HD(BIP32) wallets, it will generic the extended key offline, store the correspondent public key on the server, and it only needs to allocate an index number to each user, then new addresses can be generated on the fly whenever user requested a new address.
By using HD wallets, it is much easier to manager, because there is only one private key. Also it is much simple to operate, because each user can have as many new addresses as they want, technically 232-1 addresses, and no private key is needed to generate new addresses.
Pages:
Jump to: