Lightning Network
Scalable Off-Chain Instant Payments
Orfeas Stefanos Thyfronitis Litos
26/1/2018
Edinburgh University
Structure
-
A simple payment channel
-
Multi-hop channels
1) Alice sends
2) Alice signs and sends
3) Bob signs and sends
4) Bob signs and sends
5) Alice broadcasts
Normal P2PKH, no need for sending beforehand
Establishing a channel
Revocable Sequence Maturity Contract (RSMC)
-
Output of a Commitment transaction (Ctx)
-
Pays to a particular address,
-
only after Ctx has been on chain for some blocks
-
How many blocks? It's specified in Ctx
-
Spendable relative to Ctx broadcast
-
Used for simple payment channel
Hashed Timelock Contract (HTLC)
-
Output of a Commitment transaction (Ctx)
-
Pays to Bob if he knows the preimage of a hash
-
Pays to Alice only after some block height
-
Hash and height specified in Ctx
-
Spendable relative to Ctx signing
-
Used for multi-hop payment channel
Creating a multi-hop channel
0) Dave generates R and sends hash(R) to Alice
4) Dave discloses R and gets paid from Carol
Carol will either:
- Learn R before the 2-day lock expires and get paid from Bob (step 5), or
- Never learn R and get her money back from Dave after the 1-day lock expires (step 4)
longest Top-Level Domain ever
Lightning Network
By orfeas
Lightning Network
10' presentation
- 775