research prototype
Low-layer TollGate under FIPS
Researching per-transport metering: L0/L1/L2, bent-pipe radios and denial-of-service cost.
What it is
The shipped TollGate charges for gateway access: a captive portal, backed by firewall rules, opens and closes a session for a client. The low-layer work asks a different question: can the transport itself be metered and paid for, per link and per byte, rather than per gateway session?
In a FIPS network the useful seams are:
- L0 — the socket, nft/tc rule or radio layer. It sees addresses and bytes, but addresses are spoofable, so L0 is for rate limits and flood control, never authorization.
- L1 — link admission after the Noise handshake. It sees the proven npub and can admit, deny or credit a peer.
- L2 — the established data plane. It sees the npub and the counters, so it can meter, pause and renew transit.
The point of “per transport” is a policy scope, not a copy of the payment code inside every radio driver. A price can be attached to an npub over a specific transport, while the transport layer remains identity-blind.
What exists today
The public research repository contains the three-seam design, wire-byte metering, an offline Cashu/P2PK receiver with a durable replay journal, and a live three-node FIPS-local UDP service. The suite has recorded 194 passed + 14 subtests. The work is a host prototype: it is not production, it has not flown, and it is not merged upstream.
The payment is prepaid, not atomic. A small Cashu token buys a small amount of transit; the gate verifies it without a mint round-trip, records the spent proofs so it cannot be replayed, and credits the session. Forwarding pauses when the balance is exhausted. The amounts are small and frequent on purpose: the customer risks one increment, not the whole bill. Cross-mint swaps are a treasury path, deliberately outside admission.
The important result is not a throughput number. It is that the seams are measurable and that a paid path can be tested without pretending the whole mesh is solved.
Why it matters to TollGate and Bitcoin
If TollGate only charges for a gateway session, a transport operator cannot recover the cost of carrying traffic that never reaches a gateway it controls. A low-layer gate changes that: a bent-pipe radio, a balloon link or a community backhaul can charge for bytes that pass through it.
It also changes the economics of abuse. L0 rate and flood controls reduce exposure; a paid transport makes sending traffic to a node cost something. This is not a claim that one node prevents all denial-of-service traffic. It is a claim that the transport owner can be compensated for carrying it, rather than absorbing the cost silently.
Price is not the flood control. A prepaid balance bounds how much a peer can send, but a flood is a rate, and a balance can be spent in seconds while the link is already saturated. The cap has to be a token bucket or a connection limit. The price decides what admitted traffic costs and how large a bucket the peer has paid for; it does not decide which packets to drop at line rate. At L0 there is no one to bill, because the source address is spoofable.
Status
Research prototype. The design and host evidence exist. Production integration, exact frame classes, embedded durability and real radio timing remain open. This is forward work, not the reason the project exists.
What is still open
The seams are measured on a host. They are not production:
- integration into a real relay controller, not a harness
- exact frame classes and what is billable
- durability on constrained hardware
- radio timing, which a host prototype cannot test
- whether L1 admission is pay-before-connect (a P2PK token bound to the npub, presented at admission or after an out-of-band checkout) or pay-after-connect (link admitted, all chargeable transit blocked, only the payment lane open); the first is cleaner for bearer instruments, the second is only needed for interactive checkout
Companion notes. Is fips-exit-pay already a TollGate implementation? compares the two layer by layer against TIP-01 and TIP-02.
Get involved
low-layer-tollgate-exploration— start with0001-three-seams.md.fips— the transport.- If you work on eBPF, nftables or embedded storage, this is the seam that needs you.
Issues and questions: open one in the repo, or message the TollGate team on Nostr (npub1zzt0d0s2f4lsanpd7nkjep5r79p7ljq7aw37eek64hf0ef6v0mxqgwljrv, also in the index).