We’re sharing Scryve Reads, a live demo testnet experiment that demonstrates what happens when a payment protocol actually clears money in real time.
What It Does
Scryve Reads is a pay-per-section reader. Open a document, read for free until you hit a paywall, then scroll to the end of your current section. An invisible sentinel catches that scroll, auto-triggers a payment, and the next section unlocks. No signup beyond a JoyID passkey. Real money moves on every read.
The flow is simple:
- You scroll to the end of a section.
- Your browser (running a Fiber WASM node) sends an HTLC payment to the operator.
- The server waits ~6 seconds for that HTLC to propagate, then checks the operator’s invoice status.
- Content unlocks. The author’s balance ticks up.
- Later, the author claims their earnings via a real CKB on-chain transfer to their JoyID address.
No batch settling. No refunds on unread content. No subscription cancellation UX. You read, you pay, it’s done in seconds.
The Wallet
Every reader gets a real Fiber payment channel running in their browser- a full fnn WASM node with its own keypair, derived deterministically from their JoyID identity. The node connects directly to the operator, opens a channel with actual on-chain funding, and can send/receive HTLCs.
Balance persists across page reloads via encrypted IndexedDB snapshots synced to the server. Same JoyID on a second browser? You get a fresh channel (cross-browser migration is intentionally disabled - two browsers with the same libp2p peer ID can’t both maintain an operator channel). The UI tells you to open a new one.
If your channel runs low mid-read, the wallet sheet pops with the channel list right there - close one, open another, keep reading.
Payment Gate (L402 + Macaroons)
The server uses HTTP 402 + macaroons to gate access:
- First request (no auth) → server returns 402 with a Fiber hold-invoice + a macaroon.
- Client pays the invoice via HTLC, then retries with the macaroon in the Authorization header.
- Server verifies the macaroon (checks caveats match the resource), waits for the HTLC to settle on the operator side (~6s), then returns the content.
The preimage lives server-side in SQLite. If the HTLC arrives and settles, the preimage is revealed and the author gets credited. If it times out or fails, it’s refunded and no ledger entry is written.
Author Earnings
Writers publish chapters with a TipTap markdown editor. Every chunk has a configurable price in cents. When a reader pays to unlock it, a pending balance row lands in the ledger:
Code
author_joyid_address | pending_cents | payment_hash
Authors can see their pending earnings at /author?joyidAddress=... and click “Claim” to sweep the balance as a real CKB on-chain transfer to their JoyID wallet.
What You’ll See
Five curated essays ship pre-loaded:
| Essay | Topic |
|---|---|
| Pay by the Paragraph | HTTP 402, L402, how this app works |
| Channels of Trust | Fiber payment channels and HTLCs |
| Cells, Not Coins | The CKB cell model |
| The Nervos DAO | Storage rent and refunds |
| Browsers as Nodes | What WASM Fiber nodes can and can’t do |
You can publish your own chapters, edit them, delete them, watch readers unlock them, and claim your balance.
Built On
This is built on @RetricSu’s fiber-pay SDK. The payment channel implementation, invoice minting, WASM node compilation, hold-invoice mechanics, and L402 harness are his work. We built:
- Wallet lifecycle and state management with 2PC durability
- Reading UX that gates on actual scroll progress
- Cascade-charge prevention and auto-debit logic
- L402 gate with server-side preimage caching
- Author ledger with pending/settled tracking
- On-chain claim settlement flow
- Encrypted wallet backup and cross-device sync
- JoyID identity + wrap-key crypto
- All the retry loops, error handling, and recovery paths
Try It
As a reader:
- Visit https://reads.scryvehq.com/
- Click “Sign in with JoyID” (set up a passkey if first time)
- In the wallet sheet, click “Open a channel”
- Set amount: 500 CKB (or less for testing)
- Wait ~1–3 minutes for on-chain funding confirmation
- Once the channel shows “Ready,” open a demo essay
- Scroll through the free section, then scroll past the end
- The next section auto-unlocks after payment settles (~2-10 seconds)
- To claim earnings (if you published), go to your author dashboard and click “Claim”
As an author:
- Sign in with JoyID
- Go to /publish
- Write in markdown, set price per chunk
- Publish
- Readers can now unlock your content
- Earnings appear in your pending balance as they unlock
- Click “Claim” to transfer to your JoyID wallet
Status
Testnet MVP. Verified against fnn v0.8.1 on CKB testnet.
Why It Matters
Most “micropayment” demos show fake payments or batch settle once a day. Scryve Reads uses actual Fiber HTLCs. Every read is a real signed commitment in the operator’s channel graph. Authors receive real CKB on-chain. Settlement takes seconds, not hours.
That constraint changes everything. It’s why we gate payments on actual reading progress (not on page load), why we auto-debit only after scroll, why we abort cascade charging with idempotency keys, and why the UX feels like friction-free commerce instead of a paywall.
If you’re building on Fiber or curious about L402 paywalls, L1 claim settlement, or what a WASM payment node in the browser can actually do, this is worth exploring.
Got questions? Find us on the Nervos community channels.
– Scryve Team




