2

Let's assume Alice and Bob creates a channel in which Alice locks her 100 mBTC.

Alice 100mBTC and Bob 0 mBTC --------> 2-of-2 contract

Alice Pays Bob 30mBTC through this channel:


Alice Commitment Txn:

Input: 
 - Contract 
 - Alice Signature
 - Bob Signature

Output: 
 - 70 mBTC (Alice's Balance)
 - - If revocation key then pay to Bob's Pubkey.
 - - Else Alice can pay herself after one day.
 - 30 mBTC (Bob's balance)
 - - Pay to Bob's pubkey

And,


Bob's Commitment Transaction:

Input: 
 - Contract 
 - Alice Signature
 - Bob Signature

Output: 
 - 30 mBTC (Bob's Balance)
 - - If revocation key then pay to Alice's Pubkey.
 - - Else Bob can pay herself after one day.
 - 70 mBTC (Alice's balance)
 - - Pay to Alice's pubkey

Then Alice and Bob shares revocation key before sending sending next transaction.

Now Alice Pays Bob 10mBTC through this channel:


Alice Commitment Txn:

Input: 
 - Contract 
 - Alice Signature
 - Bob Signature

Output: 
 - 60 mBTC (Alice's Balance)
 - - If revocation key then pay to Bob's Pubkey.
 - - Else Alice can pay herself after one day.
 - 40 mBTC (Bob's balance)
 - - Pay to Bob's pubkey

And,


Bob's Commitment Transaction:

Input: 
 - Contract 
 - Alice Signature
 - Bob Signature

Output: 
 - 40 mBTC (Bob's Balance)
 - - If revocation key then pay to Alice's Pubkey.
 - - Else Bob can pay herself after one day.
 - 60 mBTC (Alice's balance)
 - - Pay to Alice's pubkey

Alice tries to cheat Bob by publishing the previous transaction which is:


Alice Commitment Txn:

Input: 
 - Contract 
 - Alice Signature
 - Bob Signature

Output: 
 - 70 mBTC (Alice's Balance)
 - - If revocation key then pay to Bob's Pubkey.
 - - Else Alice can pay herself after one day.
 - 30 mBTC (Bob's balance)
 - - Pay to Bob's pubkey

I am not able to understand how can Alice publish the transaction because there is no network transaction fee for confirming the transaction on Bitcoin Blockchain.

Please help me understand what I am missing here.

1 Answer 1

2

The transaction does have a fee and that is negotiated prior to the channel being opened. The participants will determine the feerate to set on the commitment transactions before the transactions are created. Thus every commitment transaction contains a transaction fee and could be sent to the network.

This is required in the case of a unilateral close. A unilateral close has one participant broadcast the latest commitment transaction. Since that commitment transaction must be able to confirm, it must pay a transaction fee. Fees can only be set at the time the commitment is created, and that is what is done.

2
  • Does this mean when we create 2-of-2-multisig-contract we include transaction fee as well? So the funding contract has something like 101mBTC instead of 100mBTC. Oct 6, 2021 at 19:47
  • Yes, when the multisig is funded, transaction fees have to be taken into account.
    – Andrew Chow
    Oct 6, 2021 at 20:02

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.