Technical Overview

1. Background & Motivation

Submarine swaps enable atomic, trust-minimized transfers between on-chain CKB and off-chain Fiber Network channels. This feature is modeled after Lightning Loop (Lightning Loop Swap Case Study ) and addresses key liquidity challenges for users who need to move funds between on-chain and off-chain environments without closing channels or relying on custodial services.

Key Use Cases:

2. Technical Approach

3. User Stories & Priorities

  1. Swap Out (P1): Move funds from Fiber to on-chain. Highest priority, foundational for all other features.
  2. Swap In (P2): Move on-chain funds to Fiber. Complements Swap Out for full bidirectional liquidity.
  3. Instant Swap Out (P3): Fast swaps using reservations, optimized for user experience.
  4. Autoswap (P4): Automated, rules-based liquidity management for advanced users and routing nodes.

Each user story is independently testable and can be delivered incrementally.

4. Data Model & State Machines