How to best structure Internal bitcoin payments within a webapp?

3

I'm building out a pet project webapp called CollaboTree, a big part of it is allowing users to set bounties for completing/collaborating on little bits of work. I'd like these micro payments to be as cheap/free as possible, and fast (instant?) would be good.

Would it make sense to:

  • Make a wallet for every user on signup, and make all internal payments go onto the blockchain between real wallets

  • allow users to load/unload bitcoin onto their accounts to some kind of shared wallet which only the app has access to, then maintain a balance for each user in database letting them transfer among themselves instantly outside of the blockchain, then letting them get their coins back 'live' when needed

  • Have one big wallet for the entire app, with each user having their own address which is the only one they can spend from or something?

dangerous.beans

Posted 2014-09-13T02:59:24.783

Reputation: 131

Answers

1

The Block.io api supports accounts for similar usage.

With Block.io, you can create wallet addresses for users inside your games, auction sites, stores, etc.

To create a user's wallet on your account, create addresses for them using get_new_address. You should specify a sequence of labels for that user. For instance, if we wish to create a number of addresses for User A, we'd want to call get_new_address with label=userAx{address_number} as many times as wish to create a new address for User A.

Once we have addresses for User A, we can query balances for their addresses, and send coins on the user's behalf.

siliconsys

Posted 2014-09-13T02:59:24.783

Reputation: 96