Giter Club home page Giter Club logo

lightning-rfc's Introduction

Qtum Lightning Network Specifications (In-Progress)

Abstract

The Lightning Network is a decentralized system for instant, high-volume micropayments that removes the risk of delegating custody of funds to trusted third parties.

Qtum Lightning is a protocol for making fast payments with QTUM using a network of channels, basically it is the same as Bitcoin's.

How it works

Funds are placed into a two-party, multisignature "channel" Qtum address. This channel is epresented as an entry on the Qtum public ledger. In order to spend funds from the channel, both parties must agree on the new balance. The current balance is stored as the most recent transaction signed by both parties, spending from the channel address. To make a payment, both parties sign a new exit transaction spending from the channel address. All old exit transactions are invalidated by doing so.

Specification

Channels

Qtum Lightning works by establishing channels: two participants create a Lightning payment channel that contains some amount of QTUM (e.g., 0.1 QTUM) that they've locked up on the Qtum network. It is spendable only with both their signatures.

Initially they each hold a QTUM transaction that sends all the QTUM (e.g. 0.1 QTUM) back to one party. They can later sign a new Qtum transaction that splits these funds differently, e.g. 0.09 QTUM to one party, 0.01 QTUM to the other, and invalidate the previous Qtum transaction so it won't be spent.

Conditional Payments

A Lightning channel only allows payment between two participants, but channels can be connected together to form a network that allows payments between all members of the network. This requires the technology of a conditional payment, which can be added to a channel, e.g. "you get 0.01 QTUM if you reveal the secret within 6 hours". Once the recipient presents the secret, that Qtum transaction is replaced with one lacking the conditional payment and adding the funds to that recipient's output.

Forwarding

Such a conditional payment can be safely forwarded to another participant with a lower time limit, e.g. "you get 0.01 QTUM if you reveal the secret within 5 hours". This allows channels to be chained into a network without trusting the intermediaries.

Network Topology

To make a payment, a participant needs to know what channels it can send through. Participants tell each other about channel and node creation, and updates.

Payment Invoicing

A participant receives invoices that tell her what payments to make.

Implementations

Reference

lightning-rfc's People

Contributors

c-otto avatar cdecker avatar cfromknecht avatar cjamthagen avatar danielweigl avatar dlogicman avatar emelyanenkok avatar icodeface avatar jtimon avatar nayuta-gondo avatar nayuta-ueno avatar niftynei avatar orfeaslitos avatar ottoallmendinger avatar pm47 avatar practicalswift avatar renepickhardt avatar renlord avatar roasbeef avatar rodneyneilmorris avatar rsbondi avatar rustyrussell avatar salomegeo avatar sgeisler avatar simonvrouwe avatar sstone avatar thebluematt avatar toadlybroodle avatar ysangkok avatar zmnscpxj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.