EIPs Explained

ERC-1081 · Stagnant · ERC · 2018-05-14

ERC-1081: Standard Bounties

A proposed standard contract for on-chain bounties: issue a task, collect fulfillments, and pay accepted work in ETH or any ERC-20, so bounty platforms could share work and reputation.

What problem does it solve?

Bounty platforms (the spec's authors cite Gitcoin, Bounties Network and Status Open Bounty) each kept bounties in their own format. A bounty posted on one platform could not be seen or fulfilled through another, and nobody could track reputation across them, such as how often an issuer actually pays or how often a worker's submissions are accepted.

ERC-1081 proposes one contract shape for a bounty so any platform can create, read, fulfil and pay bounties the same way, with every step publicly auditable on-chain.

How it works

A bounty has three phases:

  1. Issued: an issuer (optionally with an arbiter) publishes requirements and a deadline. Requirements live off-chain in a JSON document; the contract stores its IPFS hash in data.
  2. Fulfilled: one or more fulfillers submit a deliverable, again as an IPFS hash. Several people can share one submission; credit is split by numerators over a common denominator.
  3. Accepted: the issuer or arbiter accepts a fulfillment and pays out, possibly in several tokens at once.

Core functions:

Function Purpose
initializeBounty(issuer, arbiter, data, deadline) Set up a bounty (works with proxy deployments)
fulfillBounty(fulfillers[], numerators[], denominator, data) Submit work, split credit
acceptFulfillment(fulfillmentId, tokens[], amounts[]) Pay a submission
drainBounty(tokens[]) Issuer withdraws remaining funds
changeBounty / changeIssuer / changeArbiter / changeData / changeDeadline Edit the bounty

Optional extras include acceptAndFulfill (issuer submits and pays in one step so a new contributor needs no ETH for gas) and refundableContribute / refundContribution (funders can reclaim money if nothing is paid by the deadline).

Funding is flexible: anyone can simply transfer tokens to the bounty's address to raise the reward.

Sample code

The issuance data points to JSON like this (abridged from the spec's schema):

{
  "payload": {
    "title": "Add dark mode to the dashboard",
    "description": "Requirements and acceptance criteria...",
    "issuer": { "address": "0xIssuerAddress" },
    "funders": [],
    "categories": ["code"],
    "tags": ["frontend"],
    "created": 1700000000,
    "tokenSymbol": "ETH",
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "webReferenceURL": "https://github.com/org/repo/issues/1"
  },
  "meta": { "platform": "example", "schemaVersion": "0.1", "schemaName": "standardSchema" }
}

A Solidity interface sketch of the required functions:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IStandardBounty {
    function initializeBounty(address issuer, address arbiter, string calldata data, uint256 deadline) external;
    function fulfillBounty(address[] calldata fulfillers, uint256[] calldata numerators, uint256 denominator, string calldata data) external;
    function acceptFulfillment(uint256 fulfillmentId, IERC20[] calldata payoutTokens, uint256[] calldata tokenAmounts) external;
    function drainBounty(IERC20[] calldata payoutTokens) external;
    function changeBounty(address issuer, address arbiter, string calldata data, uint256 deadline) external;
}

Things to know

  • Status is Stagnant. It was never finalised and there is no widely adopted cross-platform bounty interface.
  • The spec's own reference implementation is marked as unaudited and not recommended for holding funds on mainnet.
  • Issuers can change requirements and drain funds, so fulfillers are trusting the issuer (or arbiter) to pay. The standard gives transparency, not enforcement.
  • Payouts use ERC-20 tokens or ETH; the usual caveats about non-standard tokens apply.

#bounties #payments #erc20 #coordination

Details

Authors
Mark Beylin <[email protected]>, Kevin Owocki <[email protected]>, Ricardo Guilherme Schmidt (@3esmit)
Status
Stagnant
Type
Standards Track / ERC
Created
2018-05-14
Requires

Machine-readable: Markdown · JSON