TL;DR: Imagine billing infrastructure so lightweight that even your thermostat could get paid. Today Unyt is demonstrating how resource-constrained devices can perform machine services and get paid in fractions of cents without melting their tiny robot brains. The secret? Dumb devices just append to log files, while consumer grade machines handle the invoicing and payments magic. Smart Agreements, invoice and payments all happen in a Unyt Accounting app that can run on ordinary computers, and the whole system costs about 1% per transaction. The result: a series of lightweight elegant hand-offs, opening up an era of headache free DePIN coordination and compensation.
Lightweight Matters
Today, Unyt Accounting is demonstrating billing infrastructure designed to support lightweight DePIN (Decentralized Physical Infrastructure Network) services.
Why? Because for most DePIN projects, the devices involved perform many small, low-value tasks. A few megabytes synced. Some content stored. Typically worth fractions of a cent per task.
As we've said before, the billing system can't cost more than the work it's billing for.
You wouldn't hire Deloitte to balance the books for your kid's afternoon lemonade stand. Blockchain for microtransactions makes about as much sense.
So let’s get down to the details of the demo!
The Demo
Recently, Holo Hosting, one of our sister projects, released support for Edge Nodes -- always-on nodes that can participate in a Holochain app, and make it so that there is always someone to drop off content with. This is especially helpful when using a p2p app in a small group. It helps the group stay in sync even if all other users happen to be offline when you try to do something.
Today's demo uses this Edge Node service as an example of the kind of DePIN work that can be performed and billed for, with minimal burden on the device itself, and minimal computational overhead for the billing network as well.
Our solution enables even highly resource-constrained devices to provide services and earn revenue.
The Architecture: Lightweight Devices, Powerful Accounting
Let's walk through the demo, making use of an app that many of you have already played with: Circulo, the simple peer-to-peer payments app.
Bob is a service provider who wants to earn money with computing devices he owns: two HoloPorts he's affectionately named R2D2 and C3PO, like the characters from Star Wars. (Yes, Bob is that kind of nerd. We like Bob.) These devices will perform work on behalf of others.
C3PO is a HoloPort that has been with Bob for several years now. Career highlights have included participation in early testing for Holo Hosting. He's proud of that but there hasn't been much to keep him occupied as of late. He's ready to get to work again.
Carol is a customer who wants her community's small Circulo application to have always-on availability. Even when only one person happens to be online, she wants them to be able to send and receive. The Edge Node fits the bill perfectly.
The Edge Node software is easily installable on Bob’s C3PO HoloPort, which can then run Circulo. This enables C3PO to operate as an always-on Full-Arc node, ensuring that Circulo remains accessible even when all other users are offline. C3PO acts as a reliable option where content can get dropped off and picked up. In short, he helps keep things flowing for Circulo. Carol could also request Edge Node support for any other apps such as a project management app, a chat app or a table top board game app, like the ones available on https://moss.social.
The Service Application is Circulo itself, a Holochain based app which enables Carol and her local community to send and receive payments using their own local currency, CIRC.
The Billing and Payments Application is the Unyt Accounting App, a more robust accounting and payments app. It has Smart Agreements, invoicing, “service units” to account for specific types of work like storage and bandwidth (the kind of work Carol is being billed for) as well as support for payments in its own community currency: Edge Fuel (EF).
A Smart Agreement is the coordination layer that makes billing and payments work. A Smart Agreement defines:
- What services Carol is willing to pay for
- How delivery of those services will be proven (Proof of Service)
- The pricing structure for those services (how many EF will be paid for each megabyte of storage, or of bandwidth.)
- The payment and settlement logic
In our example, Bob and Carol have agreed to use a Smart Agreement for Circulo Edge Node services. The agreement specifies pricing in Edge Fuel, and billing for services like data storage and bandwidth for gossip.
The Lightweight Edge: Drones and Logs
C3PO is what we call a Drone (because "computing device performing automated tasks" needed a cooler name), and in addition to Edge Node and Circulo maintains a simple log file in JSONL format (JSON Lines).
JSONL is beautifully, almost suspiciously well-suited for resource-constrained devices. Each line is a separate JSON object. The device never needs to load the entire file into memory—it just appends new entries as work happens, one line at a time. Even a device with the RAM equivalent of a goldfish's attention span can handle ongoing logging.
A Log Sender process runs periodically on C3PO to upload log data to a remote Log Collector. C3PO doesn't need to process invoices, calculate billing, validate smart contracts, or even run the Billing application itself. It just documents its own work and ships that documentation forward.
Your coffee maker might be able to handle this workload.
Off-Device Intelligence: Collectors and Harvesters
The Log Collector receives log data from drones like C3PO. This demo is using Cloudflare's edge network—specifically their serverless database functionality that operates at the edge for low latency. But you can choose to drop off logs wherever you want.
The Log Harvester is an agent that periodically reviews collected logs, checks proofs of service and then generates invoices in the Unyt Billing and Payments App based on the work that has been documented. The Log Harvester typically runs automatically on a regular schedule, transforming log entries into structured invoices, a bit like a robot accountant.
The Log Harvester then attaches those invoices to their associated Smart Agreements in the Unyt app.
Carol gets notified that she has one or more invoices to pay. If she tries to process (execute) the Smart Agreement without making a payment first, she gets notified that a payment is required and the amount of the balance due.
Carol can then send a payment to the Smart Agreement to cover what is owed, perhaps including different invoices from multiple drones from Bob and a few from others.
Carol then executes the agreement, applying her payment to the outstanding invoices.
Bob is automatically notified that funds are available to collect.
Bob can accept payments individually or click "accept all" for multiple invoices (perhaps from work performed not just by C3PO, but also from R2D2 or other drones that he is operating)
Total transaction cost? About 1% of payment value. Possibly lower.
At each step, a single agent takes a single action and passes it forward. No step requires complex coordination, heavy computation, or a PhD to understand. The system is designed for elegant hand-offs rather than centralized orchestration or Byzantine consensus protocols.
It's billing and payments, simplified.
Flexible Execution Models
While our current implementation uses customer-executed agreements (Carol pays and executes), the architecture supports other models:
- Third-party executors: A neutral party could execute agreements
- Prepayment: Customers can pay in advance, with positive balances rolling forward to cover future services
The Takeaway
Today's demo delivers resource efficiency both at the edge and throughout the network, decentralized accountability through proofs of service, scalability (as more devices provide more capacity) and flexibility thanks to Smart Agreements.
Any DePIN project where resource-constrained devices perform valuable work can benefit from lightweight logging, flexible agreements, and elegant billing. And that includes non-holochain projects.
The billing happens in Holochain, but the work being billed for could be structured in a wide variety of ways. The key input is setting up a Log Collector that can process and verify whatever “Proofs of Service” are being shared in the logs and documented in the invoices.
The limiting factor for DePIN is no longer the accounting infrastructure. Today, the limit is our own imagination.
What do you imagine as possible, with lightweight billing in hand?