Request: built in multi-send in counterwallet

So while, building a service for counterparty recently, iv come into an interesting problem.


Basically, if I have a service that does something with counterparty assets, I need to charge some sort of fee. One reason being for revenue obviously, and also because of the need to pay miner transaction fees, which can be a bit more expensive with counterparty. Fees must be in BTC, plus doesnt make sense to take a fee in terms of % of the asset being sent (end up having a ton of random worthless tokens).


The solution right now is just to have the user send 2 transactions, one with the asset and one with the BTC fee. Not really a huge deal, but one thing that could make it a lot more convienient for people would be to have a "multi-send" feature built into the wallet. So basically, in the dialogue box for sending a transaction, you would be able to choose multiple assets and amounts of BTC or XCP to send to the same address at the same time. These would probably still need to technically be seperate transactions, but it could still be automated from the users end.


thoughts?

[quote author=cryptonaut link=topic=383.msg2594#msg2594 date=1402376205]
Fees must be in BTC, plus doesnt make sense to take a fee in terms of % of the asset being sent (end up having a ton of random worthless tokens).

thoughts?
[/quote]

Don’t tell your users that  ;D

Just to confirm, do you require the user to sent their token and then as a second transaction, send the BTC as a fee? Can the user send their token and BTC to the same destination address?

If the above two questions are true then I would direct this question at Adam and Robby:

- Is it possible to accommodate in the protocol control of the BTC output address in the TX in which the Counterparty send is encoded such that the BTC sent to that output address can be controlled? This would allow a simultaneous send of a Counterparty asset + BTC to the destination address? This would still comply to the Counterparty protocol.

cf an example of a send of a Counterparty asset from:

13VGRb2nP8VazMpphRGSx5oJcWTWTZjvyd
to
12eD2R8iCgwcxokmoXAffodTneNzNAdmKR

https://blockchain.info/tx/00a26f070e11fdb84f67e4f05af82d28edce3d973fea3ca071b2e5729957d14b

(in my example, 0.0001086 BTC sent to 12eD2R8iCgwcxokmoXAffodTneNzNAdmKR could be any arbitrary amount > dust)

[quote author=Global_trade_repo link=topic=383.msg2595#msg2595 date=1402385217]
[quote author=cryptonaut link=topic=383.msg2594#msg2594 date=1402376205]
Fees must be in BTC, plus doesnt make sense to take a fee in terms of % of the asset being sent (end up having a ton of random worthless tokens).

thoughts?
[/quote]

Don’t tell your users that  ;D

Just to confirm, do you require the user to sent their token and then as a second transaction, send the BTC as a fee? Can the user send their token and BTC to the same destination address?

If the above two questions are true then I would direct this question at Adam and Robby:

- Is it possible to accommodate in the protocol control of the BTC output address in the TX in which the Counterparty send is encoded such that the BTC sent to that output address can be controlled? This would allow a simultaneous send of a Counterparty asset + BTC to the destination address? This would still comply to the Counterparty protocol.

cf an example of a send of a Counterparty asset from:

13VGRb2nP8VazMpphRGSx5oJcWTWTZjvyd
to
12eD2R8iCgwcxokmoXAffodTneNzNAdmKR

https://blockchain.info/tx/00a26f070e11fdb84f67e4f05af82d28edce3d973fea3ca071b2e5729957d14b

(in my example, 0.0001086 BTC sent to 12eD2R8iCgwcxokmoXAffodTneNzNAdmKR could be any arbitrary amount > dust)
[/quote]


heheh, not all tokens will be worthless of course, but nothing to stop somebody from feeding my system a ton of newly made MCDONALDS tokens (or something) and then draining my account with transaction fees.


Yes, they would go to the same address. Right now I have it so it just gives you a single payment address, then it monitors that address for both the correct # of asset tokens, and also for the BTC fee. Requires 2 transactions, but they both go to same place.


Im not really sure if its possible at all to send multiple asset types + btc in a single transaction. Might not really need to be a protocol change, more just a user interface change allowing you to setup multiple payments to one address at the same time.  It can maybe be a built in API command which uses this script: https://wiki.counterparty.co/w/Sendmany (im also using this script for what im doing, seems to work well).

[quote author=Global_trade_repo link=topic=383.msg2595#msg2595 date=1402385217]
- Is it possible to accommodate in the protocol control of the BTC output address in the TX in which the Counterparty send is encoded such that the BTC sent to that output address can be controlled? This would allow a simultaneous send of a Counterparty asset + BTC to the destination address? This would still comply to the Counterparty protocol.
[/quote]

Working on this…

[quote author=PhantomPhreak link=topic=383.msg2607#msg2607 date=1402420682]
[quote author=Global_trade_repo link=topic=383.msg2595#msg2595 date=1402385217]
- Is it possible to accommodate in the protocol control of the BTC output address in the TX in which the Counterparty send is encoded such that the BTC sent to that output address can be controlled? This would allow a simultaneous send of a Counterparty asset + BTC to the destination address? This would still comply to the Counterparty protocol.
[/quote]

Working on this…
[/quote]


awesome!

[quote author=PhantomPhreak link=topic=383.msg2607#msg2607 date=1402420682]
Working on this…
[/quote]

Would love details. I was talking to Vennd about multi-asset single transactions recently (something I was thinking of trying to develop with vennd+counterparty).



[quote author=sull link=topic=383.msg2781#msg2781 date=1404361349]
[quote author=PhantomPhreak link=topic=383.msg2607#msg2607 date=1402420682]
Working on this…
[/quote]

Would love details. I was talking to Vennd about multi-asset single transactions recently (something I was thinking of trying to develop with vennd+counterparty).
[/quote]

What I ended up doing was writing this script, which makes creating lots of cheap send transactions very straightforward.

thanks. if you are able to talk to me about the concept in more depth privately… sulleleven on gmail.

cheers.
sull

this site is not loading - https://wiki.counterparty.co/w/Sendmany

Here is an updated link: https://github.com/CounterpartyXCP/CommunityWiki/wiki/sendmany:-script-for-bulk-Counterparty-asset-sending

thanks