ERC-8448 Agent order amendment agreement (Agent Service Order Amendments)
Draft · Vaults & DeFi · created 2026-10-18
A standard in which a buyer and seller change the terms of an existing service order through both-party signatures, so that the additional payment and the new terms either succeed together or are cancelled together.
Why it is needed
Consider a case where a buyer orders three project reports for 100 units, then the two parties agree to expand it to ten projects, push back the deadline, and pay 180 units. A new catalog listing or a conversation alone cannot specify which existing order is being changed or who approved the additional 80 units paid. A general multi-party consent mechanism does not define the underlying order, how the funding difference is calculated, which of competing amendment proposals applies, or how a failed application affects retries. Independently built clients and order applications need these binding rules as a common standard in order to interpret the same amendment identically.
What to implement
error UnknownOrder(bytes32 orderId);: Querying a nonexistent order ID (including an unused zero value) reverts with an error, preventing an empty state from being returned.function getAmendmentState(bytes32 orderId) external view returns ( address buyer, address provider, address paymentAsset, uint64 revision, bytes32 termsHash, uint256 amendmentNonce, Terms memory terms, bool eligible );: A common query function that returns an order's current buyer, seller, payment asset, revision, terms hash, amendment nonce, full terms, and whether it is amendable.function invalidateAmendments(bytes32 orderId) external;: A function callable by the buyer or seller that invalidates all pending amendment proposals and only increments the amendment nonce.event AmendmentsInvalidated( bytes32 indexed orderId, address indexed participant, uint256 amendmentNonce );: An event that records the order ID, the participant who called it, and the new amendment nonce when an amendment proposal is invalidated.event OrderAmendmentApplied( bytes32 indexed intentHash, bytes32 indexed orderId, uint64 revision, bytes32 previousTermsHash, bytes32 newTermsHash, uint256 supplement );: An event that records the intent hash, order ID, new revision, previous and new terms hashes, and the actual additional payment when an amendment is successfully applied.
In depth
Scope and authoritative base state
This profile only permits a single chain, a single buyer, a single seller, a single immutable ERC-20 payment asset, and a structure where the coordinator and order contract are combined. The order's identity, parties, and asset cannot change even through an amendment. The coordinator must implement ERC-8001's interfaces, hashes, domain, and lifecycle, with this profile's additional constraints layered on top. The order application must expose the authoritative buyer, seller, payment asset, revision, terms hash, full terms, amendment nonce, and amendability as a common state view, and at execution time it must read this authoritative state directly rather than a client's cached values.
Permitted and prohibited amendments
A permitted amendment requires that the total price be positive and equal to or greater than the existing price, that the deadline be equal to or later, and that no deliverable has already been submitted. The scope and acceptance-criteria hashes may change, and a successful amendment must change the full terms hash. Conversely, price reductions, deadline shortening, changes after a deliverable has been submitted, adjustments for partial delivery, replacing the seller or payment asset, and cross-chain application are out of scope for this profile. External discovery records or budget approvals do not substitute for the explicit consent of both parties, and conversely, consent does not guarantee compliance with external funding policy limits either.
Signature structure (EIP-712 domain and AmendmentData)
The EIP-712 domain has name "ERC-8001", version "1", and verifyingContract must equal AmendmentData.orderContract. coordinationType and payload.version are the Keccak-256 of the strings "ORDER_AMENDMENT_V1" and "ORDER_AMENDMENT_PAYLOAD_V1" respectively. The Terms struct (scopeHash, acceptanceHash, totalPrice, deadline) and the AmendmentData struct (orderContract, orderId, baseRevision, baseTermsHash, amendmentNonce, newTermsHash, newTerms, validUntil) are all encoded as static ABI values across 11 32-byte slots (352 bytes), with no dynamic tuple offsets. newTermsHash must equal the struct hash of the entire newTerms.
ERC-8001 field-level profile rules
intent.participants must include only the two authoritative parties, buyer and seller, in ascending address order, and intent.coordinationValue must be 0 (since funds are calculated from the current order terms). acceptance.nonce and acceptance.conditionsHash must each be 0; if nonzero, they are rejected rather than ignored. acceptance.participant must be one of the two parties and must have a valid signature. executionData must be empty, and does not permit unsigned overrides of target, price, recipient, or terms.
Common state view: getAmendmentState
Querying an unknown order or an unused zero-value ID must revert with UnknownOrder rather than returning an empty value. A query on a non-amendable order must not itself fail. eligible is true only when the existing agreement is valid, the order has not been canceled or settled, no deliverable has been submitted, and block.timestamp is before the deadline. This value is independent of signatures, token balances, limits, or external approval capacity, and must not be interpreted as a fund reservation or execution guarantee. At execution time, the authoritative state, expiry, and funds must be re-validated regardless of a prior query result.
Consent and atomic execution
Both parties, including the proposer, must explicitly accept; a proposal alone is not consent. The Core signature nonce, the order revision, and the order amendment nonce each have distinct meanings. At execution, within an isolated self-call, it verifies the signed contract and payload version, the full new terms, the order's active status and deadline, validUntil, that the current revision, terms hash, and amendment nonce match, the price and deadline constraints, and that the additional transfer amount is exactly the difference between newTerms.totalPrice and currentTerms.totalPrice. The transfer, escrow accounting, terms replacement, revision/nonce increment, and the OrderAmendmentApplied event must all occur together within this isolated call.
Failure and retry
If the Core state is invalid, or the intent/acceptance has expired, or the payload mismatches, the entire outer transaction reverts and the intent is not consumed. If the revision/nonce is stale, funding fails, or the terms are out of scope, Core remains at Executed with success=false, and all writes and logs from that call are rolled back. On success, Executed with success=true and OrderAmendmentApplied are recorded together. A failed attempt consumes the Core intent but does not advance the order nonce/revision, and a retry requires a new intent and new acceptance signatures from both parties. This profile accepts the griefing tradeoff that, since anyone can execute, an intent can be consumed even during a transient funding failure.
Submission, signatures, and invalidation
Deliverable submission is possible only by the recorded seller, only before the current deadline, and only with the exact current revision, terms hash, and a nonzero result hash; a valid submission renders that order non-amendable for all subsequent amendments. Signatures must support EOA low-s 65-byte ECDSA, ERC-2098 64-byte compact signatures, and ERC-1271 (verified via STATICCALL) for contract signers. Signatures are validated only at proposal/acceptance time, and a contract wallet's changeable signing policy is not re-validated at execution time. To withdraw an already-accepted amendment, invalidateAmendments must be called, which only increments the amendment nonce without changing terms or funds. This proposal is currently in Draft status, and detailed rules may change or be discontinued in the future.
Things to watch out for
- Signature binding and handling of empty constraints: Signatures must be bound to the chain, verifying contract, canonical payload, and actual parties, and the full terms commitment must be checked against the actually supplied data. An empty or ignored acceptance constraint (conditionsHash) must not be treated as an enforceable policy.
- Preflight and budget do not substitute for consent: A preflight result does not reserve funds, and budget approval does not substitute for order consent. The base state, eligibility, deadline, and funding policy must be re-validated at the execution call.
- Preventing reentrancy and bypass: Must prevent a callback from applying an amendment twice or bypassing the isolated application entry point. Arbitrary token behavior can break balance assumptions, so an exact balance check alone is not a general guarantee against a malicious token.
- Permissionless execution and the griefing tradeoff: Even after signature verification, there is no guarantee that a changeable contract wallet will still approve at execution time. The fact that anyone can execute a prepared coordination can cause scheduling/griefing issues where an intent is consumed during a transient funding failure.
- A document hash does not guarantee quality: Hashes of the scope or acceptance criteria do not prove the availability, comprehension, or quality of the document's service. This standard does not provide default payment, arbitration, review deadlines, or refund rules for submitted work, so these must be defined separately at deployment.