Lightning: Three-Dimensional Liquidity Swaps (3DLS)
a Practical Guide for Lightning Network Optimization with Octahedron-Based Channel Structure
Sometimes ago I got contacted by a node runner, member of my Bitcoin Lightning community, talking about a new project he had in mind. I felt very interested and gave my availability to participate to this project using one of the nodes I run. It was about creating a special channels configuration in Lightning nodes’ space. Here is an article authored by him (FestinaLente), which will explain all the details.
This short Tutorial outlines a step-by-step approach to implementing an Octahedron-based Channel structure on the Lightning Network (LN). The goal is to enhance network resilience, privacy and routing efficiency by leveraging the geometric properties of Platonic Solids (in particular regular Octahedron).
1. Architecture Overview
The proposed architecture reproduce the 3D structure of the regular Octahedron, where:
- LN Nodes are represented by the 6 Vertices
- LN Channels are represented by the 12 Edges
This structure ensures symmetry, resilience and contribute to routing efficiency.
2. Key Advantages
1. Censorship Resistance: multiple alternative paths between Nodes, can reduce the risk of censorship
2. Enhanced Privacy: symmetry complicates transaction tracing and 3D geometry can increase rationally the numbers of “hops”, contributing to improving user privacy
3. Routing Efficiency: more organized paths improve LN Graph and may contribute to reduce latency and transaction costs
3. Materials and Methods
3.1 Three-Dimensional Liquidity Swaps (3DLS) Protocol
To build a regular Octahedron, it is necessary to follow a structured Channel-opening Protocol, with an agreement between participant Nodes concerning Channels size and opening timescale. This ensures optimal liquidity (every participant Node, in consequence of two outbound Channels opened, receive back two free inbound Channels) and connectivity among the six participating Nodes.
3.2 Channel Opening Modes
Two different approaches are available for constructing the Octahedron:
Mode 1: Triangle-Based Liquidity Swaps (FestinaLente’s proposal)
- Triangle 1: open channels between nodes A, B, and C (A ⇨ B, B ⇨ C, C ⇨ A)
- Triangle 2: open channels between nodes A, F, and E (A ⇨ F, F ⇨ E, E ⇨ A)
- Triangle 3: open channels between nodes C, D, and E (C ⇨ D, D ⇨ E, E ⇨ C)
- Triangle 4: open channels between nodes F, D, and B (F ⇨ D, D ⇨ B, B ⇨ F)
Mode 2: Square-Based Liquidity Swaps (j24ukko’s proposal)
- Square 1: open channels between nodes A, B, D, and E (A ⇨ B, B ⇨ D, D ⇨ E, E ⇨ A)
- Square 2: open channels between nodes A, F, D, and C (A ⇨ F, F ⇨ D, D ⇨ C, C ⇨ A)
- Square 3: open channels between nodes F, E, C, and B (F ⇨ E, E ⇨ C, C ⇨ B, B ⇨ F)
4. Resulting Channel Network
After completing either modes, the Channel network will look like this:
- Node A: 2 incoming and 2 outgoing channels
- Node B: 2 incoming and 2 outgoing channels
- Node C: 2 incoming and 2 outgoing channels
- Node D: 2 incoming and 2 outgoing channels
- Node E: 2 incoming and 2 outgoing channels
- Node F: 2 incoming and 2 outgoing channels
5. Practical Benefits
1. Resilience: multiple paths ensure network functionality even if some nodes fail.
2. Privacy: Symmetry makes it harder for observers to trace transactions.
3. Efficiency: shorter paths reduce latency and fees.
6. Implementation Challenges
- Complexity: Setting up the octahedron structure may require technical expertise.
- User Experience: Simplified interfaces and automated tools are needed for broader adoption.
- Economic Incentives: Fair reward mechanisms are essential to encourage participation.
7. Future Research
- Conduct large-scale simulations to test performance under various conditions.
- Explore integration with existing LN protocols.
- Develop economic models to ensure equitable participation
8. Conclusion
The octahedron-based architecture offers a promising solution to LN’s routing challenges. By following this guide, you can replicate the experiment and contribute to advancing decentralized payment systems.
9. Acknowledgements
FestinaLente would like to thank the other five participating Nodes (i.e. BitcoinVoucherBot-X, balbyBTCnode, antistate, Sunny Sarah, j24ukko) who believed in this small Project and allowed the construction of the first regular Octahedron in the Lightning Network (the Genesis Octahedron). A special thanks goes to Massimo Musumeci for the space reserved in his Blog and to all the cyber (and also cypher) friends of the Telegram Group Lightning Nodes Runners. Only jointly, we can work to change the System!
I like it ! Fun stuff for Lightening nerds!