FiberDevs

FiberDevs's avatar
FiberDevs
npub1fxq5...tahv
Building a scalable, privacy-by-default P2P payment & swap network⚡
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! 👉 image ## 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." () 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. image 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. image 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 () and Basis of Lightning Technology () - Fiber's GitHub: Here is the full presentation from the Chiang Mai talk CKB Fiber Network Engineering Updates: