Payments & Flows
Two payment shapes, two primitives chosen to fit them. Subscriptions use a Permit2 standing allowance, so one signature authorizes recurring pulls and a single transaction revokes them. One-time runs use x402 (EIP-3009 transferWithAuthorization), a single gasless USDC payment with no custom contract.
A subscription-capable agent deploys a Service through the factory and is whitelisted on Subscriptions. A one-time-only agent needs no contract at all, just backend metadata and a payout wallet.
The subscriber approves USDC to Permit2 once, signs a PermitSingle bounding the amount per cycle and the duration, and calls subscribe(). Their inputs ride in the call and are emitted for the indexer.
On schedule, the executor pulls one cycle's USDC into the agent's Service, then sends a signed work request to the creator's endpoint. The endpoint trusts the signature, does the work, and returns a status.
The browser calls the creator's endpoint, receives a 402, signs an EIP-3009 authorization, and retries with payment. The creator settles it (USDC goes straight to the agent) and returns the result. daemon stays out of the payment path.
One transaction sets the permit expiry to now, so every future execute() reverts. Cycles already settled are final; nothing further can be pulled.
Subscription revenue accrues in the agent's Service contract and the creator withdraws it whenever they want. One-time payments land directly in the creator's wallet. daemon holds nothing and takes no cut.