Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 28 additions & 25 deletions ERCS/erc-8001.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
eip: 8001
title: Agent Coordination Framework
description: Minimal, single-chain, multi-party agent coordination using EIP-712 attestations
author: Kwame Bryan (@kbryan)
author: Kwame Bryan (@KBryan)
discussions-to: https://ethereum-magicians.org/t/erc-8001-secure-intents-a-cryptographic-framework-for-autonomous-agent-coordination-draft-erc-8001/24989
status: Draft
status: Review
type: Standards Track
category: ERC
created: 2025-08-02
Expand Down Expand Up @@ -195,33 +195,36 @@ interface IAgentCoordination {

### Semantics

- **Participants** MUST be unique and sorted ascending. Implementations MUST reject non-canonical arrays.
- `proposeCoordination`:
- Verifies EIP-712 signature by `agentId` using ECDSA for EOAs or [ERC-1271] for contracts.
- Requires `intent.expiry > block.timestamp` and `intent.nonce > agentNonces[agentId]`.
- Stores the canonicalised state and sets `agentNonces[agentId] = intent.nonce`.
- Emits `CoordinationProposed`.
Rejects: invalid signatures, expired intents, non-monotonic nonces, malformed participants

Accepts valid EIP-712 signed intents and:
- Emits `CoordinationProposed`
- Makes intent queryable as `Proposed`
- Enforces nonce monotonicity for `agentId`

- `acceptCoordination`:
- Checks the intent exists and is not expired.
- Verifies the participant is listed and has not already accepted.
- Verifies the acceptance signature against the typed `AcceptanceAttestation`.
- Records acceptance and stores the acceptance `expiry` for that participant.
- Emits `CoordinationAccepted` with the typed acceptance hash.
- Returns `true` when all required acceptances are present.
Rejects: non-existent intents, expired intents, non-participants, duplicate acceptances, invalid signatures

Accepts valid attestations and:
- Emits `CoordinationAccepted`
- Adds participant to `acceptedBy` in status
- Returns `true` when all required acceptances present

- `executeCoordination`:
- Requires the intent to be in an executable state. In [ERC-8001](./eip-8001.md) the policy is **all participants have accepted**.
- Requires every stored acceptance to be unexpired at execution time.
- Verifies `payloadHash` matches the stored hash.
- Emits `CoordinationExecuted`.
Rejects: non-ready intents, expired intents or acceptances, payload mismatches

Executes when all participants accepted and unexpired:
- Emits `CoordinationExecuted` with result
- Status becomes `Executed`
- Returns success and execution result

- `cancelCoordination`:
- The proposer MAY cancel before execution. Anyone MAY cancel after expiry.
- Emits `CoordinationCancelled`.
- Status values are implementation-defined but MUST include Proposed, Ready, Executed, Cancelled, Expired.
- `executeCoordination` MUST:
- Verify status == Ready (i.e., every participant has accepted).
- Verify `block.timestamp < intent.expiry`.
- For each recorded acceptance: verify `block.timestamp < acceptance.expiry`.
- Verify `keccak256(abi.encode(payload))` equals the stored `payloadHash`.
Proposer MAY cancel before execution; anyone MAY cancel after expiry
- Emits `CoordinationCancelled`
- Status becomes `Cancelled`

- `getCoordinationStatus` MUST return one of: `None`, `Proposed`, `Ready`, `Executed`, `Cancelled`, `Expired`
Comment on lines 198 to +227
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are decent descriptions of pre- and post-conditions, but I think this section is lacking a bit of detail on what these functions actually do. Think natspec/developer docs.


### Nonces

Expand Down
Loading