Review · 2026-11-30
Is fips-exit-pay already a TollGate implementation?
A layer-by-layer comparison of fips-exit's payment service against the TollGate specification, in both directions: what it already does that TollGate does, what TollGate does that it does not, and the two places where the spec itself would have to change to accommodate it.
A fair question, and the honest answer is yes at the level of function and no at the level of protocol. Both are true, and which one matters depends on what you are trying to do.
The claim worth taking seriously: fips-exit-pay sells access to a network connection, priced against a metered quantity, paid in ecash or over Lightning, with an allowance that expires and a cutoff that enforces it. That is what TollGate does. The difference is that it does it in a different vocabulary, with a different unit of sale and a different place where traffic is stopped.
Above: the same four jobs in two vocabularies. The spec comparison is TIP-01 and TIP-02 against docs/how-it-works.md, docs/being-found.md and docs/channels.md.
Where they already agree
These are not small. They are the load-bearing ideas, and both implementations arrived at them independently:
- Cashu as the payment rail. Multiple mints, multiple units, a mint URL in the offer. TollGate puts them in
price_per_steptags; fips exits put them in the paid advert. Same concept, same primitives. - A priced, metered, expiring allowance. TollGate sells steps of a metric; fips sells a package of bytes or until a time. Different units, identical shape.
- Enforcement by packet drop, in userspace. Neither asks the customer to be well-behaved. Both stop traffic when credit runs out.
- An offer published on Nostr and signed by the seller’s own key. Both treat the advert as a hint and the key as the identity.
- No account, no subscription, no identity check. The same product promise.
If the question is “could a customer of one be a customer of the other in spirit”, the answer is plainly yes.
Where they diverge — and each divergence has a reason
The unit of sale. TollGate steps are milliseconds or bytes, priced per step, with a min_steps floor. fips sells a package with a size or an expiry. The difference is not cosmetic: TollGate’s model is a meter running down, fips’s is a purchase that expires. A gate that wants to sell “one hour” has to say it as 60 steps of milliseconds in one vocabulary and as a time-limited package in the other.
Continuous payment. channels.md implements pay-as-you-go: the client locks ecash at a mint for itself and this exit together, and each payment is a number rather than a new token. TollGate has no equivalent. This is the one place where fips-exit is ahead of the spec rather than beside it, and the note arguing for channels as the natural home for a TollGate session ID was right about that gap.
Who the customer is. TollGate names the buyer in a session event — kind 1022, a p tag holding the customer’s pubkey, with an allotment and a metric. The gate is told who is buying. fips needs no such thing: the client is admitted because its source address is its key, and the daemon refuses a packet whose inner source is not the address it authenticated. There is nothing to hand over because nothing is claimed.
That divergence is the deepest one, and it is also the good news. The checkout question everyone has been circling — how does the gate learn the customer’s identity? — does not arise between fips nodes at all. It is already answered by the transport. It arises only when a TollGate has to bill someone who is not a fips peer, which is the client-knows-only-IP case.
Where traffic is stopped. TollGate stops it at the gate, because the seller is local and so is the traffic — and that is exactly why a customer with nothing installed can be served. fips stops it at the exit, because the seller is remote, and that is exactly why it cannot serve that same keyless customer.
So does the spec need to change?
Only for one purpose, and the distinction matters because changing a spec is expensive and merging two payment systems is worse.
For a TollGate that fronts a fips exit — no. The router buys from the exit as a fips client. Inside, it meters its own customers however it likes, with its own accounting. The exit sees one customer: the router. Nothing in TIP-01 or TIP-02 needs to know that fips exists. This is the cheap integration, and it needs no coordination with anyone.
For one advert serving both kinds of client — yes, and only a little. If a single relay entry is supposed to tell a TollGate client and a fips client what is on offer, then either the two advert formats reconcile or a translator publishes one from the other. The concrete gaps:
- Two event shapes. TollGate publishes
kind 10021withmetric/step_size/price_per_step. A fips exit publishes a parameterised replaceable event carryingaccess: open | allow-list | paidplus price, packages, mints and port. Neither client can read the other. This is the real cost, and it is the same two-OUI problem in a different place. - A field saying who may buy. TollGate’s advert has no equivalent of
access = paid | open | allow-list. A TollGate is assumed to be sellable; a fips exit states its mode. Adding one optional tag would let one reader classify both. - Package versus step pricing. A package of “1 GB” and
bytesat astep_sizeare convertible. A package “until 18:00” is not expressible as steps without a clock, and theuntilclock already depends on the device’s wall clock. Worth deciding before someone writes a translator that quietly rounds. - Channel payments have no TollGate tag. If a TollGate ever accepts pay-as-you-go, the advert has to say so, and there is no tag for it today.
Every one of those is an optional additive tag, not a change to existing semantics. That is the good outcome: a client that does not understand the new tags keeps working, which is what a spec change should cost.
What we actually need, in order
- Ship the fronting integration first. Router buys from a fips exit, meters its own clients. No spec change, no coordination, and it proves the whole chain.
- Write the advert translator — one process that reads a fips advert and republishes it as a TollGate
kind 10021, and the reverse. Small, testable, and it makes the two worlds mutually discoverable without either side changing. - Propose one optional tag on TIP-01 for the access mode, with the translator as the argument for it. Additive, ignorable, and it removes the divergence that matters most for discovery.
- Only then consider a TollGate pay-as-you-go tag, and only if channels get used.
Questions worth putting to freaky
- Does the paid advert’s price describe the same quantity as
price_per_step, or is a package deliberately a different sale? If deliberately different, a translator should not pretend otherwise. - Are the package
mintsexactly theprice_per_stepmint list, or can a package accept a mint it does not advertise? - For a channel, what would the exit want a TollGate to tell it — a session id, the buyer’s npub, or nothing at all because the address suffices?
- Would he accept an
accesstag on the TollGate advert, or does the value belong only on the exit side?
The short answer
fips-exit-pay is a complete implementation of the same product — metered network access sold for ecash — and it is ahead of TollGate on continuous payment. It is not a TollGate protocol implementation, and making it one would be the wrong goal. What the two need from each other is a translator and one optional tag, not a merge. And the integration that matters first, a router fronting a fips exit, needs no spec change at all.