1

In relation to this question:

Alice & Bob where they transfer 1 BTC each other.

  1. Both Alice & Bob transfer 1 BTC into a shared multisig address.

  2. A ‘balance sheet’ is created where 1 BTC is paid by Alice -> Bob and 1 BTC is paid by Bob -> Alice.

  3. In the above transaction, Alice signs the transaction and gives to Bob and vice-versa.

  4. Either Alice or Bob can sign their counterparts payout transaction and broadcast it to the blockchain.

  5. Alice will update the ‘Balance sheet’ as 0.5 BTC to Alice and 1.5 to Bob and send the payout transaction to Bob to sign.

  6. To ensure neither Alice or Bob revert to the old transaction, each will create an ‘anti-cheat’ transaction.

  7. If Alice and Bob wants to close the channel, they can consensually close the channel and broadcast the transaction to the blockchain.

Where is this balance sheet persisted? What happens if BOTH Alice AND Bob lose this information?

2 Answers 2

3

We like to say that Bitcoin is decentralized, and it is, but all the data can be viewed as having a centralized "source of truth": the blockchain. All transactions that have ever occurred are a part of this source of truth. The management and upkeep of this source of truth, however, is decentralized. Nobody is in charge of it, yet everybody agrees on a single set of data.

The lightning network, however, is even more decentralized. It doesn't just manage and update itself without central authority, but there is no agreed upon "truth" of the network. The activity that occurs between two participants in a channel is only the business of the participants, and nobody else ever needs to see it. Therefore it is not shared, and unless the participants want to, it is not stored. Once a channel closes, the participants have completely settled all transactions between each other with a single transaction to the main Bitcoin blockchain. They may very well persist the activity data for their own purposes, but it is in no way required for them to continue to participate.

3
  • I understand that it is not shared with the public, but what happens if none of the channel participants are storing the transaction history, how would the final balance be committed to the chain when the channel closes?
    – Dashi
    Commented Mar 28, 2018 at 19:04
  • 1
    The split of which party gets how much of the opening transaction at close is precisely the information that is being updated throughout a channel's lifespan. It is updated by exchanging updated, partially signed transactions as part of the smart contract. This exchange is pretty much all the LN is for.
    – Jestin
    Commented Mar 28, 2018 at 19:09
  • 1
    @Dashi As a participant in Lightning, you yourself are responsible for broadcasting the final state to the network and the chain whenever your peers misbehave (including when they would disappear). Commented Mar 28, 2018 at 20:31
2

The balance sheet is persisted on both Alice's and Bob's Lightning nodes. If Alice and Bob lose all the data stored on their Lightning nodes and have no backups then the funds in the channel will be locked in a 2-of-2 multisignature address on the blockchain but all pre-signed transactions to close the channel will have been lost.

Whether the funds can be recovered or not will be dependent on whether Alice and Bob still have the private keys to sign a transaction from that 2-of-2 multisignature address. If they both do then they can negotiate the proportion of funds to be returned to both parties and both sign that transaction. If they are unable to come to an agreement the funds will be locked forever. If either one of them have lost their private key then the funds will also be locked forever.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.