EIP.tools

EIP.tools

⚠️ DraftStandards Track: ERC

ERC-8536: Swarm Task Recruitment

Calls, rounds, assents, selections and placement receipts that bind a task version to the seats of a swarm.

Authors
Created2026-12-05
Discussion Linkhttps://ethereum-magicians.org/t/erc-8536-swarm-task-recruitment/30609
Requires

Markdown

https://raw.githubusercontent.com/ethereum/ERCs/re...
Pull Request#2305PR open

EIP-GPT summary

Contents
AbstractMotivationSpecification1. Terminology2. Conformance3. Mandates4. Calls5. Rounds6. Assent and screening7. Selection8. Delivery and the placement receipt9. Placement sinks10. Obligation sources, response duties and bonds11. Clock12. Interfaces13. Interface identifiers14. Errors15. Reserved extension pointsRationaleBackwards CompatibilityTest CasesReference ImplementationSecurity ConsiderationsCopyright

Abstract

This ERC defines how participants are recruited into a swarm for a task that is already fixed. A call states who recruits, under which mandate, for which task version, into which roster. A round fixes one version of the rules, windows and quotas and ends with its own outcome. An assent is a candidate's acceptance of one round's final terms, with the actions it authorizes under them and the conditions on which it depends. A selection is the recorded choice of the party entitled to choose, under a named rule. A placement receipt is what a delivered placement becomes: which account, in which role, at which seat epoch and phase of which swarm, by which method — a new seat, a substitution, or an incumbent taking on new work.

The registry that keeps these records holds no value and opens no seat. Bonds live in a bond module; seats are opened by a placement sink that acts on the organization — in the reference profile, an adapter that holds the admission authority of an ERC-8447 swarm — and that reports what the organization says afterwards. Together with the task's own record (ERC-8414 in the reference profile) a third party can verify, for any seat: for which task version, under whose mandate, which account accepted which terms, who selected it under which rule, where the seat is, and which actions the standing terms still cover after the task, the roster or the terms have changed.

Motivation

A task-tender standard says what is demanded, how it is judged and how it pays. A swarm standard says who is in a group, what the group is for, which seats exist and who may change that. Between the two lies a market the two standards leave open on purpose: ERC-8414 states that bidding, awards and team splits never enter its interface, and ERC-8447 reserves matchmaking, bonds and penalties, and internal market primitives as extension points. Today that market is improvised per platform, and the facts it produces are not verifiable from the chain.

Two situations show what is missing. Two teams recruit around the same public task; one is mandated by the task's publisher, the other organizes itself. Both can record a task origin on their swarm; neither record proves a mandate, exclusivity or a reward. And an account that has held a seat for weeks agrees today to act as the independent reviewer of this task; the seat's status says nothing about that agreement. In both cases the question a counterparty, a data service or an auditor needs answered is the same: why is this account in this team, what did it agree to do, and what may it still do today?

This ERC answers that question with one record, the placement receipt, and defines the minimum around it — mandate, assent, selection, delivery — that makes the receipt verifiable. Everything else varies by task and is left to modules and documents: how candidates are screened, how a frozen pool is ranked, whether bonds are required, what a response duty consists of. Research collaborations across institutions, engineering tasks that require an independent reviewer, and commercial work that adds a specialist mid-way are the intended uses; a task that simply wants two independent parties to verify a result is a swarm task too.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

1. Terminology

  • Task reference — (chainId, target, id, version, taskHash): a task contract, a task id, the task's monotonic content version and its content commitment at that version. A recruitment is bound to one task reference and MUST NOT be read as applying to another version, even one whose content hash is equal.
  • Obligation source — a contract that reads the task reference's current version, content hash, cancellation and publisher from the task contract alone (Section 10).
  • Recruiter — the account that opens a call.
  • Mandate — the recruiter's standing toward the task: DELEGATED when the task's publisher has named the recruiter for this task version (Section 3), NONE when the recruiter organizes a team on its own behalf.
  • Sink — the contract that turns a deliverable placement into a seat and answers whether the seat is still held (Section 9).
  • Roster — the organization recruited into, identified by a sink-defined swarmId.
  • Call, round, placement — the three records (Sections 4 to 8).
  • Seat epoch — the sink's counter of how many times an account's seat in a roster has been opened; a receipt carries the epoch of the seat it was delivered into.
  • Fallback — a permissionless transition available after a declared window.

2. Conformance

A recruitment registry conforms when it implements IRecruitmentRegistry (Section 12) with the semantics of Sections 3 to 11 and reports the interface identifier of Section 13 through ERC-165. A sink, an obligation source, a screening module, a selection module and a bond module conform when they implement their interface of Section 12 with the semantics given for them.

The minimal conforming configuration is a registry with one call of mandate NONE, one ROLLING round selected by an address, no screening module, no bond module, and a sink that seats accounts in a swarm registry. Everything else in this document is normative-optional: a registry MAY refuse configurations that use a feature it does not implement (BATCH intake, MODULE selection, screening, bonds, group conditions, response duties), and a registry that accepts such a configuration MUST implement the feature as specified here.

3. Mandates

A mandate is registered by the task's publisher — the account the obligation source reports as publisherOf(task) — and names one recruiter for one task reference, with a scope commitment and an optional expiry:

registerMandate(task, source, recruiter, scopeHash, until) -> mandateId

The registry MUST refuse registration unless source.publisherOf(task) equals the caller and source.status(task) reports the task existing, not cancelled, with version and taskHash equal to the reference. mandateId MUST commit to the chain id, the registry address, the task reference, the source, the recruiter and the scope hash. The publisher MAY revoke a mandate at any time; revocation does not retire calls already opened under it (their deliveries continue to be checked against the task, not the mandate).

A call of mandate DELEGATED MUST name a mandate whose recruiter is the caller, which is not revoked and not expired, and whose task reference and source equal the call's. A call of mandate NONE MUST NOT name a mandate. A mandate proves what its publisher said and nothing more: it reserves no submission slot and no reward on the task, and it does not make the recruiter an authority of any roster.

4. Calls

openCall(CallInput) -> callId

A call records the recruiter, the task reference, the obligation source, the mandate, the sink, the roster (swarmId), a commitment to the task's composition requirement (requirementHash) with the requirement itself as a list of (roleId, min, max) quotas, and a transport hint. When a source is named, the registry MUST refuse to open the call unless the source reports the task existing, not cancelled, at the referenced version and content hash. callId MUST be unique across registries and chains (the reference implementation hashes the chain id, the registry address and a counter).

A call has at most one round that is not CLOSED (its live round). A call is retired by its recruiter at any time, and by anyone once the sink reports the roster gone or the source reports the task cancelled or unreadable. Retiring closes the live round, releases every bond still locked for the call's delivered placements, and makes every receipt of the call report its seat as not held (Section 8). A frozen task is not a cause to retire: freezing fixes a task's content and version; the task stays fundable, submittable and settleable, and a recruitment bound to the frozen version is the normal case.

Coverage. coverageMet(callId) MUST return whether, for every quota of the requirement, at least min placements of the call are delivered, not superseded, and reported by the sink as seats still held by their accounts in their roles at their recorded epochs; it returns the roles that fall short. Coverage is the task's composition condition evaluated against the roster now. It is not a round outcome, not the sink's own roster threshold, and not an activation: those are three further facts a relying party reads separately.

5. Rounds

openRound(callId, RoundInput) -> roundId

Only the recruiter opens a round, only while the call has no live round and is not retired. A round fixes: a policy commitment (policyHash, the rule document: screening, selection, tie rules), a terms commitment (termsHash, what every assent of the round accepts), the intake (BATCH or ROLLING), the selector (an address, or a selection module — MODULE selection requires BATCH intake), optional screening and bond modules, an observer for response duties (the recruiter when none is named), the windows assentUntil (> now) and deliverUntil (≥ assentUntil), a cure window for lapses, the sink phase the round seats into, and the role quotas (roleId, min, max) with max == 0 meaning unbounded. A role not listed cannot be assented to in that round. roundId MUST commit to the call and the round's index.

States: OPEN → SELECTING → DELIVERING → CLOSED for BATCH; OPEN → CLOSED for ROLLING, in which assent, selection and delivery interleave while the round is open.

  • closeIntake (BATCH): the recruiter at any time, anyone after assentUntil. It freezes the pool — the placements that are ASSENTED, screened PASS and not expired, in assent order — records poolRoot = keccak256(abi.encodePacked(poolIds)) and moves to SELECTING. Every placement ever assented to the round remains readable through placementsOf, so that the pool can be reconciled against the assents received and withdrawn.
  • closeSelection (BATCH, address selector): the selector moves SELECTING to DELIVERING. A module selection moves the round itself (Section 7).
  • closeRound: the recruiter at any time, anyone after deliverUntil. The outcome is CANCELLED when the recruiter closes before anything was delivered, UNFILLED when the window ran out with nothing delivered, FILLED when every quota's min was delivered by this round, and PARTIAL otherwise. The outcome records what the round achieved at closing; a later exit from the roster does not rewrite it.

A round that nobody closes is closed by its windows; a window produces no assent, no selection and no delivery.

6. Assent and screening

assent(AssentInput) -> placementId
assentBySig(AssentInput, account, deadline, signature) -> placementId

An assent is given by the account itself, or relayed with the account's EIP-712 signature over the Assent structure of Section 12 (name STR, version 1), checked for a contract account through ERC-1271; the signature binds a per-account nonce and a deadline. The registry MUST refuse an assent unless the round is OPEN, assentUntil has not passed, termsHash equals the round's, the role is one of the round's quotas, expiresAt is in the future, and the group fields are consistent (a non-zero groupId with a groupSize ≥ 2, or neither). placementId = keccak256(abi.encode(roundId, account)): one standing assent per account and round; a withdrawn or expired placement MAY be assented again under the same id.

An assent records the role, the terms, a commitment to the application document (dataHash), the action root — the Merkle root (sorted-pair keccak256 over keccak256(abi.encodePacked(actionRef)) leaves) of the action references the candidate authorizes under these terms —, an optional bid read by selection modules, the group condition, the expiry, whether it is revocable, and optionally the account's carried acceptance for the sink (charterHash, charterDeadline, charterSig), so that the organization-side acceptance can be completed in the same transaction as the delivery (Section 9). An assent without a carried acceptance relies on the account having given its acceptance on the sink itself.

Screening. When the round names a screening module the registry calls screen(roundId, roleId, account, dataHash) at assent. FAIL refuses the assent; PASS admits it to the pool; DEFERRED records it outside the pool with the module's reason, and anyone MAY call rescreen while the round is OPEN to re-read the module. A DEFERRED or FAIL placement MUST NOT be selected. A module MUST be a view and MUST NOT revert on an account it cannot evaluate: it answers DEFERRED with a reason. A positive verdict is required for a new placement; a member already delivered is never demoted by a later DEFERRED reading — what a changed reading means for a seat is the sink's business (an eligibility challenge on the swarm, for the reference sink), not the registry's.

Withdrawal and expiry. The account withdraws an ASSENTED or SELECTED placement when the assent is revocable, or once its expiresAt has passed. Anyone expires an ASSENTED or SELECTED placement once its expiresAt or the round's deliverUntil has passed or the round is CLOSED. Neither touches a delivered placement.

7. Selection

select(roundId, placementIds[], selections[], ruleRef)   // address selector
selectByModule(roundId)                                  // module selector, BATCH

A selection assigns to a placement one of RECOMMENDED (a recommendation, not an offer), WAITLISTED (next in line; deliverable only by a later selection), CONDITIONAL (deliverable only inside a group delivery, Section 8) or DELIVERABLE, together with a ruleRef naming what the selection was made under. A placement with a group condition MUST be selected CONDITIONAL or not at all; a placement without one MUST NOT be selected CONDITIONAL.

An address selector records selections directly, in SELECTING for BATCH rounds and in OPEN for ROLLING rounds, on placements that are ASSENTED or SELECTED and screened PASS. What a signed list proves is who decided and what the final list was; it does not turn judgment into an algorithm, and this ERC does not require that judgment be published.

A selection module is called by the registry with the frozen pool: rank(roundId, pool) returns the pool in rank order, every id once and none from outside it, and MUST be a view so that anyone can recompute the order from poolRoot. The registry then walks the order and applies the quotas: a placement with a group condition becomes CONDITIONAL; otherwise the first max placements of each role become DELIVERABLE and the rest WAITLISTED (max == 0: all deliverable); ruleRef = keccak256(abi.encode(module, poolRoot)); the round moves to DELIVERING. A rule ranking is therefore recomputable; an address selection is attributable.

8. Delivery and the placement receipt

deliver(placementId)
deliverGroup(placementIds[])
deliverSubstitute(placementId, previousPlacementId)

Delivery is permissionless: every check is against records, none against the caller. Before any delivery the registry MUST verify, at that moment: the placement is SELECTED and DELIVERABLE (or CONDITIONAL, inside a group); neither its expiresAt nor the round's deliverUntil has passed; the round is DELIVERING (BATCH) or OPEN (ROLLING); the call is not retired; when a source is named, the task still exists at the referenced version and content hash and is not cancelled; and the role's max for the round is not yet reached by deliveries. An offer that has expired is not revived by anything the candidate does on the sink: the registry MUST NOT record a delivery for it, and a sink conforming to Section 9 completes no admission without a delivery.

The registry then calls the sink — place for deliver and deliverGroup, substitute for deliverSubstitute — with the call, the placement, the roster, the account, the role, the round's phase, the predecessor account (substitution only) and the carried acceptance. The sink MUST revert unless the account holds an active seat in the role afterwards (Section 9); the registry records what the sink returns.

  • deliver records kind SEATED with method ADMIT when the sink opened the seat, and kind INCUMBENT with method INCUMBENT when the sink reports that the account already held an active seat in that role: no seat is opened, and the receipt says so. A relying party distinguishing "this round seated the account" from "a member took on new work" reads the kind.
  • deliverGroup delivers two or more CONDITIONAL placements atomically. For every placement in the group the registry MUST check that at least groupSize placements of its groupId are in the same group, that every member is newly seated (SEATED; an incumbent in the group is a failure), and that every member's own delivery checks pass; any failure reverts the whole group. A member who already holds a seat cannot satisfy another candidate's condition to be seated together: the condition is about new seats, and an earlier seat is not in the group. A candidate who is willing to be seated first and start work only when a colleague arrives gives an unconditional assent and leaves the pause to the task's terms.
  • deliverSubstitute replaces a seated member. The predecessor placement MUST be a delivered, not superseded placement of the same call and role, and MUST have a standing lapse (Section 10). The sink replaces the predecessor's account by the candidate's in the same seat; the predecessor placement records supersededBy, its bond is released, and the new receipt records method SUBSTITUTE and the predecessor. A member who has left is not substituted — there is no seat to replace, the sink refuses — the vacancy is filled by deliver under whatever admission the roster's phase allows.

The receipt of a delivered placement is the placement record with kind, method, seatEpoch, phase, deliveredAt, termsVersion = 1 and previous set, read through getPlacement, together with the call's task reference, mandate and sink and the round's policy and terms commitments. A receipt is never deleted or rewritten; a later placement supersedes it, a reaffirmation increments its terms version, retirement of the call ends what it authorizes.

Seat and authorization. seatHeld(placementId) returns whether the placement is delivered, not superseded, its call not retired, and the sink reports the account holding an active seat in the role at the recorded epoch. authorizedFor(placementId, actionRef, proof) returns (authorized, termsVersion, charterCurrent): authorized iff seatHeld and actionRef is a leaf of the placement's current action root under proof; charterCurrent is the sink's own acceptance signal for the account (for a swarm: whether it has accepted the current commitment version). An authorization answered here is a precondition a resource controller consults; the controller enforces its own rights on the actual action.

Reaffirmation. The account of a delivered, not superseded placement MAY reaffirm(placementId, termsHash, actionRoot), replacing its terms and action root and incrementing termsVersion. This is how a member extends what it authorizes after the task or the charter changed. Nothing in this ERC removes a seat, a contribution or an authorization already given because a member does not reaffirm: a new action needs an authorization that covers it, and a member that gives none simply is not authorized for the new action. The registry MUST NOT treat non-reaffirmation as a lapse, an exit or a breach.

9. Placement sinks

A sink implements IPlacementSink. place MUST refuse unless the sink is authorized to deliver for this (callId, swarmId, phase, roleId); MUST refuse when the roster's current phase is not the round's; MUST return INCUMBENT with the current epoch and perform no admission when the account already holds an active seat in the role; MUST refuse when the account's seat is suspended; otherwise it performs the authority side of admission and, when a carried acceptance is given, the account's own acceptance in the same transaction, and MUST revert unless the account is active in the role afterwards. substitute MUST refuse unless the predecessor holds a seat (active or suspended) and the same post-condition holds for the candidate. seatHeld MUST compare the live status, role and epoch; acceptanceCurrent reports the sink's own acceptance signal; rosterGone reports a roster that no longer exists.

Authorization per call is what keeps a shared sink from being used against a roster: an organizer can open a public call that names any roster as its sink; without that roster's authorization for the call, nothing is seated.

Swarm registry profile (normative-optional). The reference sink is an adapter that holds the ADMIT authority of ERC-8447 swarms. Authorization for a call is given by the swarm's AMEND authority, or by its initiator while the swarm is FORMING, per phase and role; the adapter MAY serve many swarms and many calls. Delivery performs admit and, when the assent carried the account's EIP-712 charter acceptance, joinBySig, then reads memberStatus back; the seat epoch is the registry's seatEpochOf. Substitution performs substitute and the carried acceptance the same way. An account that applied on the swarm itself (applyToJoin) carries no acceptance; admit completes its admission if it accepted the current commitment version. Transfer of an ADDRESS-kind ADMIT authority to the adapter is the swarm's own transferAuthority, by the current holder; holding ADMIT does not give the adapter ACTIVATE, and this ERC never activates a swarm: activation remains the swarm's rule (roster thresholds, its authority, or both), and a relying party reads it from the swarm.

10. Obligation sources, response duties and bonds

Obligation source. status(task) returns (exists, version, taskHash, cancelled) and publisherOf(task) the account entitled to name recruiters, both read from the task contract alone and never from the caller; an unreadable task reports exists == false rather than reverting. The task tender profile (normative-optional) reads an ERC-8414 kernel: version and taskHash from taskOf, the publisher as updateAuthorityOf, and cancellation as isTenderCancelled; a frozen task reports normally. A source for another kind of obligation (a grant, a mandate of a collective, a standing program) answers the same four questions from that obligation's own record.

Response duty. What a member must respond to, who observes it and how it is cured is agreed in the round's terms; the registry records only the observation. The round's observer MAY reportLapse(placementId, dutyRef, evidenceRef) on a delivered placement with no open lapse, and MAY cureLapse within the cure window. A lapse is standing when it was reported and the cure window has passed without a cure. A standing lapse is the one precondition of substitution (Section 8); by itself it changes no seat and no authorization. A registry reading an identity's general activity signal, or a credential's status, MUST NOT treat either as a lapse: a lapse is the failure of the duty the terms named, observed by the party they named.

Bonds. When a round names a bond module the registry calls lock(placementId, account, termsHash) at delivery and release(placementId) when the placement is superseded or its call retired. The module holds the funds and is the authority on amounts; the registry records that it locked. A module MUST refuse to lock when the account's deposit for the placement does not meet its requirement for the terms, and a delivery whose lock fails MUST NOT be recorded. Slashing, if the module offers it, MUST be limited to breach kinds enumerated when the module was deployed and MUST be subject to an objection window; a dispute framework such as ERC-8471 MAY be bound as the party that proposes or vetoes it. An assent that was never delivered has nothing locked; a module that pre-locks at deposit releases what it pre-locked.

11. Clock

The registry exposes clock() and CLOCK_MODE() per ERC-6372; the reference implementation uses mode=timestamp. Every window of this ERC is read against the registry's clock.

12. Interfaces

interface IRecruitmentRegistry /* is IERC165 */ {
    enum Mandate { NONE, DELEGATED }
    enum Intake { BATCH, ROLLING }
    enum SelectorKind { ADDRESS, MODULE }
    enum RoundState { NONE, OPEN, SELECTING, DELIVERING, CLOSED }
    enum RoundOutcome { NONE, FILLED, PARTIAL, UNFILLED, CANCELLED }
    enum Screen { PENDING, PASS, FAIL, DEFERRED }
    enum PlacementState { NONE, ASSENTED, SELECTED, DELIVERED, WITHDRAWN, EXPIRED }
    enum Selection { NONE, RECOMMENDED, WAITLISTED, CONDITIONAL, DELIVERABLE }
    enum DeliveryKind { NONE, SEATED, INCUMBENT }
    enum DeliveryMethod { NONE, ADMIT, SUBSTITUTE, INCUMBENT }

    struct TaskRef { uint256 chainId; address target; uint256 id; uint64 version; bytes32 taskHash; }
    struct RoleQuota { bytes32 roleId; uint32 min; uint32 max; }

    struct CallInput {
        TaskRef task; address source; Mandate mandate; bytes32 mandateId; address sink; bytes32 swarmId;
        bytes32 requirementHash; RoleQuota[] requirement; string uri;
    }
    struct RoundInput {
        bytes32 policyHash; bytes32 termsHash; Intake intake; SelectorKind selectorKind; address selector;
        address screen; address bond; address observer; uint64 assentUntil; uint64 deliverUntil;
        uint64 cureWindow; uint32 phase; RoleQuota[] roles;
    }
    struct AssentInput {
        bytes32 roundId; bytes32 roleId; bytes32 termsHash; bytes32 dataHash; bytes32 actionRoot; uint256 bid;
        bytes32 groupId; uint16 groupSize; uint64 expiresAt; bool revocable;
        bytes32 charterHash; uint256 charterDeadline; bytes charterSig;
    }

    // EIP-712: Assent(bytes32 roundId,address account,bytes32 roleId,bytes32 termsHash,bytes32 dataHash,
    //   bytes32 actionRoot,uint256 bid,bytes32 groupId,uint16 groupSize,uint64 expiresAt,bool revocable,
    //   bytes32 charterHash,uint256 nonce,uint256 deadline)   domain name "STR", version "1"

    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    function mandateIdOf(TaskRef calldata task, address source, address recruiter, bytes32 scopeHash) external view returns (bytes32);
    function registerMandate(TaskRef calldata task, address source, address recruiter, bytes32 scopeHash, uint64 until) external returns (bytes32 mandateId);
    function revokeMandate(bytes32 mandateId) external;

    function openCall(CallInput calldata input) external returns (bytes32 callId);
    function retireCall(bytes32 callId) external;
    function coverageMet(bytes32 callId) external view returns (bool met, bytes32[] memory missing);

    function openRound(bytes32 callId, RoundInput calldata input) external returns (bytes32 roundId);
    function closeIntake(bytes32 roundId) external;
    function closeSelection(bytes32 roundId) external;
    function closeRound(bytes32 roundId) external;

    function placementIdOf(bytes32 roundId, address account) external pure returns (bytes32);
    function assent(AssentInput calldata input) external returns (bytes32 placementId);
    function assentBySig(AssentInput calldata input, address account, uint256 deadline, bytes calldata signature) external returns (bytes32 placementId);
    function assentDigest(AssentInput calldata input, address account, uint256 deadline) external view returns (bytes32);
    function nonces(address account) external view returns (uint256);
    function rescreen(bytes32 placementId) external;
    function withdraw(bytes32 placementId) external;
    function expire(bytes32 placementId) external;

    function select(bytes32 roundId, bytes32[] calldata placementIds, Selection[] calldata selections, bytes32 ruleRef) external;
    function selectByModule(bytes32 roundId) external;

    function deliver(bytes32 placementId) external;
    function deliverGroup(bytes32[] calldata placementIds) external;
    function deliverSubstitute(bytes32 placementId, bytes32 previousPlacementId) external;

    function seatHeld(bytes32 placementId) external view returns (bool);
    function authorizedFor(bytes32 placementId, bytes32 actionRef, bytes32[] calldata proof)
        external view returns (bool authorized, uint32 termsVersion, bool charterCurrent);
    function reaffirm(bytes32 placementId, bytes32 termsHash, bytes32 actionRoot) external;

    function reportLapse(bytes32 placementId, bytes32 dutyRef, bytes32 evidenceRef) external;
    function cureLapse(bytes32 placementId, bytes32 evidenceRef) external;
    function lapseStanding(bytes32 placementId) external view returns (bool);

    // views: getMandate, getCall, requirementOf, deliveredOf, getRound, roleQuotasOf, placementsOf,
    //        poolOf, deliveredInRole, getPlacement, charterSigOf, clock, CLOCK_MODE
}

interface IPlacementSink /* is IERC165 */ {
    struct Placing {
        bytes32 callId; bytes32 placementId; bytes32 swarmId; address account; bytes32 roleId; uint32 phase;
        address previous; bytes32 charterHash; uint256 charterDeadline; bytes charterSig;
    }
    function place(Placing calldata p) external returns (uint8 kind, uint256 seatEpoch); // kind: DeliveryKind
    function substitute(Placing calldata p) external returns (uint256 seatEpoch);
    function seatHeld(bytes32 swarmId, address account, bytes32 roleId, uint256 seatEpoch) external view returns (bool);
    function acceptanceCurrent(bytes32 swarmId, address account) external view returns (bool);
    function rosterGone(bytes32 swarmId) external view returns (bool);
}

interface IObligationSource /* is IERC165 */ {
    function status(TaskRef calldata task) external view returns (bool exists, uint64 version, bytes32 taskHash, bool cancelled);
    function publisherOf(TaskRef calldata task) external view returns (address);
}

interface IScreeningModule /* is IERC165 */ {
    function screen(bytes32 roundId, bytes32 roleId, address account, bytes32 dataHash) external view returns (uint8 verdict, bytes32 reasonRef); // verdict: Screen
}

interface ISelectionModule /* is IERC165 */ {
    function rank(bytes32 roundId, bytes32[] calldata pool) external view returns (bytes32[] memory ordered);
}

interface IBondModule /* is IERC165 */ {
    function lock(bytes32 placementId, address account, bytes32 termsHash) external;
    function release(bytes32 placementId) external;
    function lockedOf(bytes32 placementId) external view returns (uint256);
}

The full declarations, with the record structs returned by the views and the events, are in IRecruitmentRegistry.sol, IPlacementSink.sol and IModules.sol; the shared types in STRTypes.sol. In the Solidity sources the enumerations are typed; the uint8 positions above are their ABI encoding.

Events. A conforming registry MUST emit MandateRegistered, MandateRevoked, CallOpened, CallRetired, RoundOpened, Assented, Screened, Withdrawn, IntakeClosed (with the pool root and size), Selected, SelectionClosed, PlacementDelivered (with the kind, the method, the roster, the seat epoch, the phase and the predecessor), PlacementExpired, Reaffirmed, LapseReported, LapseCured and RoundClosed, with the fields given in the interface file.

13. Interface identifiers

InterfaceIdentifier
IRecruitmentRegistry0x79300075
IPlacementSink0x6840a6e6
IObligationSource0xd2c2a149
IScreeningModule0x02a549eb
ISelectionModule0x3372a1f4
IBondModule0xfd390f1e

14. Errors

Implementations SHOULD revert with the following custom errors (or equivalent reason strings) so that relying contracts and tests can distinguish causes. Mandate and call: STR_NotPublisher, STR_TaskMismatch, STR_TaskCancelled, STR_UnknownMandate, STR_MandateNotHeld, STR_MandateTaskMismatch, STR_UnknownCall, STR_NotRecruiter, STR_CallRetired, STR_NoRetireCause, STR_RequirementShape. Round: STR_UnknownRound, STR_WrongRoundState, STR_WindowShape, STR_RoundLive, STR_NoRoles, STR_UnknownRole, STR_SelectorShape, STR_BeforeDeadline, STR_AfterDeadline. Assent: STR_TermsMismatch, STR_ExpiryShape, STR_GroupShape, STR_AlreadyAssented, STR_ScreenFailed, STR_NotScreened, STR_SignatureExpired, STR_BadSignature, STR_NotRevocable. Selection: STR_UnknownPlacement, STR_NotSelector, STR_WrongPlacementState, STR_SelectionShape, STR_PoolNotFrozen, STR_ModuleOrder. Delivery: STR_NotDeliverable, STR_OfferExpired, STR_ConditionalOnly, STR_GroupUnmet, STR_GroupNotNew, STR_NoLapse, STR_NotPredecessor, STR_Superseded. Receipt and duty: STR_NotDelivered, STR_NotObserver, STR_LapseOpen, STR_CureWindowOver, STR_NotAccount.

15. Reserved extension points

The following are reserved — named so that implementations leave room for them, but not specified: sealed-bid and price-binding selection (an award mechanism such as ERC-8469 is a selection module whose award list the registry consumes; a price binding is a property of the task, not of this registry); lottery selection; collective selection by a decision framework such as ERC-8436, whose timing must fit the round's windows including appeals; zero-knowledge screening over trust assertions (ERC-8419) and identity state (ERC-8434); safety-binding prerequisites (ERC-8468); applications by a swarm account on behalf of a sub-team with structural pass-through; cross-chain task references and rosters; discovery of calls through a value registry (ERC-8444); and multiple rosters per call.

Rationale

Why a receipt is the product, not a market process. Calls for participation, screening committees, auctions and lotteries differ by task and will keep differing; a standard that fixed one of them would be a platform. What every recruitment shares, and what no existing record gives, is the verifiable chain from a task version to a seat: mandate, assent, selection, delivery. The receipt is that chain written once; the processes around it are modules and documents committed by hash.

Why three layers. A single recruitment status loses facts. A first round succeeds, a reviewer leaves, a backfill round finds nobody: the first round was filled, the current composition is not covered, and the backfill round is unfilled — all true, each in its own record. The call keeps the continuous identity, rounds keep their own rules and outcomes, placements keep their own histories, and coverage is computed from the roster now.

Why a mandate is registered by the publisher and bound to a version. A task's owner holds an asset, its update authority holds publication, its acceptance authority judges deliverables; none of these facts says who may recruit in the task's name. An on-chain registration by the update authority, bound to the task reference, is verifiable by anyone and expires with the version; an independent organizer needs none of it to recruit for its own team. Two calls on one task are the normal case, not a conflict: neither reserves anything on the task.

Why the task reference carries both a version and a content hash, and why equal content does not revive an assent. A candidate accepted conditions as they stood at a version. A later version that restores the text is a new publication under the publisher's authority; the assent did not cover the interval, and a registry that revived assents on hash equality would make the version meaningless. Work already submitted against the earlier version settles under the task's own rules, which this ERC never touches.

Why delivery re-checks everything and is permissionless. Between a selection and its delivery, the offer may expire, the task may be cancelled or republished, the round may close. Checking at the moment of delivery, against records rather than against the caller, is what lets the registry be a verifier instead of a party. The sink is checked the same way: a seat exists only when the organization says so, which is why place must read the roster back and why an expired offer cannot be rescued by acting on the organization directly.

Why incumbents are a delivery kind. The second situation of the Motivation — a member taking on new work — is a recruitment with a result and no admission. Recording it as a receipt with kind INCUMBENT lets a client show "accepted in seat" rather than inventing an admission, and lets coverage count seats rather than receipts.

Why group conditions are atomic and about new seats. "I join only if B is seated with me" is a condition on the transaction, not on the roster: it is satisfied by a group delivery in which both are newly seated and by nothing else. A member seated earlier is a fact the condition did not ask for. The other reading — "seat me, I will wait for B before I work" — is an unconditional assent with a pause in the terms, and the two must not be confused by the registry.

Why non-reaffirmation changes nothing. The swarm framework already rules that a registry must not suspend or exit a member for not accepting an amendment. This ERC inherits the rule and adds its own kernel line: a new action needs an authorization that covers it. A reviewer who declines to sign a public report keeps its seat and its past contributions and has no authorization to sign; a colleague who reaffirms has one. Alignment is enforced where actions happen, by reading the receipt, not by pruning the roster.

Why a lapse is observed, not inferred. Liveness signals of an identity are refreshed by many unrelated writes; a credential's status is a fact about the credential. Neither says whether a member answered the review request the task required. The round names what is owed and who observes it, the observer records the lapse and the cure, and the registry's only use of a standing lapse is to permit a substitution.

Why substitution and backfill are different paths. A member still seated can be replaced in its seat — the swarm framework's substitute, exempt from boundary and window checks, exists for that, and a CLOSED phase still allows it. A member who left leaves a vacancy, which only the roster's admission rules can fill; a round that tried to "substitute" a vacancy would be writing a seat that does not exist.

Why the frozen pool exists only for batch selection. A ranking claims to cover all eligible applications and must therefore be computed over a set everyone can check: the pool root, the assent list and the withdrawals reconcile it. A targeted invitation or a rolling backfill makes no such claim and should not have to freeze anybody else's application.

Why bonds and selection rules are outside the kernel. Holding funds would make the registry a party to every dispute about amounts; the module that holds them is the authority on them, and the kernel records only that a lock happened. Likewise a ranking rule must be recomputable and a committee's judgment must be attributable, and a kernel can require both without implementing either.

Backwards Compatibility

This ERC introduces new contracts and changes no existing interface. It reads ERC-8414 through four views and acts on ERC-8447 through the registry's own admit, substitute and joinBySig, under an ADMIT authority the swarm assigns to the adapter by its existing rules; a swarm that assigns no such authority is unaffected. Tasks published before this ERC can be recruited for by independent organizers; a delegated call requires a mandate registered by the task's update authority, which needs no change to the task.

Test Cases

The reference implementation ships with a Foundry suite of 31 tests that runs the four end-to-end cases against the vendored swarm registry, task tender kernel and collective-decision registries. Each test states the fact it checks, the authoritative source and the expected result; the key rows are:

  • A — native path. A frozen task version is recruited for (success); a mandated call and an independent call coexist on it; the rival cannot use the mandate, a self-declared "root" can neither register nor use one, a revoked mandate opens nothing; four workers and a reviewer assent (one by applyToJoin, four with carried charter signatures); the pool freezes, AscendingBidSelection orders it 0, 3, 3, 4, 5 with ties in assent order, selectByModule applies the quotas; three deliveries each read ACTIVE from the swarm; coverage, rosterMet and activate are asserted as three separate facts; receipts answer authorizedFor per action; the tender settles a fulfillment afterwards under its own judge. Negatives: an expired offer is refused by deliver, and the candidate's direct acceptCharter leaves it CANDIDATE with no PlacementDelivered; a conditional placement cannot be selected DELIVERABLE nor delivered alone; a group of [A, B] where B already holds a seat is refused, a group of two newly seated conditional placements succeeds; a group with one bad charter signature reverts as a whole; a cancelled task blocks new deliveries and lets a stranger retire the call.
  • B — supervision and replacement. An observer named in the round reports a lapse; a cure inside the window clears it; a lapse after the window stands and cannot be cured late, and by itself touches no seat. With a standing lapse, deliverSubstitute replaces the reviewer in one transaction (predecessor EXITED(REPLACED), successor ACTIVE after substitute + joinBySig, epoch advanced, receipt method SUBSTITUTE, old receipt superseded and no longer authorizing); without a lapse substitution is refused, and across roles it is refused. A reviewer who left cannot be substituted (the sink reports no seat); ordinary admission fills the vacancy, and the old receipt stays delivered, unheld and not superseded. In a CLOSED phase admission is refused by the swarm while substitution of a lapsed member succeeds.
  • C — objective change. A council of three verifiers, the swarm's AMEND authority through the collective-decision adapter, decides a material amendment; the test asserts Final, Decided, Yes, Binding, consumer = adapter and the subject's binding to the decision point, call, charter version and phase, then executes it and asserts the commitment version advanced. The reviewer R does not accept: still ACTIVE, receipt delivered, authorizedFor(publish) false with charterCurrent false, authorizedFor(review) still true. The worker Q accepts the new charter and reaffirms: authorizedFor(publish) true at terms version 2 with charterCurrent true; nobody can reaffirm for another; R may leave in the exit window and coverage then drops. Negative: a task updated to v2 and restored to v1's content at v3 does not revive a v1 assent (STR_TaskMismatch), a seat delivered under v1 stays a swarm fact, a stranger cannot retire the call, the earlier submission is accepted under the tender's own authority with taskVersion = 1, and a new call binds version 3 explicitly.
  • D — incumbent. A later round of the same call records a seated worker taking a work package: kind INCUMBENT, same epoch, no change in the swarm's role count, the new receipt authorizes the new action and the old one does not; coverage counts seats, not receipts. A seated worker cannot be recorded as an incumbent reviewer. After leaving and being seated again, the old receipts stay dead (epoch moved on) while the new one answers.
  • Kernel. Round shape checks and one live round per call; batch waitlists under quotas and the four outcomes; DEFERRED screening re-screened to PASS, FAIL refusing the assent; withdrawal rules and one assent per round; signed assents with nonce, wrong-signer and expiry failures; the bond module's lock, locked reclaim refusal, unknown breach kind, objection window, slash and release on retirement; per-call sink authorization against a rival's call; interface identifiers.

Reference Implementation

RecruitmentRegistry.sol with the linked PlacementLib.sol and STRStore.sol implements the registry; SwarmPlacementAdapter.sol the swarm registry sink; TaskTenderSource.sol the task tender source; AscendingBidSelection.sol, ListScreen.sol and NativeBondModule.sol the three module examples. The swarm and task kernel interfaces the adapters read are vendored number-neutrally in vendored/. Under solc 0.8.24 with the IR pipeline the registry compiles to 21,861 bytes of runtime code and the library to 8,545, within the EIP-170 limit.

The reference contracts are deployed on Sepolia (chain id 11155111) and the four test cases were executed there against the live ERC-8447 registry, the live ERC-8436 registry and a live ERC-8414 task token: RecruitmentRegistry at 0x4CE863b29b5ff467BE3A2008774c275d711A5604 (linked to PlacementLib at 0x7642171231d4107390b18932aa3B670ECCe83045), SwarmPlacementAdapter at 0xfbb7637E23e7570B68049FF23cb82DB555890B56, TaskTenderSource at 0x010D549A95e49Ad9F86FDa44C20b8A1704498536, AscendingBidSelection at 0xba26ae11BE18B434fc7caE6C31A3958464Af8545. The record of every transaction and read of that run is kept with the reference repository.

Security Considerations

Self-declared mandates. Anyone can compute a mandate id; only the task's publisher can register one, and a delegated call is checked against the registration, the recruiter, revocation, expiry and the exact task reference. A mandate proves what the publisher said about recruiting and nothing about payment or exclusivity; a relying party that needs those reads the task.

Shared sinks. A public call can name any roster. The reference adapter seats nothing for a call the roster's authority has not authorized for that phase and those roles, and accepts placings only from its own registry; an adapter that skipped either check would let an organizer take seats in a team it does not speak for.

Expired offers and direct action on the organization. A candidate who acts on the swarm after its offer expired gets what the swarm gives a candidate — a pending application — and nothing from the recruitment. The delivery check at the moment of delivery is the only thing that opens a seat through this registry, and it is the sink, reading the organization back, that confirms the seat exists.

Front-running rolling selection. In a rolling round, the first deliverable placement delivered takes the seat; a recruiter who wants a fair comparison uses batch intake, whose pool is frozen before anyone is ranked. Sealed bids and lotteries are reserved extensions precisely because an unsealed ranking is manipulable where the ask is public.

Pool completeness. A pool root proves which assents were ranked, not that every eligible candidate was admitted to the pool; the screening module and the assent list are the records to audit for exclusion. A registry that let a recruiter edit the pool after freezing would break the ranking's claim.

Bonds and griefing. A bond module that slashed on judgment would make the registry a party to every quality dispute. The reference module slashes only for breach kinds enumerated at deployment, after an objection window, to a fixed beneficiary; a dispute framework can be bound as the proposing or vetoing party. Releases happen on supersession and retirement, so a retired call cannot hold deposits hostage.

Response duties. An observer with no counterweight could manufacture lapses to force substitutions. The round names the observer in its terms, the cure window gives the member a path back, the lapse is public, and substitution still requires a selected successor and the sink's own checks. A task that wants a stronger guarantee names a collective or a dispute binding as observer.

Version round trips. A publisher could republish a task to invalidate pending assents. That is a power the publisher has over its own task; its exercise is visible as versions, and it never reaches work already submitted, which settles under the task's rules.

Signed assents. A relayed assent binds a nonce and a deadline and is checked through ERC-1271 for contract accounts; a carried charter signature is the swarm registry's own EIP-712 structure, which binds the seat epoch and the phase, so a signature given for one seat or one phase is not reused for another.

Gas and unbounded loops. Coverage walks the call's delivered placements and group delivery is quadratic in the group's size; both are bounded by the task's own quotas. The reference selection module sorts in place and is meant for the small pools of a quota-bounded round; a deployment expecting large pools uses a module that proves an off-chain order.

Copyright and related rights waived via CC0.

EIP.tools

EIP.tools

Search, read, and map Ethereum improvement proposals, ERCs, RIPs, and CAIPs from one focused interface.

Farcaster
by @apoorveth