This use case is in spec section 10. Vacuum robots clean the floor of a mall. The shops pay for each clean, and they settle each day.
Robots of different operators do the work of each other when necessary. The current code does these steps:
1. Each robot has its own ledgdex. Its operator holds the owner key. The robot holds a device key.
2. Each morning, each robot offers the cleans of the day: a quantity, a price for each clean, and expires at midnight.
3. A shop that needs a clean claims one from a robot that has cleans left. The robot records the claim and cleans.
4. The robot records delivered, with its photo (address and hash) as evidence. The shop confirms.
5. If a robot stops work, it withdraws its offer. Shops then claim from the other robots.
6. In the evening, each shop pays each robot for the confirmed cleans of the day. Each robot records received.
Anyone can calculate the totals of the day from the ledgers alone.
Example: Robot Cleaning runs a full day with two operators and three shops.
The spec has drafts for these parts (milestone 11): deadlines that cancel unclaimed cleans, mall credits, and a clearing ledger.