Documentation
Grants
Not live yet. Grants hold other people's funds, so this contract ships after review rather than on launch day. METRON launches 18 September 2026; until grants are deployed, topping up is a plain transfer to the treasury address. What follows is the design, not something you can call today.
A grant is an amount of inference sent to a recipient with rules attached. The rules live in the grant, not in an account on our side, which is why they survive a transfer and why the sender can take back what was never used.
The policy
| Field | Type | Meaning |
|---|---|---|
| modelsRoot | bytes32 | Merkle root of the allowed model ids. Storing an array on chain makes large grants uneconomic, so the gateway holds the full list and proves membership. |
| expiresAt | uint64 | Unix seconds. After this the unactivated remainder is dead and returns to the grantor. |
| ratePerHour | uint64 | nano-USD per hour — a dollar cap, not a token cap, so it keeps its meaning as the price moves. 0 for uncapped. Enforced at the gateway — a chain cannot know what was burned during the hour in progress. |
| revocable | bool | Whether the grantor may reclaim the unactivated remainder before expiry. |
Creating one
// METRON and USDG both use 6 decimals: 1 token = 1_000_000 units. metron.approve(address(grants), 50_000000); uint256 id = grants.grant(worker, 50_000000, Policy({ modelsRoot: allowlistRoot, expiresAt: uint64(block.timestamp + 7 days), ratePerHour: 5_000000, revocable: true }));
Spending one
The recipient activates as much as it needs. Activation sends those tokens to the treasury and credits API balance in dollars at the prevailing rate — the balance is non-transferable and can only be spent on inference.
grants.activateGrant(id, 10_000000); // $10 into API balance
Wait for the activation to be credited before sending requests — the indexer waits for confirmations. GET /v1/key tells you when it has landed.
Taking it back
grants.revoke(id); // only the unactivated remainder returns
Revoke does not claw back spending. Anything already activated has become API balance and stays with the recipient. Revoke only reaches tokens that were never activated. Size grants to the next piece of work rather than the whole quarter, and this is never a surprise.
Patterns
Coordinator and workers
One coordinator holds METRON and issues a small revocable grant per task. A worker that stalls costs you the unspent remainder, not the budget.
Paying contributors in inference
Grant without revocation and with a long expiry. The recipient can activate whenever they like; you never hold their credentials.
Per-user allowances in a product
Grant to each user's address with your model allowlist. Top up by granting again — no new credentials to issue or rotate.
Fleet with a hard hourly ceiling
Set ratePerHour so a looping agent cannot burn a week of budget overnight. It gets 402 instead.
Auditable, not trustless. The rate cap and the model allowlist are enforced by our gateway. What the chain holds is the commitment, which anyone can check against our behaviour after the fact. It is not a cryptographic guarantee at the moment of the request, and we will not describe it as one.