Tollbooth DPYC Value Network diagram

From Entrepreneurial Idea to Compensated Service: Value Exchange in the Tollbooth DPYC Network

Every Tollbooth DPYC service follows the same path from a founder's idea to a Patron's paid answer. This article walks that path one actor at a time, using a single map of the whole network, and it follows the sats and the dollars as they move between wallets along the way.


Tollbooth DPYC Value Network diagram: Bank, Lightning wallet, BTCPay, Patron, Operator, Authority, Nostr, the tollbooth-dpyc SDK and @tollbooth-dpyc/web libraries, hosts and the Bitcoin blockchain, with numbered flows of sats, dollars, tool calls and certificates
The Tollbooth DPYC Value Network. Select the image to see it full size.

Reading the Map

The map above shows every party that takes part in a Tollbooth DPYC sale, and each colored line carries a different kind of value. Orange lines carry Lightning sats, green lines carry US dollars, and cyan lines carry MCP tool calls and their answers. Violet lines carry certificates and identity proofs over Nostr, gold lines anchor events to the Bitcoin blockchain, and blue lines show what is built with what and where it is hosted. The numbered badges match the seven steps described below.

The Operator sits at the center because everything in the network either serves it or pays it. An Operator is an MCP server that sells tool calls, and it meters each call in a unit called api_sats. Around it stand the Patron who buys those calls, the Authority that provides tollbooth infrastructure and certifies each sale, the BTCPay service and Lightning wallets that move the money, the Nostr relays that carry credential messages, and the Cloud Service hosts that provide the network resources.

Step 1: How a Tollbooth Operator comes to Exist

Every Operator begins with an Entrepreneur who has conceived a service that a patron or an AI agent would gladly pay for, such as weather for a farm, a memory for an assistant, or a view into a brokerage account. The entrepreneur writes the business-specific behaviors. Commerce processing around that comes from two shared libraries: a python wheel for MCP servers and a npm module for frontend sites.

On the back end, the Operator code imports the tollbooth-dpyc wheel from PyPI, which supplies pricing, a credential vault, patron authentication, and an audit ledger. On the front end, a web site for the service uses the @tollbooth-dpyc/web module from npm, which supplies the patron sign-in, balance, and top-up pieces shared by every Tollbooth DPYC front end. That front end runs on Cloudflare, and it talks directly to its Operator's MCP back end, so a person at a browser and an AI agent in a chat reach the same metered tools.

The entrepreneur then deploys the Operator to a host. Most Operators run on FastMCP Horizon, and some run as WebAssembly components on Akamai's Spin platform, as described in Sub-Millisecond Operators. The Operator's till is its own BTCPay Server with an LND Lightning node, which in our network runs on AWS EC2. With an Operator-owned payment processor, no institutional exchange or additional payment processor stands between the Operator and its Patrons and no one asks the Operator or Patron for KYC paperwork before payments may occur.

Finally, the new Operator asks a Tollbooth Authority to adopt it. The request is signed with the Operator's own Nostr key, and once the Authority's owner approves it, the Authority provisions the Operator's Neon database for its ledgers and vaults. The Operator's BTCPay credentials then travel to it through the Secure Courier, an encrypted Nostr message that a human answers, rather than through a configuration file that anyone might leak.

The Tollbooth Sample Operator shows this whole path in one readable project, and the Pricing Studio app lets the Operator set and change the price of each tool.

Step 2: The Operator pre-funds its certification balance

Before an Operator may sell its first tranche of api_sats, it buys a balance of its own from its Authority. This is the first of the two currency flows that the article promised to follow. The Operator asks the Authority for credits, the Authority's BTCPay issues a Lightning invoice, and the Operator pays that invoice from the Operator's Lightning wallet to the Authority's BTCPay. Once the invoice settles, the Operator holds a pre-funded certification balance at the Authority.

That balance is how the network sustains itself. Each time a Patron later buys api_sats, the Authority draws a small ad valorem certification fee from the Operator's balance, and in return it signs a certificate for the sale. The fee is the only tax in the network; there are no royalty side-channels, no subscription to the Authority, and no per-call charge. Our Tollbooth Authority, the regional Tollbooth Authority North America, and the sub-regional Tollbooth Authority New England each certify Operators this way, and the DPYC Oracle lists who belongs to the community.

Step 3: A Patron on-ramps and proves who they are

A Patron is any person, or any agent acting for a person, who wants to use an Operator's tools. Unlike a conventional SaaS customer, a Patron never creates an account. A Patron is simply a Nostr public key, an npub, that the Patron generated and controls. When an Operator needs to know that a connection really acts for that npub, it sends a challenge as an encrypted Nostr direct message, and the Patron answers it from a Nostr app such as 0xchat. There is no password, no email verification, and no customer database to breach. No Passwords, No Browser OAuth, No Problem explains the security underneath that exchange, and Applied Cryptography in the Tollbooth DPYC Secure Courier explains the cryptography.

The Patron also needs sats. A Patron who already holds a self-custody Lightning wallet, such as Phoenix, is ready. A Patron who holds only a bank account first buys sats from the bank or an exchange into that wallet. That purchase is the only place in the whole map where anyone asks for KYC, and it happens at the bank, not at the Operator. The Operator never learns the Patron's name.

Step 4: The Patron purchases a tranche of api_sats

Here begins the second currency flow. When the Patron, or the Patron's agent, asks to buy credits, the Operator's BTCPay issues a Lightning invoice. The Patron pays it from the Patron's Lightning wallet to the Operator's BTCPay, and the payment settles in seconds over the Lightning Network. No card network, payment processor, or stablecoin issuer takes part.

What the Patron receives is a tranche of api_sats, a pre-paid balance with that Operator. A tranche is deliberately spendable rather than hoardable, and an unused tranche eventually expires. Demurrage: Why DPYC API Credits Expire explains why this keeps the Operator a toll road rather than a bank with fiduciary duties, while the sats that settled the purchase remain hard money in the Operator's hands.

Step 5: The invoice settles and the Authority certifies the sale

When the Patron's invoice settles, the Operator credits the Patron's api_sats and asks its Authority to certify the purchase. The Authority deducts its certification fee from the Operator's pre-funded balance, the one that the Operator bought in Step 2, and it returns a Schnorr-signed Nostr event that proves the Operator paid before collecting its fare. Anyone holding the Authority's public key can verify that certificate without asking the Authority anything.

Two further records anchor the sale to Bitcoin itself. The Lightning channels that carried the payment open and close on-chain, and the Operator's ledgers are notarized with OpenTimestamps, so the history of who bought what cannot later be quietly rewritten.

Step 6: The Patron consumes api_sats with tool calls

Now the Patron's agent simply works. Each MCP tool call arrives at the Operator, the Operator debits the call's fare in api_sats from the Patron's tranche, and the answer goes back. The same metering applies when the call comes from a Cloudflare front end built on @tollbooth-dpyc/web rather than from an agent in a chat.

What does not happen on each call is the important part. There is no payment handshake, no facilitator to consult, no wallet pop-up, and no second round of identity checks. That is the meaning of Don't Pester Your Customer. Per-request payment schemes such as x402 settle a payment on every call; on the other hand, a Tollbooth DPYC Patron settles once per tranche and then drives freely. Don't Pester Your Customer: Tollbooth DPYC vs. Nevermined x402 compares the two roads in detail, and Monetizing Intelligence beats Monetizing Electrons makes the economic case for pricing whole answers rather than raw data fragments. When the tranche runs low, the agent tells the Patron, and the Patron tops up exactly as in Step 4.

Step 7: The Operator pays its bills

An Operator earns in sats but, for now, its hosts bill in dollars. From time to time the Operator sweeps the sats that accumulated in its BTCPay node out to its own Lightning wallet. It keeps what it wishes to save, sells some sats back through a bank for dollars, and pays Horizon, Neon, AWS, and Cloudflare. The value stays in sound money for as long as the Operator chooses, and it converts to dollars only at the moment a bill comes due.

Following the money, in one paragraph

Two Lightning payments make the whole network run. In the first, the Operator's wallet pays the Authority's BTCPay to pre-fund a certification balance, from which the Authority later draws its small fee for each sale that it certifies. In the second, the Patron's wallet pays the Operator's BTCPay for a tranche of api_sats, which the Patron then spends one tool call at a time without ever being asked to pay again until the tranche runs out. Dollars appear only at the two edges of the map, where a Patron buys sats from a bank and where an Operator sells sats to pay its hosts. Everything in between settles in Bitcoin, and nothing in between requires KYC.

The Operator builds the useful part, the Authority vouches for every sale, and the Patron simply drives through the tollbooth.

Learn the Lightning Network properly

Every flow on this map rides on Lightning, so an Operator who understands Lightning channels, liquidity, and routing will run a healthier till. We recommend Mastering the Lightning Network by Andreas M. Antonopoulos, Olaoluwa Osuntokun, and René Pickhardt, which is the reference we return to most often. For the wider story of Bitcoin itself, A Reading Journey to Understanding Bitcoin lays out a reading plan, and How a Scarce, Finite, Slow Store of Value can support daily Micro-Commerce explains why a hard money can still pay for a cup of coffee, or for a single tool call.

Further reading

If you have a service of your own that deserves to be paid by the call, an MCP Monetization Advisory Session or a BTCPay Server Advisory Session is a good place to start.


Tollbooth DPYC is open source under Apache 2.0: tollbooth-dpyc, tollbooth-authority, and tollbooth-sample.

Return to Collection