Reading Assignment: Lightning Details

  1. start a payment channel by funding a multisig address and exchanging initial commitments

  2. an invalid transaction is punished by use of the breach remedy transaction, which is essentially the fact that all old transactions have had their secret keys exchanged already such that either party can go back and sign for the other, but doing so sets a relative time-lock on the resulting broadcast that can be trumped by the other doing the same (with no time-lock), i.e. noticing the fraud and beating the fraudster to the multisig funds

  3. watchtowers are supposed to ensure that this in case the defrauded person is offline or otherwise not enforcing their own breach remedy, then a third party can by keeping track of proposed commitment transactions against a database of old one’s in order to itself sign for the offline/non-enforcing party (and thereby gain some financial benefit itself)

2 Likes
  1. How do two parties start a payment channel?
    Two parties will fund a multisig wallet. Once they are ready to close the channel, they will sign each other’s transaction commits… this will broadcast the final balances tot eh bitcoin network, who will send the balances to each party’s wallet.

  2. How are you punished if you try to do an invalid transaction?
    If you try to send an old transaction, the LN will lock up the broadcasted transaction for 100 block confirmations on the bitcoin blockchain. During this time, the other party can come online, send a breach remedy transaction (which provides a secret phrase the victim can use to sign a BRTX - which will then claim their funds PLUS the other party’s entire balance amount), or the integration of Watch Towers, a service that watches for transactions that are invalid and signs the BRTX for the victim.

  3. What is the purpose of “watchtowers”?
    The purpose of watch towers is to protect the victims in this situation of a fraudulent attack. If the victim node is off-line and cant send the BRTX in time before being scammed, the Watch Tower is insurance against this.

2 Likes

Reading Assignment: Lightning Network Channels.

1. How do two parties start a payment channel?
Two Lightning Network-ready nodes will create a MultiSig Wallet, which is a Bitcoin address that requires each node to sign off on transactions with their private keys before said transactions are broadcast onto the blockchain.

2. How are you punished if you try to do an invalid transaction?
I will lose all my funds that I have on the channel where other user could then use a revocation key (Breach Remedy Transaction) that enable the other user to claim all the funds from the channel (including mine).

3. What is the purpose of “watchtowers”?
The watchtower node are like guards, who will monitor the Lightning Network channel for breaches.
If it notices one, the watchtower will launch a “penalty” transaction that will return the funds to the offline node and confiscate scammer’s funds.
Watchtowers will get piece of the confiscated funds as a reward for protecting the network.

2 Likes

1. How do two parties start a payment channel?

In order to start a payment channel, the two parties have to create a multisig wallet, which is a BTC address that requires each node to sign off on TXs with their PKs before these TXs are broadcasted onto the blockchain.

2. How are you punished if you try to do an invalid transaction?

By triggering a Breach Remedy Transaction, which would send all the channel funds to the affected party.

3. What is the purpose of “watchtowers”?

Watchtowers are always-online nodes with the purpose of monitoring the Lightning Network for potential false states.

1 Like

How do two parties start a payment channel?
By each party creating an on-chain transaction on a multi-signature address.

How are you punished if you try to do an invalid transaction?
The Breach Remedy Transaction (or 'Anti-Cheat Transaction) takes your allocation of BTC during the funding transaction and gives it to the other party, with whom you created the payment channel.

What is the purpose of “watchtowers”?
It serves to protect the other party of the payment channel when their node is offline in case and their channel partner tries to broadcast an older commitment transaction.

1 Like
  1. Both parties will create a multi sig wallet which is a BTC address that requires each node to sign off on transactions with their private keys before the transactions can be broadcast to the network.
  2. The other party to the transaction will have a period of time to unlock the full balance to them which in turn will release the offenders total balance from the payment channel, thus penalizing the malicious actor.
  3. They monitor the network for Breach Remedy Transactions in case the victimized node is offline and receive a percentage of the balance from the offenders payment channel for doing so.
1 Like
  1. : 2 ready Lightning nodes creating a 2 of 2 UTXO (funding transaction) which is recorded on the blockchain- the base layer.
  2. : The integrated penalty mechanism gets active, means that “cheater” gets penalized by losing all the the BTC in the channel and the channel partner gets rewarded by taking all the BTC of the channel.
  3. : Watchtowers are always online nodes and third party service which monitors the Lightning network for potential false state publications. They are kind of a protection for Lightning nodes that went offline (hardware failure etc.) while having still open payment channels with others. Watchtowers can excute then the penalty transaction.
1 Like

:one: How do two parties start a payment channel?

Both parties must send BTC to a multisig wallet on the bitcoin mainnet - which when successfully funded, will create a channel between these two parties on the lightning network.
Once the channel is funded, they can quickly exchange funds with almost no fees.

:two: How are you punished if you try to do an invalid transaction?

When a transaction is made on the lightning network, another transaction called a Breach Remedy Transaction (BRTX) is made for the preceding transaction which sets up a safeguard if one of the parties were to commit a (now) outdated state to the bitcoin blockchain.

If one of the parties commits an outdated transaction to the bitcoin blockchain, the other party has 100 blocks to intervene and action the BRTX. They would gain access to the attackers UTXO’s and the attacker would effectively lose all of the funds they had available on the channel.

:three: What is the purpose of “watchtowers”?

In the instance mentioned above ^^, some of these attacks could be successful if the victim isn’t monitoring for false commits. This could be that their node goes down for a few days, and when they return - the old state had been committed to the bitcoin blockchain.

So watchtowers exist to continuously monitor these transactions for you, and to action when an attacker attempts to broadcast a false state of the channel.
For a fee, watchtowers provide security to stop these attacks from happening.

1 Like

.1. How do two parties start a payment channel?
Two Lightning Network-ready nodes will create a multisig wallet, which is a Bitcoin address that requires each node to sign off on transactions with their private keys before said transactions are broadcast onto the blockchain. Then, during an unlimited period of time, they can exchange transactions by updating their mutual balances, off-chain and with instant speeds. To finish they close the channel by broadcasting the final balance to the main (layer 1) BTC blockchain.

.2. How are you punished if you try to do an invalid transaction?
When an always online watchtower node detects a breach, it launches a penalty transaction the returens the funds to the offline node.

.3. What is the purpose of “watchtowers”?
To detect breaches and act against it (as above)

1 Like
  1. How do two parties start a payment channel?
    Each party creates signed and funded Multi-sig transaction that’s broadcast to the network.

  2. How are you punished if you try to do an invalid transaction?
    You will lose your dedicated funds through execution of a
    Breach Remedy Transaction

  3. What is the purpose of “watchtowers”?
    A watchtower is incentivized to watch for fraudulent transactions that might be missed to due a node being offline. If fraud is detected it can execute the Breach Remedy Transaction on behalf of the injured party.

1 Like
  • How do two parties start a payment channel?
    By publishing a funding transaction on the Bitcoin network.

  • How are you punished if you try to do an invalid transaction?
    You will lose your funds.

  • What is the purpose of “watchtowers”?
    Fraud protection. Watchtowers are nodes that automate supervision of transaction and can issue breach-remedy transactions when fraudulent transactions are discovered.

1 Like

1. How do two parties start a payment channel?
By creating and funding a multi-sig address together.

2. How are you punished if you try to do an invalid transaction?
In this case, all my funds would pass to the person I was trying to cheat.
The 100 Block Time (relative Time Lock) makes it impossible for me to cheat, the other person can claim my funds (grace to the shared secret/key).

3. What is the purpose of "watchtowers?
Watchtowers are third party nodes which interact if one person tries to cheat a person which node is offline. Watchtower nodes have as incentive the betrayer’s funds as recompense.

1 Like
  1. How do two parties start a payment channel?
    They create a multisig wallet, which is a Bitcoin address that requires each node to sign off transactions with their private keys before the transactions are broadcasted to the Bitcoin Blockchain.

  2. How are you punished if you try to do an invalid transaction?
    By other parties performed a Breach Remedy Transaction

  3. What is the purpose of “watchtowers”?
    Watchtowers are envisioned as always-online nodes that will monitor the Lightning Network for potential false states.

1 Like

Hi everyone,

Andreas’ book is also a good source to follow up :+1:
https://github.com/lnbook/lnbook/blob/develop/07_payment_channels.asciidoc

  1. How do two parties start a payment channel?

In order to start a new payment channel, two parties nodeA and nodeB exchange messages to agree on the parameters of the channel.

Then nodeA builds the funding transaction and signed refund transaction. NodeA passes the funding transaction id and the refund transaction signature to NodeB. NodeB will then build a similar refund transaction, sign it and pass back the signature to nodeA.

At that point both nodes have refund transactions signed by the other side and are therefore ready to start using the channel safely.

NodeA then broadcasts the funding transaction, which effectively funds the channel.

Once this is confirmed, nodes can start sending payments across the channel.

Whenever the channel state changes, both nodes have to swap a new set of refund transaction signatures to reflect the new channel balances.

Old refund transactions should not be used, this would be cheating.

  1. How are you punished if you try to do an invalid transaction?

Each refund transaction contains a script that normally repays their respective balances to NodeA and NodeB. However the refund transaction created by NodeA also contains a condition to send NodeA’s balance to NodeB given the knowledge of a revocation key. Without revocation key the balance goes back to NodeA as normal, but with a delay (timelock).

Everytime nodes change the state of the channel, they exchange revocation keys relevant to the old refund transactions. The knowledge of those revocation keys dissuade both nodes from trying to broadcast any of the old transactions.

If NodeA cheats and broadcasts an old refund transaction and Node B detects it, then NodeB can immediately spend all funds in the malicious transaction using the revocation key. By the time the timelock delay expires, there will be nothing left in the refund transaction for NodeA to spend. Busted!

  1. What is the purpose of “watchtowers”?

This punishment mechanism works only if NodeB detects the cheating. What if NodeB is offline?

Special nodes called watchtowers are tasked with monitoring the broadcasting of old refund transactions. Because they know the revocation keys, they can activate the punishment and return funds to the cheated nodes in case those nodes are offline.

1 Like
  1. The channel is opened by a funding Tx using a 2/2 multi-sig address.
  2. if one person tries to close the channel with an invalid Tx then the defending party has a 100 block time to issues the Breach remedy Tx to the network and claim all the funds inside the channel and the attacker gets nothing.
  3. Watchtowers are like a security guard making sure there are no bad actors on the network. they can issue BRTXs if a party delegates that to the watchtower. then watchtowers get a cut of the closing of a channel if the catch a bad actor trying to make an invalid Tx.
  1. How do two parties start a payment channel?
    Request a channel to be opened. Open a 2/2 multisig wallet at an address. Fund the channel.

  2. How are you punished if you try to do an invalid transaction?
    The balance of your BTC is transferred to the other channel owner.

  3. What is the purpose of “watchtowers”?
    24/7 a third party watches for any previous improper transactions occurring.

  1. How do two parties start a payment channel?

Two Lightning Network-ready nodes will create a multisig wallet, which is a Bitcoin address that requires each node to sign off on transactions with their private keys before said transactions are broadcast onto the blockchain.
Doing so, the nodes will have effectively set up a payment channel between themselves; they can “transact” by updating their mutual balances for an unlimited period of time, with instant speeds and in an off-chain manner. Once they are done transacting they can close the channel by broadcasting the final balance to the main Bitcoin blockchain.

  1. How are you punished if you try to do an invalid transaction?

Thevother partt can use the revocation key supplies get all of the fraudulent persons money. Loses all the Bitcoin in their Channel to the other person

  1. What is the purpose of “watchtowers”?

The watchtower node will monitor the Lightning Network channel for breaches; if it notices one, the watchtower will launch a “penalty” transaction that will return the funds to the offline node.
The entire process starts by the creation of blobs that consist of signatures and public keys which are required to punish the side that breaks the channel by broadcasting a bad transaction state.

  1. How do two parties start a payment channel?

Both parties can fund the channel by multisig onchain transaction to start payment channel.

  1. How are you punished if you try to do an invalid transaction?
    Using anti cheat transaction, the secret is reveled to other party and they can withdraw all the funds, whereas this side there is relative time delay to get the funds.

  2. What is the purpose of “watchtowers”?
    Watchtowers keep a watch on fraudulent transactions and in return earn a share in their profit or to earn reward in return.

  1. How do two parties start a payment channel?

Two parties start a payment channel by locking up a certain amount of Bitcoin in a multi-signature wallet that produces the initial state of the channel.

  1. How are you punished if you try to do an invalid transaction?

If a party tries to do an invalid transaction by broadcasting an older balance state, the other party can punish them by launching a “penalty” transaction that will return the funds to the offline node. That penalty transaction is technically named as BRTX (Breach Remedy Txn) which gets produced by the parties during in-channel txns in order to be used when a malicious attack to the latest state of the txn list.

Each party signs a set of transactions that can be used to “punish” the other party if they try to broadcast an old state. They use the public keys and transaction IDs of each previous txns.

Basically when every in-channel / lightning transaction initialized, BRTX also gets signed by the parties for the previous state. In the manner of existence of a watchtowers those punishment data will be constructed by them.

  1. What is the purpose of “watchtowers”?

The purpose of “watchtowers” is to monitor the Lightning Network for potential invalid transactions or “channel breaches”. If a watchtower detects a malicious attempt to broadcast an older balance state, it will launch the penalty transaction to protect the funds of the offline node. By doing that they get rewarded by the watchtower-usage fee and penalty transaction fees from the channel users.