- How do two parties start a payment channel?
Two parties can initiate a payment channel by creating a multi-signature transaction on the blockchain. At least one party must commit funds to this transaction. Once this channel is open and a payment channel is established on the LN, the participants can transfer funds between each other, instantly and with extremely low fees. Each transaction updates a “temporary” balance sheet, signed by each party’s private key. This balance sheet can be broadcast as a Bitcoin transaction at any time if either or both parties wants to close the channel. LN payments are done peer-to-peer, with no intermediary.
- How are you punished if you try to do an invalid transaction?
In the event that one party tries to be dishonest, there is recourse for the other party. If one party belonging to a payment channel tries to publish any balance sheet other than the most recent one (e.g., one in which that party owns more BTC than in the most recent balance sheet), that party’s funds will be locked while the other party will be given the opportunity to publish a “penalty” transaction that will send the entire capacity of the payment channel to the other party. This serves as a deterrent to cheating.
To do this, the other party would have to be online.
- What is the purpose of “watchtowers”?
If a party of a payment channel cannot access the internet, there are “watchtowers”, which are LN nodes that look out for dishonest transactions being broadcast. If the watchtowers detect that a party tried to publish a dishonest transaction, they can sign the penalty transaction for the offline party and be paid a small proportion of the penalty transaction as a reward for keeping users honest.