<p>A funding transaction is one where some money is paid into a P2WSH transaction output, where the <code>redeeemScript</code> is a 2-of-2 multisig between the two participants. No other information is provided.</p>

<p>Technically, even the <code>redeemScript</code> for the funding is not revealed until the funding transaction output is spent (channel closed), which makes it less obvious that the unspent output is even a channel. Private channels are not known to be channels, and even when closed, are indistinguishable from any other kind of 2-of-2 multisig transaction.</p>

<p>For public channels, however, the <code>redeemScript</code> can be recreated from information published over Lightning's gossip network, making it possible for network participants to discover which transactions are public channel funding transactions.</p>

<p>There is no information regarding balances. The single funding transaction output has an amount representing the entire channel capacity. This is all that is known to anybody but the two channel participants.</p>

<p>The way channel opening works is that both parties create asymmetric initial commitment transactions, which spend the funding transaction with their previously agreed upon balances. This happens <strong>before</strong> the initiator reveals or broadcasts the funding transaction. The initiator creates (but doesn't broadcast) the funding transaction and only transmits its transaction id and output index to the other party. This information is sufficient for both parties to create their initial commitments which spend it, and to sign those commitments, but not sufficient for the other party to broadcast the transaction and lock up the funds before the commitments have been agreed. Once both parties have signed, the initiator then broadcasts the funding transaction and the channel is considered opened after it reaches the minimum confirmation depth.</p>

<p>It <em>may</em> be possible to determine channel closing balances based on the transaction which spends the funding output.</p>

CC BY-SA 4.0
2019-09-19T05:51:22.200Z
Private channels might be deteced when closed if the node also operates public channels as the outputs get mixed also in the case of a force close pending htlcs in the commitment transaction are a strong indicator. AFAIK there is no implementation that does a good job of focusing on keeping your private channels private by separating outputs of private channels from outputs of public channels.
Rene Pickhardt
CC BY-SA 4.0
2019-09-19T02:30:33.707Z
2019-09-19T02:30:33.707Z
Mark H
<p>Though not possible by the funding transaction, it could get figured out with 'multiple non-finalized payments' as described in the following paper: <a href="https://eprint.iacr.org/2019/328" rel="nofollow noreferrer">https://eprint.iacr.org/2019/328</a></p>

CC BY-SA 4.0
2019-10-06T18:56:40.460Z
2019-10-06T18:56:40.460Z
Simon
<p>How would the adversary know that your transaction is linked to the lightning network ? it can be toward a friend, an exchange or even stolen</p>

<blockquote>
  <p>When a Lightning channel is created or closed, it leaves a footprint on the Bitcoin blockchain. (Note that this footprint tells a third party very little about how you routed your payments while on the Lightning Network). These blockchain transactions can be analyzed just like a normal Bitcoin transaction can. Although by just looking at the Bitcoin blockchain it is not apparent which transactions are related to the Lightning Network, and which ones are not. Someone who wants to piece together spending patterns might have to combine multiple data points from different sets of information.</p>
</blockquote>

<p>from <a href="https://medium.com/suredbits/lightning-network-101-privacy-245d98210ab" rel="nofollow noreferrer">https://medium.com/suredbits/lightning-network-101-privacy-245d98210ab</a> which goes more in depth</p>

CC BY-SA 4.0
2019-09-19T00:30:49.810Z
2019-09-19T00:30:49.810Z
Saxtheowl
<p>The Initial Funding Transaction happens in Bitcoin and is linked to the Lightning Network.</p>

<p>Can an adversary figure out the initial channel balances by identifying the according Bitcoin Funding Transaction?</p>

<lightning-network><privacy><ln-opening-channels><channels>
Can Initial Channel Balances be figured out from the Funding Transaction?
wtho
# Can Initial Channel Balances be figured out from the Funding Transaction?

(Asked by: username_0 on 2019-09-18)

The Initial Funding Transaction happens in Bitcoin and is linked to the Lightning Network.

Can an adversary figure out the initial channel balances by identifying the according Bitcoin Funding Transaction?

**Tags:** lightning-network, privacy, ln-opening-channels, channels


---

## 3 answers

### Answer by username_1 on 2019-09-19. Score: 3 | Accepted answer

A funding transaction is one where some money is paid into a P2WSH transaction output, where the `redeeemScript` is a 2-of-2 multisig between the two participants. No other information is provided.

Technically, even the `redeemScript` for the funding is not revealed until the funding transaction output is spent (channel closed), which makes it less obvious that the unspent output is even a channel. Private channels are not known to be channels, and even when closed, are indistinguishable from any other kind of 2-of-2 multisig transaction.

For public channels, however, the `redeemScript` can be recreated from information published over Lightning's gossip network, making it possible for network participants to discover which transactions are public channel funding transactions.

There is no information regarding balances. The single funding transaction output has an amount representing the entire channel capacity. This is all that is known to anybody but the two channel participants.

The way channel opening works is that both parties create asymmetric initial commitment transactions, which spend the funding transaction with their previously agreed upon balances. This happens **before** the initiator reveals or broadcasts the funding transaction. The initiator creates (but doesn't broadcast) the funding transaction and only transmits its transaction id and output index to the other party. This information is sufficient for both parties to create their initial commitments which spend it, and to sign those commitments, but not sufficient for the other party to broadcast the transaction and lock up the funds before the commitments have been agreed. Once both parties have signed, the initiator then broadcasts the funding transaction and the channel is considered opened after it reaches the minimum confirmation depth.

It *may* be possible to determine channel closing balances based on the transaction which spends the funding output.

> **Comments:**
> **username_2**: Private channels might be deteced when closed if the node also operates public channels as the outputs get mixed also in the case of a force close pending htlcs in the commitment transaction are a strong indicator. AFAIK there is no implementation that does a good job of focusing on keeping your private channels private by separating outputs of private channels from outputs of public channels.  

---

### Answer by username_3 on 2019-10-06. Score: 0

Though not possible by the funding transaction, it could get figured out with 'multiple non-finalized payments' as described in the following paper: <https://eprint.iacr.org/2019/328>


---

### Answer by username_4 on 2019-09-19. Score: 0

How would the adversary know that your transaction is linked to the lightning network ? it can be toward a friend, an exchange or even stolen

> When a Lightning channel is created or closed, it leaves a footprint on the Bitcoin blockchain. (Note that this footprint tells a third party very little about how you routed your payments while on the Lightning Network). These blockchain transactions can be analyzed just like a normal Bitcoin transaction can. Although by just looking at the Bitcoin blockchain it is not apparent which transactions are related to the Lightning Network, and which ones are not. Someone who wants to piece together spending patterns might have to combine multiple data points from different sets of information.

from <https://medium.com/suredbits/lightning-network-101-privacy-245d98210ab> which goes more in depth


---

