Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A flaw in creating commitment transaction if without Sendmany #3

Open
neocarmack opened this issue May 12, 2020 · 6 comments
Open

A flaw in creating commitment transaction if without Sendmany #3

neocarmack opened this issue May 12, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@neocarmack
Copy link
Member

neocarmack commented May 12, 2020

RSMC-C1a-RD1a

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.

@dexX7
Copy link

dexX7 commented May 20, 2020

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:

  1. In one transaction, there could be multiple sends of one specific token type (e.g. only USDT, but to more than one receiver)
  2. In one transaction, there could be multiple sends of multiple tokens (e.g. USDT and Maid in one transaction)

Further:

  1. The receiver address may be encoded within the payload and there wouldn't be an explicit output for each receiver
  2. Or there could be a new output for every receiver

Please let me know, what you need.

@neocarmack
Copy link
Member Author

Emm, i'm sure in this stage, one token to multiple receivers meets our requirment.

@dexX7
Copy link

dexX7 commented May 21, 2020

Awesome, thanks for the fast feedback!

Do you need explicit BTC outputs for each receiver?

@neocarmack
Copy link
Member Author

It will be better if we can have BTC outputs for receivers.

@neocarmack neocarmack self-assigned this Jun 18, 2020
@neocarmack neocarmack added the bug Something isn't working label Jun 18, 2020
@neocarmack
Copy link
Member Author

Initial Send-to-Many transaction format: https://gist.github.com/dexX7/1138fd1ea084a9db56798e9bce50d0ef

@dexX7
Copy link

dexX7 commented Nov 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants