Can the service providing the bitcoin wallet know how much value has the user loaded into his wallet?

2

Say for example I run an ecommerce website which mandates users to have a minimum balance of 1 bitcoin in their wallets to access the platform. In the event the balance in his wallet falls below 1 bitcoin he should not be able to access the platform and he should see a message on his screen saying "Please load to minimum balance".

So, the question is, can I, or the Bitcoin wallet provider I use, read the bitcoin balance of the users so as to fulfil the above business requirement?

Abhishek

Posted 2014-08-27T11:40:01.123

Reputation: 81

Are you hosting the wallets for them, so that only you have control of the private keys? If not, this requirement is impossible.Tim S. 2014-08-27T12:12:17.327

We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user.Abhishek 2014-08-27T12:24:48.660

So basically if i have got this correct this would meaan that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?Abhishek 2014-08-27T12:27:49.870

Answers

2

All Bitcoin transactions are publicly available. This is fundamentally why Bitcoin can work as a truly decentralized currency. Bitcoin is different from the traditional banking system specifically because anybody can see and validate everyone's transactions. If only a few could access the information about people's balance, then it wouldn't be fully decentralized, it would be just like traditional banking.

So yes, you can calculate the balance of any Bitcoin address in the network.

Luca Matteis

Posted 2014-08-27T11:40:01.123

Reputation: 4 784

1Yes you can calculate the balance of an address, but you can't really know that it belongs to that user. Even if you require a signed message, you don't know if it's the user or if they asked for/paid for someone else to sign the message for them.Tim S. 2014-08-27T12:13:28.933

We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user. –
So basically if i have got this correct this would mean that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?
Abhishek 2014-08-27T12:31:02.347

@Abhishek exactly.Luca Matteis 2014-08-27T12:48:46.000

okay thanks. just one last question, will the same logic be applicable to deterministic wallets with multiple public addressees too?Abhishek 2014-08-27T16:28:48.103

0

The service provider can know the balance of the wallet, if the wallet is "hosted" one.

The service provider must know all the addresses associated with the wallet (this is pretty much the definition of a Bitcoin wallet in the first place). However, you do not need to know private keys needed to send out Bitcoins from the wallet, you can have "read-only" knowledge about the wallet.

However from your service it sounds like you are already using hosted wallets, so finding out the balance of the wallet should be just summing up unspent balance on the public addresses of the user wallet.

Mikko Ohtamaa

Posted 2014-08-27T11:40:01.123

Reputation: 2 417

We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user. –
So basically if i have got this correct this would mean that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?
Abhishek 2014-08-27T12:29:35.167

0

I think there is some general confusion as to what a wallet is, and how you interface with one. I'll try to be detailed but not too nitty-gritty.

A wallet is really two connected things. First it is a collection of private/public keypairs. In the case of standard addresses (P2PKH) each public/private keypair matches to 2 distinct Bitcoin addresses. This is because you can derive two addresses from the keypair because there is a compressed and uncompressed representation.

In the case of multi-signature the address is constructed based on all of the public keys involved in the transaction. This can create many addresses that represent the same keypairs or combinations thereof.

Based on the comment above you want to run a site that does 2ofN multisignature. Which means you control one of the keys at least, this means that your wallet is a collection of addresses that you have partial control of. At any time you can sum the balance of every address you mutually control with the user and come up with a total balance.

So, the answer is yes, you can contact the user when the balance falls below a certain amount since you have total knowledge of all keys that the user is using since you are party to them. This lets you compute based on the public ledgers information. This is also true for HD wallets / Keys so long as you compute a collection of multisig addresses derived from the HD keys.

Matt

Posted 2014-08-27T11:40:01.123

Reputation: 520