Paid exits

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.

Four layers compared side by side: advertising, payment, identity and enforcement. TollGate uses kind 10021 with metric and step_size tags, sells prepaid steps, names the customer in a session event, and cuts off at the gate. fips exits use a different parameterised event with an access value, sell packages or a continuous channel, admit by source address, and cut off at the exit. A closing band explains that both do the same four jobs, so the useful move is translation rather than unification.

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:

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:

  1. Two event shapes. TollGate publishes kind 10021 with metric/step_size/ price_per_step. A fips exit publishes a parameterised replaceable event carrying access: open | allow-list | paid plus 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.
  2. 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.
  3. Package versus step pricing. A package of “1 GB” and bytes at a step_size are convertible. A package “until 18:00” is not expressible as steps without a clock, and the until clock already depends on the device’s wall clock. Worth deciding before someone writes a translator that quietly rounds.
  4. 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

  1. 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.
  2. 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.
  3. 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.
  4. Only then consider a TollGate pay-as-you-go tag, and only if channels get used.

Questions worth putting to freaky

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.