Blows my mind: The devs of TollGate, which uses Cashu for paid WiFi Internet, designed unidirectional ecash payment channels to make thousands of micropayments with a single ecash token – user to WiFi router – without pinging the mint for each payment.

Cashu L2... Bitcoin L4?

Reply to this note

Please Login to reply.

Discussion

It’s def not bitcoin L4 lol

looking for devs2plebs bridge, anyone?

That PR is just an update to the CDK that (my current version of) the channel demo depends on

I'll share more soon. I got it fully working yesterday, so will share it this week, maybe today

I saw a working demo today. The explanations that nostr:npub1zthq85gksjsjthv8h6rec2qeqs2mu0emrm9xknkhgw7hfl7csrnq6wxm56 gave me last week and today would make a perfect tutorial video for making lightning on cashu accessible to non cryptographers.

The future is so bright 😀

lightning on cashu, fml

it's a wallet-only change, right?

Correct. No mint change

Any mint supporting P2PK (and DLEQ, for a paranoid receiver to check that the 2x2 proofs are correct) will support this.

The PR I made isn't specific to this channel issue. It's a PR about SIG_ALL+locktime+refunds, which (I think) wasn't fully supported by the CDK

But I'm very new to the internals to the CDK code, so maybe my fix isn't going in the right direction

69.1

Can you point to any more details for plebs like me that would like to understand more why and how your mind is blown ?

There's a draft writeup of the idea here, with the basic details of how it works trustlessly: https://github.com/cashubtc/nuts/pull/296/files .

The two channel partners, Alice and Bob, trust the mint but not each other.

I've got some code working to show the basic idea, I'm new to all this so I wanted to see working code before getting too excited 😀. I expect to be able to share it in the coming days, maybe even today if things coming together nicely

In this, Alice and Bob need to coordinate with the mint to open the channel and to close it, but the mint does not need to be involved in each individual micropayment while the channel is open. Like Lightning, two channel partners can send signed transactions to each other. This allows very high frequency

Billions of payments (unidirectional for now, but I think it can be made fully two way) can be send, and we do NOT need to prepare billions of individual tokens. Just a few dozen (1 sat, 2 sats, 4 sats, 8sats)... is sufficient

The doc linked above shows how the double spending is solved; i.e. Bob cannot take more than he is entitled to. And Alice can get a refund of the remainder, after a locktime has expired, even if Bob doesn't cooperate

Sorry that this is a little vague; read the doc for more. And we'll post some code soon

Thanks for the pointer. And the work !

Finally a decent tweet.

Honestly couldn't understand the tweet and had to use AI to get some explanation 🤦‍♂️.

Attaching the explanation below in case someone else is struggling:

```

### Breaking Down the X Post

This post, written by @callebtc (a developer behind the Cashu protocol), is buzzing with excitement about a clever Bitcoin innovation in the world of decentralized internet access. It's highlighting a real-world application that's both practical and technically mind-bending. I'll explain it step by step, starting with the basics and building up to why it's so impressive—and what that cryptic ending means.

#### 1. **What is TollGate?**

TollGate is an open-source project that turns everyday WiFi routers into mini "pay-as-you-go" internet service providers (ISPs). Imagine this:

- You install **TollGateOS** (a custom firmware based on OpenWRT) on a compatible router.

- The router broadcasts a public WiFi network (like those in hotels or cafes).

- Users connect and pay **micropayments** (tiny amounts, e.g., a few satoshis per minute or MB) for access.

- Router owners earn those payments for sharing their bandwidth—think selling excess internet to neighbors, travelers, or even in remote areas without traditional ISPs.

It's designed for privacy and sovereignty: No central company controls it, and it's built to work offline for payments (more on that below). As of mid-2025, it's still early-stage but has been demoed at Bitcoin events, like the Canadian Bitcoin Conference, where attendees bought WiFi time with ecash. The project received funding from groups like the Human Rights Foundation (HRF) and OpenSats to support "freedom tech."

#### 2. **What is Cashu, and Why Use It Here?**

Cashu is an open-source protocol for **Chaumian ecash**—a privacy-focused way to handle Bitcoin payments off the main blockchain. (Named after David Chaum, the "godfather of digital cash.") Here's the gist:

- You deposit Bitcoin (via Lightning Network) into a **Cashu mint** (a server acting like a digital bank).

- The mint issues you **ecash tokens**: These are blinded, reusable digital "bills" (e.g., a token worth 2,100 sats) that look like random strings of text. They're private—no one can trace who owns them.

- You spend tokens peer-to-peer (P2P) without needing the blockchain or even internet for the transfer. The recipient can later redeem them at the mint for real Bitcoin.

Why Cashu for TollGate? Traditional payments (e.g., credit cards or even Lightning invoices) require online verification for *every* transaction, which is slow and data-hungry for WiFi hotspots. Cashu enables **offline micropayments**: You can pay for internet access even in spotty coverage areas, and it's censorship-resistant (no KYC or tracking).

#### 3. **The "Mind-Blowing" Part: Unidirectional Ecash Payment Channels**

This is the technical wizardry that has devs geeking out. Normally, ecash is great for one-off spends, but TollGate needs to handle *thousands* of tiny payments (e.g., per second of streaming) without constant back-and-forth to the mint—which would kill battery life, add latency, and leak privacy.

The TollGate devs innovated with **unidirectional ecash payment channels**:

- **How it works**:

1. User gets a single large ecash token from a mint (e.g., worth 10,000 sats for ~30 minutes of WiFi).

2. Upon connecting to the router, the user "opens a channel" by sending this token to the router (unidirectionally—one-way, like handing over a gift card).

3. The router now "owns" the token and deducts micropayments internally (e.g., 1 sat per 10 seconds) as you use data. No further mint checks needed—it's all local accounting on the router.

4. When the balance hits zero, access cuts off. Later, the router redeems the full token at the mint for Bitcoin.

- **Why unidirectional?** It's one-way flow (user → router), avoiding the complexity of bidirectional channels (like Lightning, which juggle incoming/outgoing payments). This keeps it simple, fast, and secure for high-volume micropayments.

- **Benefits**:

- **Scalability**: One token handles 1,000+ tiny txns without network pings.

- **Privacy**: No per-payment metadata leaks to the mint.

- **Offline resilience**: Works even if the mint is down or you're in a dead zone.

- **Low overhead**: Perfect for IoT devices like routers with limited resources.

This is like giving a vending machine a $20 bill upfront, and it gives you snacks until it's "spent"—but digitally, privately, and with Bitcoin.

#### 4. **The Punchline: "Cashu L2... Bitcoin L4?"**

This is a playful nod to Bitcoin's scaling "stack":

- **Bitcoin L1**: The base blockchain—secure but slow/expensive for tiny payments.

- **L2 (Layer 2)**: Off-chain solutions like Lightning Network, which batch transactions for speed (e.g., instant sats).

- **L3/L4**: Higher layers for even more specialized apps (e.g., state chains or app-specific protocols).

The poster is saying: Cashu acts like an L2 for Bitcoin (ecash off-ramps for privacy/scalability). But TollGate's channels push it further—to an "L4" where Bitcoin powers niche, real-world apps like sovereign WiFi meshes. It's Bitcoin evolving into everyday infrastructure, layered high enough to feel like magic.

In short, this post celebrates how Bitcoin isn't just "digital gold"—it's enabling grassroots networks where anyone can monetize bandwidth privately and peer-to-peer. If you're a dev, check out the TollGate GitHub for building your own; if you're a user, it's a glimpse of a future with sats-for-surfing. Mind blown yet?

would make a lot of sense for starlink users perhaps? as they’re mostly using it in areas with challenging cell service and fiber limitations

that’s me in this situation right now and seeing some neighbor starlink wifi