By Jeremy Lucid
In the latest kdb+ technical white paper we explore the Lightning network, a layer two technology designed to scale Bitcoin by enabling fast, micropayment transactions with low fees while preserving Bitcoin’s decentralized qualities.
This paper focuses on the use case of pay-per-request applications that can monetize streaming data through a three-step subscribe, pay and publish system.
To demonstrate lightning usage, we modify a standard ticker plant process to incorporate lightning functionality allowing subscribers to pay for data on a per ticker basis with instant settlement.
In particular, the paper will describe how the kdb+ qlnd library can be used to communicate with a Lightning node to create payment channels with peers, generate invoices for payment and route payments rapidly across the network. The paper will also discuss briefly how this setup can be extended to the case of multiple IoT devices exchanging data for payment.
This article builds on previous papers like Storing and Exploring the Bitcoin blockchain, which showcased how Bitcoin transaction data could be stored in a more familiar kdb+ partitioned database format. This enables custodial services, like cryptocurrency exchanges, to more easily query and monitor the funds under their control.
You can read the full article on the KX Developer’s site here.