[REQ] Send-to-Many in a single tx

Hey all,
For many of my uses for Counterparty, I have large distributions of tokens that need to go out all at once.

For example, we intend to send small amounts of tokens to people who comment on stories, tip content creators, etc.  It seems likely we will be sending tokens to thousands of people daily if we are success, and right now that means sending a unique transaction to each person.


Assuming 1000 recipients per day with a tx fee of .0001btc, that would be 3btc per month in tx fees alone, and it scales linearly which is to say gets more expensive the more inclusive and successful we are.  It would be great if we could do these mass distributions in a single transaction as Dividends allow us to do.  Xnova indicated it is possible, so I wanted to bring it up.

[quote author=AdamBLevine link=topic=281.msg2022#msg2022 date=1398023951]
Hey all,
For many of my uses for Counterparty, I have large distributions of tokens that need to go out all at once.

For example, we intend to send small amounts of tokens to people who comment on stories, tip content creators, etc.  It seems likely we will be sending tokens to thousands of people daily if we are success, and right now that means sending a unique transaction to each person.


Assuming 1000 recipients per day with a tx fee of .0001btc, that would be 3btc per month in tx fees alone, and it scales linearly which is to say gets more expensive the more inclusive and successful we are.  It would be great if we could do these mass distributions in a single transaction as Dividends allow us to do.  Xnova indicated it is possible, so I wanted to bring it up.
[/quote]

It would be a major protocol level change to allow sending to multiple addresses in the same transaction, and, moreover, it wouldn’t reduce the fees that effectively, since the size of the fee is roughly proportional to the amount of data in the transaction, which itself would depend on the number of recipients you include in the send.

Counterparty transactions have their specific fee to ensure that they get into the blockchain in the next block, but if the timeframe is not very important, then your transactions can have lower fees. And if you are doing 1000 sends a day, you’re going to use a script, not a web GUI, in which case we can give you a patched version of Counterpartyd, which reduces the fees provided per transaction (this is possible because all of your transactions are independent of each other).

This is a very interesting use-case that is also relevant to our business needs, as well.

Please consider that we’d like to learn more about whatever options you proceed to use as we may have this constraint as well.

[quote author=cityglut link=topic=281.msg2030#msg2030 date=1398103374]
[quote author=AdamBLevine link=topic=281.msg2022#msg2022 date=1398023951]
Hey all,
For many of my uses for Counterparty, I have large distributions of tokens that need to go out all at once.

For example, we intend to send small amounts of tokens to people who comment on stories, tip content creators, etc.  It seems likely we will be sending tokens to thousands of people daily if we are success, and right now that means sending a unique transaction to each person.


Assuming 1000 recipients per day with a tx fee of .0001btc, that would be 3btc per month in tx fees alone, and it scales linearly which is to say gets more expensive the more inclusive and successful we are.  It would be great if we could do these mass distributions in a single transaction as Dividends allow us to do.  Xnova indicated it is possible, so I wanted to bring it up.
[/quote]

It would be a major protocol level change to allow sending to multiple addresses in the same transaction, and, moreover, it wouldn’t reduce the fees that effectively, since the size of the fee is roughly proportional to the amount of data in the transaction, which itself would depend on the number of recipients you include in the send.

Counterparty transactions have their specific fee to ensure that they get into the blockchain in the next block, but if the timeframe is not very important, then your transactions can have lower fees. And if you are doing 1000 sends a day, you’re going to use a script, not a web GUI, in which case we can give you a patched version of Counterpartyd, which reduces the fees provided per transaction (this is possible because all of your transactions are independent of each other).
[/quote]

I’m not sure if i follow your logic. If it’s possible to send to 1000 addresses from a script it should be possible to represent the script in a Web UI. Upload a JSON file or CSV file if you really want to make it easy.

What’s involved with patching counterpartyd? Can the fee not be made into a user-adjustable option?

[quote author=TeamAmerica link=topic=281.msg2033#msg2033 date=1398118518]
[quote author=cityglut link=topic=281.msg2030#msg2030 date=1398103374]
[quote author=AdamBLevine link=topic=281.msg2022#msg2022 date=1398023951]
Hey all,
For many of my uses for Counterparty, I have large distributions of tokens that need to go out all at once.

For example, we intend to send small amounts of tokens to people who comment on stories, tip content creators, etc.  It seems likely we will be sending tokens to thousands of people daily if we are success, and right now that means sending a unique transaction to each person.


Assuming 1000 recipients per day with a tx fee of .0001btc, that would be 3btc per month in tx fees alone, and it scales linearly which is to say gets more expensive the more inclusive and successful we are.  It would be great if we could do these mass distributions in a single transaction as Dividends allow us to do.  Xnova indicated it is possible, so I wanted to bring it up.
[/quote]

It would be a major protocol level change to allow sending to multiple addresses in the same transaction, and, moreover, it wouldn’t reduce the fees that effectively, since the size of the fee is roughly proportional to the amount of data in the transaction, which itself would depend on the number of recipients you include in the send.

Counterparty transactions have their specific fee to ensure that they get into the blockchain in the next block, but if the timeframe is not very important, then your transactions can have lower fees. And if you are doing 1000 sends a day, you’re going to use a script, not a web GUI, in which case we can give you a patched version of Counterpartyd, which reduces the fees provided per transaction (this is possible because all of your transactions are independent of each other).
[/quote]

I’m not sure if i follow your logic. If it’s possible to send to 1000 addresses from a script it should be possible to represent the script in a Web UI. Upload a JSON file or CSV file if you really want to make it easy.

What’s involved with patching counterpartyd? Can the fee not be made into a user-adjustable option?
[/quote]

I’ll add a CLI option, and API parameter, to specify fees exactly. Then no patch will be necessary.

ColoredCoins recently announced their new API which supports the sending of assets to many recepients.
http://coloredcoins.org/documentation/#sendAsset

Any updates to implement same feature in Counterparty?

After Adam asked this question, he had a team build it. It has been out now for a year, check out how it works:

https://www.youtube.com/watch?v=vXpWEH5mS2o

1 Like

Damn, that’s impressive!
I had no idea LetsTalkBitcoin.com implemented this.

0.01542 over 257 is 0.00006 BTC per transaction. Not bad!

email me adam@letstalkbitcoin.com if you want to use it. We’re going to be offering it as a service as soon as we get around to building a front-end for it, right now its low priority but coming up.

If you want to use it before the retail version is out just let us know.

oh yeah, we would not have been able to scale foldingcoin without adam and his team doing this. @cryptonaut @deweller and @AdamBLevine have a whole suite of other tools to that help Counterparty, check out swapbot:

https://letstalkbitcoin.com/services

Yup :slight_smile: http://blockscan.com/charts_transaction_all <- pretty much every big transaction spike on there is from LTB distributing LTBCOIN and Foldingcoin distributing FLDC through our system

1 Like

Thanks Adam!

I don’t have my own service or token yet, but I’m considering it and because of that I’m closely following projects your team is working on. Great stuff!

What I see in this video is a generating of multiple transactions for a very high total cost. This is absolutely unacceptable for our needs.

ColoredCoins API allows to create a one single transaction with several destination addresses. That’s the feature we want to see in Counterparty API. And basically it’s a question for Counterparty - is there any chance for us to see this feature in the nearest future?


Unfortunately, there have been no updates for a while…
So, I guess I already know the answer.

You see us solving the problem for our own purposes because we needed a solution.

We’ve found that in practice there are tradeoffs no matter what approach you take. Colored Coins for example when sent to an address that does not understand colored coins results in the wallet just sending out the tokens because it can’t tell the difference between a colored utxo compared to an uncolored one.

Counterparty never has this problem, tokens sent to an address that does not understand them simply sit there until the private key is recovered into a wallet that does. Fundamentally there are several differences like this between Colored Coins vs Account Balance based approaches.

I wouldn’t expect this feature make it into the protocol, it’s pretty at odds with account based systems. Once Dogeparty is rolling that’ll offer the same featureset with less secure and less expensive transactions and if you think Colored Coins are a better ecosystem to operate in for now, by all means explore your options.

We picked counterparty as our platform to develop on because it was ready and fit the needs. So far that hasn’t been a bad choice.

Also in the OP I talked about daily distributions, LTB moved to Weekly distributions (every saturday) shortly after launch last year.

This feature request is a question for the core devs that they (or maybe the Foundation directors) could answer.
I find it unfair that you’re criticizing a 3rd party project for a feature that’s not implemented in the platform.

1 Like

I’m very sorry if my words were rude. I didn’t want to criticize, I’m sure it can be very useful for those who needs it. I just meant that this way of multiple sending does not suit our requirements.

I’m not the first who asks about this feature and not the last one, I think. I hope someone will hear.

Interesting thread. If I understood correctly, this is the conclusion:

  1. It’s impossible to include several recipients in one Counterparty transaction. If you have 100 recipients, you need to make 100 transactions.

  2. LTB has a tool that automates all this. Therefore #1 is just a technicality; it does not matter in terms of user experience except the fees are somewhat higher.

I looked into LTBCOIN’s mass send and noticed each send has a 0.1 mBTC fee. That’s 3 cents or $3 per one hundred recipients. I’ve experimented with 0.01 mBTC fees and it works just fine. Is there a technical reason LTB pays 10x more or do they do it to be a good “Bitcoin citizen”?

Eventually I believe it can be cheaper with smart contracts. One, you upload a contract with an array of recipients. Two, you top up the contract. Three, for every send you tell the contract how much each recipient shall receive. This would take much less data (lower tx fees) but require some gas.

Today there;s actually one situation where mass sending is very cheap; dividend. It makes sense to use only if each recipient gets a proportional share to existing holding.

Just want to add that this was for broadcasts. I’ve not tested with sends.

No worries, it wasn’t rude and sorry if my comment sounded too strong.

Yes, the directors read the forums. @FoldingCoin can you ask the Foundation for a official response or this feature (and also this, since we’re already asking)?
Personally I’d like to see this feature myself as well, but also in more generic terms, a little bit more detail about overall plans.

I wonder if there’s a mechanism (or if there should be) that would allow interested parties to organize development or maybe bounty-raising for new features.

I know not all transactions are the same, but to a certain extent platform users can estimate who would benefit how much for this feature (i.e. monthly savings from spending 80% less on transactions) so with such analysis tokens would kind of know how much they could contribute (and individuals such as myself could chip in separately). Just an idea. I hope the Foundation can look into doing more work of this kind.