Just got back from CKCon in beautiful Chiang Mai🌴! Our dev gave a talk on Fiber and hacked an interactive visual simulation to show how it works.
If you couldn't make it, below is a shorter version.
But first, try playing with the dots yourself! 👉 https://t.co/wVCPSLdMoF
Why Layer 1 Isn't Enough
We all love Layer 1 blockchains like Bitcoin or CKB for their security, but let's be honest: they aren't exactly built for speed.
Every transaction has to be shouted out to the entire world and written down by thousands of nodes. On CKB, you're waiting about 8 seconds for a block; on Bitcoin, it's 10 minutes! Plus, the fees can get nasty if you're just trying to buy a coffee. ☕️
So how to fix this?
Lightning Network 101
The Lightning Network is a scalable, low-fee, and instant micro-payment solution for P2P payments.
The secret sauce isn't actually new. Even Satoshi Nakamoto hinted at this "high-frequency" magic in an early email:
"Intermediate transactions do not need to be broadcast. Only the final outcome gets recorded by the network."
(https://t.co/WvpRYcwbV3)
A Lightning Network consists of Peers and Channels. A peer can send, receive, or forward a payment. A Channel is used for communication between two peers.
Imagine you and a friend want to trade money back and forth quickly:
1. Opening the Channel: You both put some money into a pot and sign a Funding Tx. This goes on the blockchain (L1).
2. The Fun Part (Off-Chain): Now that the channel is open, you can send money back and forth a million times instantly! You just update the balance sheet between you two (using HTLCs and signatures). No one else needs to know, and no blockchain fees are paid yet.
3. Closing the Channel: When you're done, you agree on the final balance, sign a Shutdown Tx, and tell the blockchain.
Everything in the middle? That's off-chain magic. ✨
The Power of the Network
Now, if Fiber was just about paying your direct neighbor, it would be boring. The real power comes from the Network.
This means Alice can pay Bob even if there's no direct channel between them. The payment can travel through one or more intermediate nodes. As long as there is a path with enough liquidity, the payment will reach its destination instantly.
All data is wrapped in Onion Packets (yes, like layers of an onion). The nodes in the middle serve as couriers, but they are blindfolded:
- They don't know who sent the money.
- They don't know who is receiving it.
- They only know "pass this to the next guy."
They simply follow a basic rule: they forward the Hash Time Lock, and if the payment succeeds, they earn a tiny fee for their trouble. Easy peasy.
The Not-So-Easy Part 😅
While the idea is simple, building it is... well, an engineering adventure. We're dealing with cryptography, heavy concurrency, routing algorithms, and a whole jungle of edge cases. But hey, that's what makes it fun!
We've poured the last two years into building Fiber, and I'm proud to say it’s finally GA-ready.
If you want to geek out on the details, check these out:
- Mastering the Lightning Network (https://t.co/aZzI0fT32g) and Basis of Lightning Technology (https://t.co/XnetE4YcaF)
- Fiber's GitHub: https://t.co/jilL7GVzaq
Here is the full presentation from the Chiang Mai talk CKB Fiber Network Engineering Updates: https://t.co/pqb1tKK5ou
@NervosNetwork@Cryptape
Another experimental demo is out🌱
Join Airdrop — a lightweight airdrop-lock contract where users fund their own Cells first to register for the airdrop & receive tokens.
Built entirely in TypeScript.
What it solves:
In CKB's cell model, airdrop issuers typically need to provide extra CKBytes so receivers can accept tokens. Join Airdrop flips this around — users join first and prepare their Cells themselves, making token distribution a lot smoother.
It's a simpler, more scenario-specific alternative to the more general AnyOneCanPay script: https://t.co/VLszInzABX.
🪂 Try it out: https://t.co/JflmPRCOJC
🐙 Repo: https://t.co/Xej5DrvOjt
🙋Got ideas or feedback? Join the discussion on Nervos Talk: https://t.co/tpJgNPSv31
@NervosNetwork@CKBDevrel
🧪 Curious how Fiber handles liquidity? Here's a complete survey of all the solutions we've reviewed and what we plan to implement.
Surveyed Solutions
01 Shaduf++
Paper: Shaduf++: Non-Cycle and Privacy-Preserving Payment Channel Rebalancing (https://t.co/KthPpWpGX4)
The intermediate user can shift funds between adjacent channels.
Say there're two channels. Channel Beta is between Alice and Bob with the distribution: (Alice: 10, Bob: 20). Another Channel Gamma is between Bob and Carol with the distribution: (Bob: 1, Carol: 19). Bob can shift 10 from (Alice, Bob) to (Bob, Carol) and the distributions become:
- (Alice: 10, Bob: 10)
- (Bob: 11, Carol: 19)
Limitations:
- Users can only shift funds between channels after recording the binding via an on-chain transaction.
- Channels binding will specify the max allowed shifted-out amount in both channels.
- For each channel, the sum of all max allowed shifted-out amount in all recorded bindings should be no greater than the channel capability. All the information is available on-chain so anyone can verify this. This is also the reason that shift requires an on-chain transaction to record the binding.
How to use:
- It can be used as a fallback that when a forwarding node has no enough balance in the outbound channel. If it has enough fund in the inbound channel, it can try to shift funds between channels.
- A node can scan its channels and schedule shifts in advance to improve the funds distributions in these channels.
02 Split
Paper: Study and Implementation of Split Multi-Channel Rebalancing Strategy for Off-Chain Payments (https://t.co/rN9tbQfN7r)
This paper has brief introduction to Revive and Shaduf as well.
B→C→D→B are performing Revive, C→E→F are performing Shaduf
Split is a rebalancing planning algorithm. It monitors the traffic in the network and generates a rebalancing plan to shift funds between channels. In simple words, it automate the execution of Shaduf.
The planning algorithm is based on another paper: P. Li, T. Miyazaki, and W. Zhou, Secure balance planning of off-blockchain payment channel networks (https://t.co/LOp77AvOAh). The core contribution is PnP, a balance planning service that determines how much funding should be initially deposited into payment channels given estimated payment demands among network nodes.
03 Horcrux
Paper: Horcrux: Synthesize, Split, Shift and Stay Alive Preventing Channel Depletion via Universal and Enhanced Multi-hop Payments (https://t.co/ISJbVDhPpX)
This protocol is like an automatic Shaduf++ on payments. It establishes a Virtual Channel along the payment path to implement funds shifting.
Other virtual channel designs:
1. Stefan Dziembowski, Lisa Eckey, Sebastian Faust, Julia Hesse, and Kristina Hosátková, Multi-party virtual state channels (https://t.co/opvrmxGlJ5)
2. Stefan Dziembowski, Sebastian Faust, and Kristina Hosátková, General state channel networks (https://t.co/1ouYfFDAAe)
3. Aggelos Kiayias and Orfeas Stefanos Thyfronitis Litos, Elmo: Recursive virtual payment channels for bitcoin (https://t.co/eH5KP0EB5Q)
4. Lukas Aumayr, Pedro Moreno-Sanchez, Aniket Kate, and Matteo Maffei, Breaking and fixing virtual channels: Domino attack and donner (https://t.co/utrf2BmVUs)
04 Musketeer
Paper: Avarikioti, Z., Schmid, S., & Tiwari, S. (2023). Musketeer: Incentive-Compatible Rebalancing for Payment Channel Networks (https://t.co/Eh6UWEGRfB)
All users submit their liquidity and bid.
- Liquidity: How much sellers are willing to allocate for routing/rebalancing.
- Bid: How much buyers are willing to pay for rebalancing the channel.
The protocol generates rebalancing plan based on the global liquidity and bid submissions.
05 Starship
Paper: Xu, M., Yu, W., Shang, G., Qi, G., Duan, D., Wang, S., Li, K., Zhang, Y., & Cheng, X. (2025), Starfish: Rebalancing Multi-Party Off-Chain Payment Channels (https://t.co/Pb2SDmdBUG)
Shaduf requires N on-chain transactions to submit bindings. Starship batches these transactions in a star topology, where a central hub connects to N peers. However, the batch requires synchronous consensus from all N+1 parties. The paper uses atomic broadcast, but other BFT consensus algorithms also work.
06 Cycle
Paper: Hong, Z., Guo, S., Zhang, R., Li, P., Zhan, Y., & Chen, W. (2022). Cycle: Sustainable Off-Chain Payment Channel Network with Asynchronous Rebalancing. (https://t.co/9n2YhbX4Ju)
Rebalancing for a cycle topology. All parties in the cycle maintain a global offset Delta via a consensus algorithm using off-chain messages. In all the channels in the cycle, it is assumed that amount of Delta balance has been transferred from the sender to the receiver.
For example, for the cycle consisting of 3 channels:
- Alice to Bob: Alice 0, Bob 200
- Bob to Charlie: Bob 0, Charlie 200
- Charlie to Alice: Charlie 0, Alice 200
After applying the global offset Delta = -100, the balance becomes:
- Alice to Bob: Alice 100, Bob 100
- Bob to Charlie: Bob 100, Charlie 100
- Charlie to Alice: Charlie 100, Alice 100
Instead of sending real payments to rebalance the channel, Cycle turns the problem into how parties reach consensus on the global offset Delta.
07 Lightning Pool
Paper: Osuntokun, O., Fromknecht, C., Paulino, W., Gugger, O., & Halseth, J. (n.d.). Lightning Pool: A Non-Custodial Channel Lease Marketplace. (https://t.co/OlwGbJuwuK)
Lightning Pool solves liquidity problem using an auction on inbound channel bandwidth. Sellers promise to create channels with the required duration, and buyers pay the lease fee to these inbound channels.
To support the channel lease market place, fiber must support following features:
- Single funded channels. The inbound channel is fully funded by the seller.
- A mechanism to ensure sellers pay the lease fee. Sellers can pay the fee off-chain or promise to pay when they receive funds from the lease channels.
- A mechanism to ensure a channel is open for the required duration.
See also:
- 闪电网络:技术与用户体验(五):流动性获取(https://t.co/EWVjFmo70c)
- Liquidity Advertisement by Blockstream (https://t.co/g5aUinzoPl)
- Amboss Space Magma (https://t.co/qomxQw2Zfo)
08 Submarine Swap
Atomic swap between L1 (CKB) and L2 (Fiber). If Alice wants inbound channel, she can pays the service provider Bob on Fiber (so Bob will have balance to forward payments to Alice), and Bob will pay back the received funds to Alice on CKB.
See also:
- Loop | Builder's Guide: https://t.co/PYUUEB5LMY
- 闪电网络:技术与用户体验(五):流动性获取(https://t.co/EWVjFmo70c)
09 Zero-Conf Channels
When users trust the service provider, users can send funds to the service provider on chain and the service provider will open channels to users and transfer the funds after deducting the fee immediately. Users can confirm the channel immediately after receiving the fund tx without waiting for confirmations on-chain.
10 JIT (Just-In-Time) Channels
When the service provider forwards HTLC to a user and the user has not enough inbound bandwidth, the service provider will open a new channel to provide inbound bandwidth for the user. The service provider can ask users to pay the fee via other channels using the same payment hash.
11 Liquidity Ads
Liquidity Ads (https://t.co/LOp77AvOAh) create a decentralized marketplace where nodes advertise their willingness to sell liquidity at specific rates. Buyers can discover these offers through the Lightning gossip protocol and request liquidity when opening dual-funded channels or performing splices. This eliminates the need for centralized liquidity marketplaces and provides market-driven pricing for channel capacity.
The specification introduces a `payment_type` field enabling multiple fee payment methods. Some examples:
- `FROM_CHANNEL_BALANCE`: Fees deducted immediately from the buyer's channel balance during the funding negotiation.
- `FROM_HTLC`: Fees deducted from future HTLCs routed through the channel, enabling zero-balance onboarding
- `FROM_FUTURE_HTLC`: Deferred fee payment from subsequent payment flow
- `EXTERNAL_PAYMENT`: Out-of-band payment mechanisms
Planned Solutions
☑️ Submarine Swaps
Submarine swaps enable atomic exchanges between on-chain CKB and off-chain Fiber channels, providing a trustless mechanism for users to manage liquidity without custodial risk.
Why Most Suitable for Fiber:
- Leverages existing HTLC infrastructure already implemented in Fiber
- Provides immediate liquidity access without protocol changes
- Non-custodial and trustless, aligning with decentralization principles
- Solves the critical inbound capacity problem for new users
Implementation Plan:
- Develop submarine swap service provider infrastructure. The commitment lock script may just work for the on-chain part of the swap.
- Create both normal swaps (on-chain to Lightning) and reverse swaps (Lightning to on-chain)
- Establish competitive fee structures (base fee + percentage)
☑️ Liquidity Ads
Why: Easy to implement
☑️ JIT (Just-In-Time) Channels
JIT channels allow users to receive Lightning payments immediately without pre-established channels, with the sender opening channels on-the-fly when first payment arrives or receivers have no enough inbound capacity.
Why Most Suitable for Fiber:
- Dramatically lowers user onboarding friction
- Reduces upfront capital requirements for end users
- Proven successful in Lightning Network ecosystem
Implementation Plan:
- Research LSPS2/bLIP-52
- Report on how to build LSP infrastructure with automated channel management
- Implement fee deduction mechanism from first received payment
- Implement single-funded channel support if not already available
- Implement zero-conf channel support if not already available
- Create standardized API for wallet integrations
☑️ Liquidity Pool Marketplace
A channel lease marketplace where liquidity sellers auction inbound bandwidth to buyers needing receiving capacity.
Why Most Suitable for Fiber:
- Creates sustainable economic incentives for liquidity providers
- Addresses the "inbound liquidity" problem systematically
- Enables price discovery for liquidity services
Implementation Plan:
- Implement single-funded channel support if not already available
- Implement zero-conf channel support if not already available
- Design and implement smart contracts to support lease channels
- Design marketplace API for buyers and sellers
- Design auction mechanism for channel leases (duration-based pricing)
Solutions to Watch
These solutions are inefficient and costly to maintain; we can monitor them for future developments.
- Shaduf++
- Cycle
- Split
What's Up with Fiber? A Status Check-In
Lately, we've seen some folks in the community wondering about Fiber's recent progress. Fair question. Payment channel networks are one of the toughest areas in blockchain — progress doesn't always make headlines.
Fiber kicked off in June 2024, launched mainnet in March 2025, and has now been running internally for about one year and a half. It's a good time to share an update — what Fiber's been building, where it stands today, and where it's headed.
Where We Are
First things first — Fiber development has never stopped.
Seriously. You can see ongoing updates on both X and GitHub (https://t.co/jilL7GVzaq).
Fiber is a payment channel protocol built on CKB — just like what Lightning is for Bitcoin.
It's also part of the Nervos' layered design: Layer 1 = CKB, Layer 2 = Fiber.
From the very beginning, Nervos has always been about building a layered network.
Fiber's challenges mainly come down to two aspects:
• Technical complexity: Payment channels themselves are difficult — arguably even more complex than blockchains.
• Ecosystem & killer app: Even if the protocol side goes smoothly, it still needs an ecosystem and killer apps to shine — and that part takes time.
In the past, Nervos has had other L2 projects like Godwoken and Axon. Today, the focus has shifted toward Fiber for payment channels, and Perun ( https://t.co/uSNDiyMtw9) exploring state channels.
Channel networks have always been central to Nervos' layered network vision — not some short-term hype cycle or bull-market buzzword, but a direction clearly stated in its whitepaper (https://t.co/YcU7IoxUPN) and vision statement from the start.
Nervos' technical path has consistently been PoW + UTXO + Layer 2 channels — a stable and purposeful design choice.
Engineering Updates
To give a clearer picture of the engineering depth involved, here's a snapshot of what we've been tackling in recent months:
• Security audit & fixes
Fiber underwent a security audit, which identified several issues. We spent more than one month addressing these to ensure Fiber’s security meets a high standard.
• Large-scale stress testing
We conducted large-scale internal testing, which revealed performance issues and resource utilization problems that are not easily detected during regular development. These have been (and continue to be) fixed to make the network more robust under real-world load.
• Extreme-case contract resilience
We've identified potential risks in the contracts under extreme scenarios. Now we're upgrading contract logic and watchtower-related code to mitigate them.
Other Challenges
• For payment channels, any party can exit at any time, potentially triggering a channel closure.
• Another major challenge is routing. Node only has partial network information, making it difficult to find the optimal path. As far as we know, there is no widely accepted best practice yet.
To address this, we've been experimenting with Multipath Payments (MPP) to improve routing reliability and efficiency. MPP (https://t.co/oLSos7pNfP) was first proposed in Lightning Network, and Fiber aims to adapt this approach to the Nervos ecosystem.
The challenges extend further:
• How to improve the routing success rate?
• To be a service node, you need to open channels with many peers, which requires locking significant liquidity and managing complex channel flows.
That said, Fiber doesn't shy away from its difficulties. The challenges stem from its deliberate design choices: a P2P topology, strong privacy, and dynamic payment routing. These are all hard, open problems. Lightning and Fiber both are still exploring.
What Fiber Is Solving
Fiber's position is the Layer 2 payment channel network for CKB — similar to Lightning for Bitcoin, plus extended for CKB's multi-asset and programmable features.
Among all Layer 2 approaches, channel networks (including Lightning, Fiber, Perun, etc.) stand out with their unique mix of properties — with regard to L1s and other L2 approaches like rollups.
Fiber's advantages are: low latency, low cost, and strong privacy — all while preserving near-L1-level security.
• Low latency: Transactions settle directly between involved peers, no waiting for global consensus.
• Low fees: only path-related fees apply in each payment; no network-wide overhead (since no global consensus).
• High privacy: only the peers involved in a payment route see the transaction; the rest of the network remains unaware (since no global consensus).
We've been working on Atomic Multipath Payments (AMP) to provide high privacy and secure multi-path payments. Originally proposed in the Lightning Network (see https://t.co/j8TkBoPdv3), AMP is being adapted for Fiber on Nervos.
Privacy is fundamental for real-world payments.
And let's be clear: privacy ≠ anonymity, and wanting privacy ≠ being shady.
Just two quick examples:
• Business-to-Consumer: A company paying employees in stablecoins — imagine if all salaries were public on-chain. Not okay.
• Consumer-to-Business: A milk tea shop accepts stablecoins. Its competitors could literally track its daily revenue from the blockchain. Not okay.
In short, privacy isn't optional — it's the baseline for any real economy. (BTW, MEV can be seen as a symptom of missing privacy.)
It's important to note that all this assumes near-L1 security. Sure, you could achieve similar performance with centralized systems — but that means inheriting the downsides of Web2 all over again.
What Fiber Could Enable
Fiber's core protocol is still evolving, but the goal is clear: to be an instant, private, and low-cost payment network built for the future.
Some possible use cases:
• Media streaming by micropayments: no accounts, no credit cards, no subscriptions — pay per second, literally.
• Streaming swaps: instant multi-asset swaps (USDI ↔ CKB ↔ BTC) over multiple paths.
• Streaming AI: pay per token or per reply — every message is a payment.
• Gaming: instant micro-settlement after each action/command in P2P duels or group matches
• Tipping in social networks
• P2P markets for bandwidth/storage/computation: p2p messaging for demand/supply matching, erasure coding for data redundancy, and stablecoin in channels for payments. https://t.co/gmGfsMfHBE
• Incentivized BitTorrent: integrating Fiber micropayments into DHT file sharing so uploads earn and downloads pay, discouraging freeloaders while keeping users anonymous. https://t.co/LYOHJ2rcL8
• Autonomous Vehicles & Machine economy: self-driving charge passengers per distance and use the payment for recharge, parking, or even making way on the road (if the passenger is running late) by paying nearby cars small amounts to let it pass.
• Virtual agent economy: your AI assistant paying other agents for booking flights, hotels, or concert tickets — no accounts or cards needed.
Some of these sound futuristic, some are already starting to happen.
They'll depend not just on technology, but also on ecosystem growth and market timing.
A Long-Term Road
We get it — ecosystems evolve at their own pace. Protocol layer moves slow and steady, while applications iterate fast.
Fiber is never about chasing narratives or hype. It's a long-term pillar of Nervos' architecture.
Its goal: enable open finance that is scalable, programmable, and privacy-friendly, all while preserving PoW-based security and decentralization that make the system trustworthy at its core.
In short: Fiber's here to stay, and we're still building.
More reading on Fiber:
• Architecture & Key modules: https://t.co/kv5Gjv12b6
• Nervos' advantage https://t.co/ktZsBjwSwp
• Inspirations from LN: https://t.co/kvkF66Pmse
• Website: https://t.co/gK3Yx2lszg
🚴 Fiber Dev Log 16 🚴
A quieter sprint for releases, as we focus on polishing and testing under the hood. ⚒️👷
We've been revisiting multi-hop cross-chain payment logic and experimenting with max-flow algorithms for smarter multi-path payments (MPP) routing.
On the atomic multi-path payments (AMP) side, we've been refining static invoices.
There's also been discussions & progress made on single-funded channels, which could simplify setup flows and improve capital efficiency by letting only one party provide the initial funding.
Fiber v0.6 is in sight -- after full-scale testing passes, we'll be ready to roll it out!
Full log: https://t.co/tATEZsGi1v
@CKBDevrel@NervosNetwork
Crypto is…
Desperate gamblers chasing their first bag.
Investors funding the buildout of the global casino.
Bankers hypnotizing the masses to collect their vig.
…all meaningless and ephemeral without the cypherpunks, who defend the dream of encrypted and unstoppable cash.