Lightning Network Support in FIO


Lightning Network (LN) is a Bitcoin Layer 2 network which allows users to open payment channels between each other and exchange Bitcoin payments without the need to settle to Layer 1 on every transaction. Addressing in LN is accomplished via invoices in accordance with BOLT #11: Invoice Protocol for Lightning Payments.

An invoice is an encoded string (similar to a public address) sent from Payee to Payer outside of LN, e.g. via copy/paste or QR code scan and containing variety of data fields, including amount, channel information, expiration date, signature, secret, etc. The primary reason LN uses invoices is because a secret value has to be passed back and forth to ensure the last invoice between parties in channel is used when settling to Layer 1. This is also a reason why an invoice should not be reused.

Here’s an example of an invoice:


You can see decoded value here.

Support in FIO

Since FIO Protocol already supports an invoice, aka FIO Request, it appears logical that it could be used as a vehicle to send LN invoices between FIO Addresses.

Existing new_funds_request fields may be used:

  • payee_public_address may include the LN invoice string

  • amount may be left blank as LN invoice already contains amount

  • chain_code = BTC

  • token_code = LNBC

  • memo may be left blank as LN invoice already contains memo

LN invoices are supported since FIP-32