Bitcoin Forum
June 24, 2024, 10:32:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to send multiple payments without waiting for change?  (Read 640 times)
throwaway084575 (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
June 09, 2014, 03:03:53 PM
 #1

So we are building a web app and want people to be able to withdrawal their bitcoins when ever they want as fast as possible. But how do other services deal with multiple people requesting a payout when 1 payout has to wait for a confirmation to get the change back to send the next payment?

Im guessing that createrawtransaction can spend from a given input so that the rest can stay put for another transaction but how can one automate this?

Is there an open source hot wallet software that deals with these issues?

Something that has an API so our app can talk to it and control it?

I noticed blockchain.info has a sendmany method in their API but yeah 3rd party issues.
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4200
Merit: 8441



View Profile WWW
June 09, 2014, 05:42:43 PM
 #2

First and foremost, use sendmany.— I don't understand why you're bringing up bc.i.

Technically you can spend unconfirmed outputs, but it's advisable to avoid it.

For high throughput environments you should also avoid merging your coins beyond the amounts you'll be paying where you can, so that you'll have more outputs to spend.
throwaway084575 (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
June 11, 2014, 04:18:23 PM
 #3

Thanks for your great advice gmaxwell and thanks for all your amazing work on bitcoin, especially the coinjoin stuff, amazing. 

So the problem is people may randomly ask for withdrawals and sendmany will mean we send out in batches through some type of cron.

When you say that it is advisable to avoid spending unconfirmed outputs, What can go wrong?

We hope to have a higher throughput eventually so to avoid merging coins like you advise is there a function or setting in bitcoin core? which software would be best used as a hotwallet?

Rannasha
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


View Profile
June 12, 2014, 05:38:28 AM
 #4

Thanks for your great advice gmaxwell and thanks for all your amazing work on bitcoin, especially the coinjoin stuff, amazing. 

So the problem is people may randomly ask for withdrawals and sendmany will mean we send out in batches through some type of cron.

When you say that it is advisable to avoid spending unconfirmed outputs, What can go wrong?

We hope to have a higher throughput eventually so to avoid merging coins like you advise is there a function or setting in bitcoin core? which software would be best used as a hotwallet?

The problem with spending unconfirmed outputs is transaction malleability. If the txid of the first transaction in a chain is changed, all transactions that use outputs from this first transaction become invalid.

If you want to avoid sending withdrawals in batches, you could look into splitting large outputs (such as transfers from a cold wallet) into several smaller ones periodically. That way a single small withdrawal doesn't lock too many coins in an unconfirmed change output.
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!