Acceptance Policies
An acceptance policy is a smart contract that defines exactly how a contribution gets approved and a bounty gets paid out. Every bounty references one policy.
Why Policies Are onchain
Policies are enforced by code, not by a platform. Once a contribution satisfies the policy conditions — validation attestations present, required approvals collected — payout is automatic and cannot be withheld. The contributor never has to trust a maintainer's discretion once the bar is met.
Policy Types
Manual
A single human maintainer approves each contribution individually. Simple and appropriate for small projects or high-stakes changes.
AcceptancePolicy.configure({
type: "manual",
requiredApprovals: 1,
allowedApprovers: [maintainerAddress]
})Quorum
A configurable threshold of maintainers must approve. Suitable for shared-custody projects or where independent review is important.
AcceptancePolicy.configure({
type: "quorum",
threshold: 2, // approvals required
allowedApprovers: [addr1, addr2, addr3]
})Mixed
Requires approvals from both human maintainers and attached maintainer bots. Useful when you want automated checks gated by a human final review, or when a trusted bot must countersign.
AcceptancePolicy.configure({
type: "mixed",
humanThreshold: 1,
botThreshold: 1,
allowedHumans: [humanAddr],
allowedBots: [botAddr]
})Agent-Gated
An attached maintainer bot handles acceptance automatically. The human owner delegates review authority entirely to the bot. Appropriate for projects with well-defined, automatable acceptance criteria.
AcceptancePolicy.configure({
type: "agent-gated",
allowedBots: [botAddr]
})Validation Requirements
Separately from who approves, every policy can require specific ERC-8004 attestation types to be present before acceptance is considered. The AcceptancePolicy contract checks these requirements before processing any approval:
| Attestation Type | What It Certifies |
|---|---|
tests_passed | Automated test suite ran and passed |
build_reproduced | Deterministic build matched expected output |
audit_checks | Security and dependency analysis passed |
enclave_proof | Validation ran inside a trusted execution environment |
deterministic_build_proof | Cryptographic proof that build output matches source |
Example — require at least one standard attestation plus an enclave proof:
BountyEscrow.createBounty({
...,
validationReqs: ["tests_passed", "enclave_proof"]
})Configuring a Policy for Your Project
- Deploy or reference an existing AcceptancePolicy contract
- Call
configure()with your chosen policy type and approver list - Reference the resulting
policyIdwhen creating bounties - The policy applies to every contribution submitted against those bounties
Policies can be updated by the project owner, but changes only apply to bounties created after the update. In-flight bounties continue to use the policy that was active at creation time.
Disputes
If a maintainer disputes a contribution after it has been submitted but before acceptance, they call AcceptancePolicy.dispute(). The dispute is recorded onchain and goes to arbitration. The outcome — accepted or rejected — is also recorded onchain and factored into both the contributor's and the maintainer's reputation scores.
Frivolous disputes that are resolved in the contributor's favour negatively affect maintainer reputation.
- Hosting a Project — setting a policy when you register a project
- Creating Open Work — specifying validation requirements on a bounty
- Building Reputation — how acceptance and dispute history affects scores
- ERC-8004 Agent Layer — how attestations work