<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2021-10-06T19:47:33.637Z
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.
Vizeet Srivastava
CC BY-SA 4.0
2021-10-06T20:02:50.180Z
Yes, when the multisig is funded, transaction fees have to be taken into account.
Ava Chow
CC BY-SA 4.0
2021-10-06T18:37:28.937Z
2021-10-06T18:37:28.937Z
Ava Chow
<p>Let's assume Alice and Bob creates a channel in which Alice locks her 100 mBTC.</p>
<blockquote>
<p>Alice 100mBTC and Bob 0 mBTC --------&gt;  2-of-2 contract</p>
</blockquote>
<p>Alice Pays Bob 30mBTC through this channel:</p>
<hr />
<pre><code>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
</code></pre>
<hr />
<p>And,</p>
<hr />
<pre><code>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
</code></pre>
<hr />
<p>Then Alice and Bob shares revocation key before sending sending next transaction.</p>
<p>Now Alice Pays Bob 10mBTC through this channel:</p>
<hr />
<pre><code>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
</code></pre>
<hr />
<p>And,</p>
<hr />
<pre><code>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
</code></pre>
<hr />
<p>Alice tries to cheat Bob by publishing the previous transaction which is:</p>
<hr />
<pre><code>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
</code></pre>
<hr />
<p>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.</p>
<p>Please help me understand what I am missing here.</p>

<lightning-network>
How can someone broadcast intermediate lightning transaction? Where the network fees come from?
Vizeet Srivastava
# How can someone broadcast intermediate lightning transaction? Where the network fees come from?

(Asked by: username_0 on 2021-10-06)

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.

**Tags:** lightning-network


---

## 1 answers

### Answer by username_1 on 2021-10-06. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: 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.  
> **username_1**: Yes, when the multisig is funded, transaction fees have to be taken into account.  

---

