Table of Contents
- Introduction
- Detail Scheme
- Conclusions, Observations and Recommendations
- Appendices
- References
- Contributors
Introduction
Proof-of-Work (PoW) blockchains are notoriously slow, as transactions need to be a number of blocks in the past to be confirmed, and have poor scalability properties. A payment channel is a class of techniques designed to allow two or more parties to make multiple blockchain transactions, without committing all of the transactions to the blockchain. Resulting funds can be committed back to the blockchain. Payment channels allow multiple transactions to be made within off-chain agreements. They keep the operation mode of the blockchain protocol, but change the way in which it is used in order to deal with the challenge of scalability [[1]].
The Lightning Network is a second-layer payment protocol that was originally designed for Bitcoin, and which enables instant transactions between participating nodes. It features a peer-to-peer system for making micropayments through a network of bidirectional payment channels. The Lightning Network’s dispute mechanism requires all users to constantly watch the blockchain for fraud. Various mainnet implementations that support Bitcoin exist and, with small tweaks, some of them are also able to support Litecoin ([[2]], [[3]], [[4]], [10]).
Laser Beam is an adaptation of the Lightning Network for the Mimblewimble protocol, to be implemented for Beam ([[5]], [[6]], [[7]]). At the time of writing of this report (November 2019), the specifications were far advanced, but still work in progress. Beam has a working demonstration in its mainnet repository, which at this stage demonstrates off-chain transactions in a single channel between two parties. According to the Request for Comment (RFC) documents, Beam plans to implement routing across different payment channels in the Lightning Network style.
Detail Scheme
Beam’s version of a multisignature (MultiSig) is actually a
In the equations that follow Alice’s and Bob’s contributions are denoted by subscripts
Funding Transaction
The parties collaborate to create the multiparty UTXO (i.e. commitment and associated multiparty range proof), combined on‑chain funding transaction (Figure 1) and an initial refund transaction for each party (off‑chain). All refund transactions have a relative time lock in their kernel, referencing the kernel of the original combined funding transaction, which has to be confirmed on the blockchain.
The initial funding transaction between Alice and Bob is depicted in (1). The lock height in the signature challenge
corresponds to the current blockchain height. Input commitment values and blinding factors are identified by superscript
Alice and Bob also need to set up their own respective refund transactions so they can be compensated should the channel never be used; this is performed via a refund procedure. A refund procedure (off‑chain) consists of four parts, whereby each user creates two transactions: one kept partially secret (discussed below) and the other shared. Each partially secret transaction creates a different intermediate multiparty UTXO, which is then used as input in two shared transactions, to spending the same set of outputs to each participant.
All consecutive refund procedures work in exactly the same way. In the equations that follow, double subscripts
Refund Procedure
Alice - Part 1
Alice and Bob set up Alice’s intermediate MultiSig funding transaction (Figure 2), spending the original funding
MultiSig UTXO. The lock height
They collaborate to create
Bob - Part 1
Alice and Bob set up Bob’s intermediate MultiSig funding transaction (Figure 2), also spending the original funding
MultiSig UTXO. The lock height
They collaborate to create
Alice - Part 2
Alice and Bob set up a refund transaction (Figure 3), which Alice controls, with the same relative time lock
They collaborate to create the challenge and the aggregated signature. Because the final kernel
Bob - Part 2
Alice and Bob set up a refund transaction (Figure 3), which Bob controls, with a relative time lock
They collaborate to create the challenge and the aggregated signature. Because the final kernel
Revoke Previous Refund
Whenever the individual balances in the channel change, a new refund procedure is negotiated, revoking previous agreements (Figure 4).
Revoking refund transactions involves revealing blinding factor shares for the intermediate multiparty UTXOs, thereby
nullifying their further use. After the four parts of the refund procedure have been concluded successfully, the
previous round’s blinding factor shares
Alice:
Bob:
Note that although the kernels for transactions (2) and (10) were kept secret, when the Bulletproof range proofs for
Alice verifies:
Bob verifies:
Although each party will now have its counterparty’s blinding factor share in the counterparty’s intermediate multiparty UTXO, they will still not be able to spend it, because the corresponding transaction kernel is still kept secret by the counterparty. The previous round’s corresponding transaction (2) or (10), with a fully signed transaction kernel, was never published on the blockchain.
Punishment Transaction
If a counterparty decides to broadcast a revoked set of refund transactions, and if the honest party is actively
monitoring the blockchain and able to detect the attempted foul play, a punishment transaction can immediately be
constructed before the relative time lock
Channel Closure
Whenever the parties agree to a channel closure, the original on‑chain multiparty UTXO,
Opening a channel requires one collaborative funding transaction on the blockchain. Closing a channel involves each party broadcasting its respective portion of the refund transaction to the blockchain, or collaborating to broadcast a single settlement transaction. A round-trip open channel, multiple off‑chain spending and close channel thus involves, at most, three on‑chain transactions.
Conclusions, Observations and Recommendations
-
MultiSig
The Laser Beam MultiSig corresponds to a Mimblewimble
Multiparty Bulletproof UTXO, as described here. There is more than one method for creating the MultiSig’s associated Bulletproof range proof, and utilizing the Bulletproofs MPC Protocol will enable wallet reconstruction. It may also make information sharing, while constructing the Bulletproof range proof, more secure. -
Linked Transactions
Part 2 of the refund procedure requires a kernel with a relative time lock to the kernel of its corresponding part 1 refund procedure, when those kernels are not yet available in the base layer, as well as a different, non-similar, signature challenge. Metadata about the linked transaction kernel and non-similar signature challenge creation must therefore be embedded within part 2 refund transaction kernels.
-
Refund Procedure
In the event that for round
, Alice or Bob decides to stop negotiations after their respective part 1 has been concluded and that transaction has been broadcast, the result would be that funding UTXO, , would be replaced by the respective . The channel will still be open. However, it also cannot be spent unilaterally, as the blinding factor is shared. Any new updates of the channel will then need to be based on as the funding UTXO. Note that this cannot happen if the counterparties construct transactions for part 1 and part 2, conclude part 2 by signing it, and only then sign part 1.In the event that for round
, Alice or Bob decides to stop negotiations after their respective part 1 and part 2 have been concluded and those transactions have been broadcast, it will effectively be a channel closure. -
Revoke Attack Vector
When revoking the previous refund
, Alice can get hold of Bob’s blinding factor share (19), and after verifying that it is correct (20), refuse to give up her blinding factor share. This will leave Alice with the ability to broadcast any of refund transactions and , without fear of Bob broadcasting a punishment transaction. Bob, on the other hand, will only be able to broadcast refund transaction .
Appendices
Appendix A: Notation Used
-
Let
be a large prime number, denote the ring of integers , and be the group of elliptic curve points. -
Let
be a random generator point (base point) and let be specially chosen so that the value to satisfy cannot be found, except if the Elliptic Curve Discrete Logarithm Problem (ECDLP) is solved. -
Let commitment to value
be determined by calculating , which is called the Elliptic Curve Pedersen Commitment (Pedersen Commitment), with (the blinding factor) a random value. -
Let scalar multiplication be depicted by
, e.g. .
References
[[1]] J. A. Odendaal, “Layer 2 Scaling Survey - Tari Labs University” [online]. Available: https://tlu.tarilabs.com/scaling/layer2scaling-landscape/layer2scaling-survey.html. Date accessed: 2019‑10‑06.
[1]: https://tlu.tarilabs.com/scaling/layer2scaling-landscape/layer2scaling-survey.html ‘Layer 2 Scaling Survey - Tari Labs University’
[[2]] J. Poon, T. Dryja (2016). “The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments” [online].” Available: http://lightning.network/lightning-network-paper.pdf. Date accessed: 2019‑07‑04.
[2]: http://lightning.network/lightning-network-paper.pdf ‘The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments’
[[3]] “GitHub: lightningnetwork/lightning-rfc: Lightning Network Specifications” [online]. Available: https://github.com/lightningnetwork/lightning-rfc. Date accessed: 2019‑07‑04.
[3]: https://github.com/lightningnetwork/lightning-rfc ‘GitHub: lightningnetwork/lightning-rfc: Lightning Network Specifications’
[[4]] X. Wang, “What is the situation of Litecoin’s Lightning Network now?” [online]. Available: https://coinut.com/blog/whats-the-situation-of-litecoins-lightning-network-now. Date accessed: 2019‑09‑11.
[4]: https://coinut.com/blog/whats-the-situation-of-litecoins-lightning-network-now “What is the situation of Litecoin’s Lightning Network now?”
[[5]] The Beam Team, “GitHub: Lightning Network - BeamMW/beam Wiki” [online]. Available: https://github.com/BeamMW/beam/wiki/Lightning-Network. Date accessed: 2019‑07‑05.
[5]: https://github.com/BeamMW/beam/wiki/Lightning-Network ‘GitHub: Lightning Network - BeamMW/beam Wiki’
[[6]] F. Jahr, “Beam - Lightning Network Position Paper. (v 1.0)” [online]. Available: https://docs.beam.mw/Beam_lightning_network_position_paper.pdf. Date accessed: 2019‑07‑04.
[6]: https://docs.beam.mw/Beam_lightning_network_position_paper.pdf ‘Beam - Lightning network position paper. (v 1.0)’
[[7]] F. Jahr, “GitHub: fjahr/lightning-mw, Lightning Network Specifications” [online]. Available: https://github.com/fjahr/lightning-mw. Date accessed: 2019‑07‑04.
[7]: https://github.com/fjahr/lightning-mw ‘GitHub: fjahr/lightning-mw, Lightning Network Specifications’
[[9]] The Beam Team, “GitHub: beam/ecc_bulletproof.cpp at mainnet - BeamMW/beam” [online]. Available: https://github.com/BeamMW/beam/blob/mainnet/core/ecc_bulletproof.cpp. Date accessed: 2019‑07‑05.
[9]: https://github.com/BeamMW/beam/blob/mainnet/core/ecc_bulletproof.cpp ‘GitHub: beam/ecc_bulletproof.cpp at mainnet - BeamMW/beam’
[10] D. Smith, N. Kohen, and C. Stewart, “Lightning 101 for Exchanges” [online]. Available: https://suredbits.com/lightning-101-for-exchanges-overview. Date accessed: 2019‑11‑06.