Open neocarmack opened 4 years ago
Hello @neocarmack,
we want to add sendmany for quite a while, but we've never pinned down the specifics. We have limited payload space and there are multiple ways to approach this.
For example:
Further:
Please let me know, what you need.
Emm, i'm sure in this stage, one token to multiple receivers meets our requirment.
Awesome, thanks for the fast feedback!
Do you need explicit BTC outputs for each receiver?
It will be better if we can have BTC outputs for receivers.
Initial Send-to-Many transaction format: https://gist.github.com/dexX7/1138fd1ea084a9db56798e9bce50d0ef
Thanks for the reference @neocarmack. We're pretty close with releasing it, but ironing out the last details. Please feel free to hop into the comment section in the gist.
During creating C1a, there are two unbroadcast outputs constructed simutanously: 0.Alice2 & Bob 60, and 1. Bob 40. The output 0 sends 60 USDT to the multisig address Alice2 & Bob, while the output 1 sends 40 USDT to Bob's address.
Currently, omnicore does not support sendmany, so we have to construct two temporary transactions based on which the two outputs are created. Here comes the problem: If Alice broadcasts output 0 only, and just ignore the output 1, then Bob will never get his 40 USDT.
This flaw will not occur if we construct the two outputs by sendmany based on one parent transaction, so Alice is not able to just broadcast one of them.