<p>I am sorry to write so but your understanding that the lightning network is a side chain is wrong. Thus there is not transaction with many inputs and outputs that represents the payments tat go on in the lightning network. </p>

<p>A payment channel is encoded as a 2-2 multisig wallet. you have one key and I have one key. The capacity of the channel are the funds sent to this multisig wallet with the funding transaction. The balance in this payment channel is encoded by a commitment transaction which spends this funding transaction. This transaction has one input (the funding tx) and two outputs (one for the amount of funds that you own and one for the amounts of funds that I own). (There can and will be more outputs but those exist only temporarily while this channel is being used to rout a payment.)</p>

<p>The commitment transaction only hits the chain if the channel is closed and in the best case still has two outputs. Meanwhile on this channel literally million of payments could have taken place (between the peers of the channel, and to route payments through this channel for other nodes of the network) non of those payments will be seen in the blockchain. </p>

<p>The key observation of the lightning network is the revocable sequence maturity contract (RSMC) which is the protocol that allows to invalidate or revoke old commitment transaction by creating a strong incentive (I should better say penalty) to not publish an outdate commitment transaction. </p>

<p>since all the commitment transactions in the history of the payment channel are spending the fundingding transaction (creating massive double spends) and since double spends will not be accepted by the bitcoin network you can see that the blockchain will not save old channel state. This is exactly the reason who scaling through this offchain protocol is achieved.</p>

CC BY-SA 4.0
2019-08-01T13:39:32.767Z
No problem! i am pleased and thankful that you would answer my question in that depth of explanation! but that means when the channel is closed , The net transaction result by the peers in the channel will still be published in the blockchain right?
nicholas___
CC BY-SA 4.0
2019-08-01T13:43:31.843Z
yes the net transaction by these two peers (which might have come from routing in the sense that these peers never actually paid each other but moved funds from another channel to that channel. As channels have different life times I am rather confident that it will be hard to calculate back which amounts really have been transacted between whom as a net sum)
Rene Pickhardt
CC BY-SA 4.0
2019-08-01T13:45:42.650Z
Awesome, i understand it better now thanks to you!
Do you by any chance have an example of a transaction that appear in blockchain info? 
and so does this also means as "an outsider" there will be no particular factor that differentiate this transaction from a normal transaction with 1 input and 2 outputs ?
nicholas___
CC BY-SA 4.0
2019-08-01T13:56:40.363Z
yes from the blockchain itself you cannot reliably detect former payment channels. you can find transactions easily by looking at the gossip protocol of the lightning network. channels have a short channel id which is blockheigt - transactions index - ouptut index. Check these two transactions for example: opening of the channel: c0ac6cfe15e0d0c921362ab9fad998a8a8e16cd8d9d4159487dd69141ea2b9b0 and the channel was force closed a couple minutes later due to an implementation bug e32135315ec147bb27f771b2e15c7178ea573afd16cd4970bf814c9b18bc46e3
Rene Pickhardt
CC BY-SA 4.0
2019-08-01T19:13:35.700Z
but in your example the channel created another multisig address for the time that the channel is activated. is that always the case ? or there could be a case where the channel just creates one transaction ? (with the first transaction input as input and the second transaction output as output) @Rene
nicholas___
CC BY-SA 4.0
2019-08-01T13:31:54.950Z
2019-08-01T13:31:54.950Z
Rene Pickhardt
<p>from my understanding lightning network is a side chain that keeps track all the transactions in the network and just send the sum of the transaction to each of their respective recipients. form that logic, there should still be a transaction data appear in blockchain info with a lot of inputs and a lot of outputs in the actual blockchain right representing all the transaction appear in the lightning netowork? if so can you give me an example of that by the tx_hash or link please? 
thanks</p>

<lightning-network>
how does lightning network transactions appear?
nicholas___
# how does lightning network transactions appear?

(Asked by: username_0 on 2019-08-01)

from my understanding lightning network is a side chain that keeps track all the transactions in the network and just send the sum of the transaction to each of their respective recipients. form that logic, there should still be a transaction data appear in blockchain info with a lot of inputs and a lot of outputs in the actual blockchain right representing all the transaction appear in the lightning netowork? if so can you give me an example of that by the tx\_hash or link please?
thanks

**Tags:** lightning-network


---

## 1 answers

### Answer by username_1 on 2019-08-01. Score: 3 | Accepted answer

I am sorry to write so but your understanding that the lightning network is a side chain is wrong. Thus there is not transaction with many inputs and outputs that represents the payments tat go on in the lightning network.

A payment channel is encoded as a 2-2 multisig wallet. you have one key and I have one key. The capacity of the channel are the funds sent to this multisig wallet with the funding transaction. The balance in this payment channel is encoded by a commitment transaction which spends this funding transaction. This transaction has one input (the funding tx) and two outputs (one for the amount of funds that you own and one for the amounts of funds that I own). (There can and will be more outputs but those exist only temporarily while this channel is being used to rout a payment.)

The commitment transaction only hits the chain if the channel is closed and in the best case still has two outputs. Meanwhile on this channel literally million of payments could have taken place (between the peers of the channel, and to route payments through this channel for other nodes of the network) non of those payments will be seen in the blockchain.

The key observation of the lightning network is the revocable sequence maturity contract (RSMC) which is the protocol that allows to invalidate or revoke old commitment transaction by creating a strong incentive (I should better say penalty) to not publish an outdate commitment transaction.

since all the commitment transactions in the history of the payment channel are spending the fundingding transaction (creating massive double spends) and since double spends will not be accepted by the bitcoin network you can see that the blockchain will not save old channel state. This is exactly the reason who scaling through this offchain protocol is achieved.

> **Comments:**
> **username_0**: No problem! i am pleased and thankful that you would answer my question in that depth of explanation! but that means when the channel is closed , The net transaction result by the peers in the channel will still be published in the blockchain right?  
> **username_1**: yes the net transaction by these two peers (which might have come from routing in the sense that these peers never actually paid each other but moved funds from another channel to that channel. As channels have different life times I am rather confident that it will be hard to calculate back which amounts really have been transacted between whom as a net sum)  
> **username_0**: Awesome, i understand it better now thanks to you! Do you by any chance have an example of a transaction that appear in blockchain info?  and so does this also means as "an outsider" there will be no particular factor that differentiate this transaction from a normal transaction with 1 input and 2 outputs ?  
> **username_1**: yes from the blockchain itself you cannot reliably detect former payment channels. you can find transactions easily by looking at the gossip protocol of the lightning network. channels have a short channel id which is blockheigt - transactions index - ouptut index. Check these two transactions for example: opening of the channel: c0ac6cfe15e0d0c921362ab9fad998a8a8e16cd8d9d4159487dd69141ea2b9b0 and the channel was force closed a couple minutes later due to an implementation bug e32135315ec147bb27f771b2e15c7178ea573afd16cd4970bf814c9b18bc46e3  
> **username_0**: but in your example the channel created another multisig address for the time that the channel is activated. is that always the case ? or there could be a case where the channel just creates one transaction ? (with the first transaction input as input and the second transaction output as output) @username_1  

---

