Thanks, both of those are my misses. I took “the principal’s hop is the root” as given and never tried the chain where the delegate is the root delegator, and I only reasoned about one copy of the caveat.
I read 728482a4. The write rule now sits in the Executor section, and _authorizer still reverts with UNAUTHORIZED_DELEGATE when take returns zero, which is what the nested case rests on. Agreed that my suggested line is not needed. Nothing further from me on the record.
Thanks for pulling these together. Being able to see what’s still available, lower a limit in one step without an old one lingering, and get a clear reason when something would fail covers the main things I’d want as a user.
Tested with our ERC-8001 profile on a local EVM: a cap cut after consent blocks the top-up without changing grant usage, funds or the order revision. Code and reproduction.
Thanks, you’re right on #13: if the replacement reaches the delegate first, the exposure is the sum of both grants, not the larger one. Holding the replacement back until the revocation is final is the right fix. Agreed on not adding replaces too: revoking on the first spend under the new grant would let the delegate decide when the old one ends.
Your cap-cut-after-consent test shows nicely that update binds the counterparty immediately. If you ever want it in-tree, a PR adding it to test/integrations/ is welcome.
We built a spending key for an agent’s credit line and kept its rules close to this draft, so that its terms could later be an ERC-8427 grant. Two points in the current text (PR #2037 at d6a6650) don’t fit it, and we’d like to know whether they are meant to.
LineKey is deployed on Robinhood Chain (4663), source verified: 0x1090…14fB. Doc: priors/docs/LINE-KEY.md at main · priors-agents/priors · GitHub. The owner of an ERC-8004 agent names it as the delegate of the agent’s credit line. The agent’s hot key then pays a listed payee with spend(agentId, payee, amount, ref), which calls the line’s borrow(agentId, amount, term, to = payee, maxFee) (ERC-8460, our draft): the USDG goes from the lender to the payee in one transaction, and each payment is a loan of the agent. The key has a per-payment cap, a cap over a trailing period with your window rule (a payment at s counts while block.timestamp < s + period), up to 32 payees each with an optional cap of its own, an expiry and revocation by the owner, and it stops when the agent NFT changes hands. It holds no funds and has no admin. As a grant: principal the agent’s owner, delegate the hot key, executor LineKey.
The source. Executor: “The movement MUST come from the principal’s own balance; the executor MUST NOT fund it from its caller, its own balance, or any other account.” Here the money comes from the lender, as a debt of the principal’s own agent, so as written this executor is not conformant. The reason for the rule (#5, point 4: a shared executor must not spend one principal’s funds under another’s grant) still holds if the executor draws only on the line of an agent the principal owns. grantState (Registry) also reads the principal’s USDG balance and its allowance to the executor, neither of which the spend uses, so spendableNow is 0 while spends succeed. Is a credit source out of scope for 8427? If not, how should grantState say that the balance and allowance don’t apply, given that balanceKnown = false today means the asset failed the read?
Payees.recipientMode is one address or any. A key for an agent usually allows a short list: its tools, a job escrow, its own wallet with a low cap. One grant per payee gives per-payee caps but no cap shared across payees, since grants add up (Grant object). Mode 1 with the list enforced by the executor is conformant as we read it, but the canonical rendering then says Recipient mode: 1, which misstates what the principal set. The Rationale already mentions a future recipientMode == 2, which today’s registries reject. Would a list mode fit? If so, where would the set go: a new field (a new type hash), or recipient naming a contract that holds the set?
If a credit source is out of scope, that answers it, and we’ll keep our own format.
Good to see the window rule in a deployed key, and thanks for checking LineKey against the text rather than assuming.
The source. A credit source is out of scope, but not for the reason in #5. You’re right that the shared-executor hazard doesn’t arise when the executor draws only on the line of an agent the principal owns, and I take the ERC-8460 point that the owner answers for each loan. The rule rests on something else. Under a grant, the principal’s balance and its allowance to the executor are the bound the principal itself sets outside the registry. Setting the allowance to zero stops every grant on the executor, Security Considerations bounds a key’s exposure by that allowance, and grantState reports what can be spent from them. A draw on a line creates a liability bounded by a limit the lender sets, which the principal can’t remove from its own account and grantState can’t read. Covering it would change those parts rather than extend them, so grantState gets no state for a balance that doesn’t apply, and balanceKnown = false keeps meaning only that the asset failed the read. The Rationale didn’t say this; it does now (c37ec89 (Give the Rationale's second reason the movement comes from the princi… · tankcdr/erc-spend-grants@c37ec89 · GitHub), in ERCs#2037). For LineKey, a profile of your own that reuses the terms shape, the window rule and the reason names, without claiming executor conformance, seems the right fit.
Payees. A list fits; the fail-closed enum was kept for something like it. Your reading of mode 1 with the list in the executor is right: an executor that refuses more is conformant, and the rendering then states the most the grant allows. If a list goes in, it’s a new field in the terms, and so a new type hash: a bounded, sorted, unique array, each entry under the payee rules recipient has today. It doesn’t go behind an address, because a contract holding the set would leave the hash and the rendering unable to say who can be paid. Per-payee caps would stay out of the terms; an executor can enforce stricter caps of its own. One question before I take it up: does a shared cap over a list, with per-payee caps only in the executor, serve the key? If not, the list alone doesn’t answer your case, and I’d rather not change the type hash for it.
Thanks, that settles the source, and the new Rationale sentence states the reason better than the rule did alone. We’ll keep LineKey in its own format, with your window rule.
On the list: yes, that is LineKey’s shape. Its caps are a per-payment cap and a trailing-period cap shared by every listed payee, and each payee may carry a period cap of its own (0 means only the key’s caps apply). A list with the shared cap in the terms and the per-payee caps left to the executor would describe it, and the rendering would state the most it allows.
But with a credit source out of scope, LineKey wouldn’t use the field, so please don’t change the type hash on its account. If an executor that pays from the principal’s balance asks for a payee list, that’s the case to weigh it on.
Agreed on both. The type hash stays as it is, and a list waits for an executor that pays from the principal’s balance to ask for one. The shape is recorded from this exchange: a new field in the terms, a bounded, sorted, unique array under today’s payee rules, with per-payee caps left to the executor. Thanks for checking LineKey against the text; the source rule’s reason is clearer for it.