Bitcoin++ 2024 - Team ROYGBIV

Bitcoin++ 2024 - Team ROYGBIV

Bitcoin++ Hackathon Proof-of-Work Project links:

User Story

Say you're the Leader of a band and each member runs a BOLT12-capable lightning node. You might want to issue a BOLT12 offer so fans can tip the band during and after a concert. Fortunately, you run a well-managed Lightning node and issue a BOLT12 Offer for people to tip. You consider creating a BOLT12 Prism on your node to split the proceeds among band members.

In this scenario, it is common for the receiver to split the funds downstream to the remaining prism members. Being the leader of the Band, you are entitled to a share of the funds.

The current BOLT12 Prism plugin doesn't support this flow. An additional Lightning Node must act as a proxy to receive payments, then perform splits to downstream nodes. In other words, a prism member CANNOT act as the Prism host.

Solution: Pay-to-Self

The solution to this problem is what we call "Pay-to-Self". This feature allows Prism hosts to set themselves as a Prism member. There are two ways to implement this interaction, both of which we implemented*.

Implicit Pay-to-Self

In this model, the amount_msat of an income event is multiplied by an outlay_factor, which by default is 1. If the outlay_factor is 0.8, total outlays will be 80% of total income. Thus, there is an implicit 20% pay-to-self.

Explicit Pay-to-Self (aka Pay-to-Self-Destination (PTSD))

In this model, we create an explicit payment to a BOLT12 offer that was issued by the SAME node as the Prism host. This offer is specified as a member of the Prism payout. Prism execution creates an explicit debit/credit in the transaction list showing a movement of funds. This feature enables local composability of prisms.

💡
Explicit Pay-to-Self is not working 100%. This feature requires that Core Lightning be able to pay a BOLT12 offer issued by the local node.

Demo

We leveraged the ROYGBIV.guide/demo environment to facilitate the development of the Prism Plugin. Check out roygbiv.guide/demo. The links for Alice, Bob, Carol, Dave, and Erin use the latest Prism Plugin. We also deploy a special fork of Clams Remote that supports Prism UI.

Consider the example at the demo roygbiv.guide/demo.


0:00
/0:08

Visual Aid by a Bitcoiner

farscapian

farscapian

Bitcoiner working on lightning prisms.
Michael Evans

Michael Evans

Aspiring Bitcoin/Network developer.

yeaitsmoney

Building..