0

I'm working on a pseudo-centralized product that manages users wallets, protected by multi-signature verification.

I want to know if it is possible for me to batch about 50-100 transactions from various accounts to other accounts, and send them to other accounts but pay the least amount of fees.

For example, in a 1 minute period, there are 5 users sending transactions. Can I pay the fee from my account, while allowing the users to make their transactions.

Accounts/UTXO example:

A -> Z

B -> Y

C -> X

D -> W

E -> V

Pay with ADA from my account F.

How would I handle having each user sign the transaction including me for the fee? How would I even calculate that fee?

Thank you

1 Answer 1

0

If I understand correctly, what you are trying to achieve is:

  • User A indicates that he wants to send VAL1 to Z. Transaction TX1 is created to implement the transfer, and user A signs it.
  • User B indicates that he wants to send VAL2 to Y. Transaction TX2 is created to implement the transfer and includes TX1 inputs and outputs and user B signs the transaction.
  • ...
  • User E indicates that he wants to send VAL5 to V. Transaction TX5 is created including TX4 inputs and outputs, to implement the transfer, and user E signs the transaction.

This is not possible. The reason being after a transaction has been signed,the witness is only valid for this exact transaction, as it includes transaction's body hash. If you add an input or output that hash will change and the witness won't be valid for the transaction anymore.


What is possible instead :

  • User A indicates that he wants to send VAL1 to Z, he gets a loading screen 1.
  • User B indicates that he wants to send VAL2 to Y, he gets a loading screen 1.
  • ...
  • User E indicates that he wants to send VAL5 to V, he gets a loading screen 1.
  • You create the transaction TX with every needed inputs/outputs, calculate tx fees, and divide it among users A...E weighted by VAL1...VAL5 for instance.
  • Loading screen 1 over for every users , users A...E sign TX, then get a loading screen 2.
  • When everybody has signed, loading screen 2 over, then you submit TX, and show a loading screen 3 until TX has been confirmed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.