Go to App

Konduit

A Cardano to Bitcoin Lightning Pipe

Konduit is an open-source, decentralized protocol that provides a financial connection from the Cardano ecosystem to the Bitcoin ecosystem.

It allows Ada holders to seamlessly pay for goods and services over the Bitcoin Lightning Network, a widely-used instant payment solution.

Overview

Konduit's design is inspired by the Bitcoin Lightning Network (BLN).

The BLN is a network of participants (nodes) connected by payment channels (edges). Each channel in the network is "underwritten" by locked funds on the Bitcoin L1. Payments follow routes through this network.

Konduit is also made up of two party channels, and each channel is underwritten by locked funds but now on the Cardano L1. There's another big difference. In Konduit, channels are between a Consumer and an Adaptor An adaptor is a service provider who also has BLN channels. This means they can route payments from the consumer to BLN.

Going Deeper...

To understand how a Konduit Channel works we need to break it down into two parts: L1 and L2. The funds underwriting a channel are on the L1. Payments are made on the L2. In a payment, the consumer gives the adaptor evidence of funds owed. The adaptor can use this evidence to claim funds on the L1.

Payments over BLN are made safe by using Hashed Timelock Contracts (HTLCs). HTLCs make use of "secrets" and "locks" to ensure payments are securely routed: no node in the route will receive funds, without first sending them. Konduit uses the same secrets and locks (but a bit differently).

Open

This phase establishes the payment channel between the Consumer and the Adaptor, secured by funds on the Cardano L1.

Adaptor

An Adaptor advertises their services, making themselves discoverable to Consumers.

Consumer

A Consumer finds an Adaptor and "opens" a channel by locking Ada funds on Cardano (L1). These locked funds underwrite all future "L2" (off-chain) payments.

Adaptor

The Adaptor confirms this L1 transaction, verifies the channel is acceptable, and awaits a message from the Consumer.

Consumer

The Consumer sends a message to initialize the L2 part of their channel, making it ready to send payments.

Pay

Once the channel is initialized, the Consumer can make payments to any Bitcoin Lightning invoice through their Adaptor.

Consumer

Scans a BLN invoice and requests a quote from their Adaptor to route the payment.

Adaptor

Responds to the quote, confirming if they can route the payment and specifying the total cost in Ada.

Consumer

Accepts the quote and sends a locked "cheque" (an L2 payment) to the Adaptor.

Adaptor

Routes the payment on the BLN and receives the proof of payment (the "secret"), which they send to the Consumer.

Consumer

Validates the secret and responds with a "squash" message to finalize the L2 payment with the Adaptor.

A "squash"? Its a small piece of evidence that represents the squashing of all the "unlocked" cheques to date. The adaptor can use the squash and unlocked cheques at any time to "sub" funds owed from the L1 channel. Likewise, the consumer can "add" funds to the channel at any time, if they so choose.

Close

This final phase closes the payment channel, settling the final balances on the Cardano L1.

Consumer

Initiates the channel close on L1. Funds remain locked during this process.

Adaptor

Sees the L1 channel state change and stops handling any new cheques. The Adaptor responds on L1, claiming the final funds owed to them.

Consumer

After the Adaptor has claimed their funds, the Consumer ends the channel and withdraws all remaining funds.

... and what about the unhappy paths

What we've described above is the "happy path," where everything works as expected.

At any point, the process might deviate. Konduit is designed to securely manage these unhappy paths, ensuring funds are always safe.

For a deeper dive into the protocol and its security model, check out our GitHub.