Code Monkey home page Code Monkey logo

standardbounties's Introduction

StandardBounties

Gitter Codeship Status for ConsenSys/StandardBounties

Version 1.1.0

  1. Rationale
  2. Implementation
  3. Development
  4. Documentation

A set of standard contracts to be used as interfaces for any kind of bounty, either qualitative or quantitative in nature.

1. Rationale

Ethereum smart contracts can trivially facilitate transactions of resources (or tokens) between individuals or groups, but service transactions are more complex. Requesting individuals (issuers) must first approve the work they're receiving before paying out funds, meaning bounty hunters must have trust that the issuer will pay them in the spirit of the original contract.

The StandardBounties.sol contract facilitates transactions on qualitative data (often representing artifacts of completion of some service), allowing bounty issuers to systematically approve the work they receive.

2. Implementation

A bounty can be used to pay amounts of ETH or a given token, based on the successful completion of the given task. The contract aims to reduce the necessary trust in the issuer by forcing them to deposit sufficient Ether (or tokens) to pay out the bounty at least once.

  • A bounty begins by being issued, either through the issueBounty() function (which issues the bounty into draft stage), or issueAndActivateBounty(), which issues the bounty into the active stage

  • In the Draft state, all bounty details can still be mutated.

    In this state, the various functions which can be called are:

    • contribute() [ANYONE]: contributes ETH (or tokens) to the bounty
    • activateBounty() [ONLY ISSUER]: This will activate the bounty
    • killBounty() [ONLY ISSUER]: This will kill the bounty

    As well as several functions to alter the bounty details:

    • changeBountyDeadline() [ONLY ISSUER]
    • changeBountyData() [ONLY ISSUER]
    • changeBountyFulfillmentAmount() [ONLY ISSUER]
    • changeBountyArbiter() [ONLY ISSUER]
    • extendDeadline() [ONLY ISSUER]
    • transferIssuer() [ONLY ISSUER]
    • increasePayout() [ONLY ISSUER]
  • A bounty transitions to the Active state when the issuer calls activateBounty(), or if it was initially issued and activated.

    This is only possible if

    • the bounty hasn't expired (isn't past its deadline)
    • the bounty has sufficient funds to pay out at least once

    Once a bounty is Active, bounty hunters can submit fulfillments for it, and the bounty issuer can approve fulfillments to pay out the rewards.

    In this state, the various functions which can be called are:

    • contribute() [ANYONE]: contributes ETH (or tokens) to the bounty
    • fulfillBounty() [ANYONE BUT ISSUER OR ARBITER]:
    • updateFulfillment() [ONLY FULFILLER]
    • acceptFulfillment() [ONLY ISSUER OR ARBITER]:
    • increasePayout() [ONLY ISSUER]:
    • transferIssuer() [ONLY ISSUER]
    • extendDeadline() [ONLY ISSUER]
    • killBounty() [ONLY ISSUER]:
  • A bounty transitions to the Dead state when the issuer calls killBounty(), which drains the bounty of its remaining balance.

    In this state, the only functions which can be called are:

    • extendDeadline() [ONLY ISSUER]
    • activateBounty() [ONLY ISSUER]

3. Development

Any application can take advantage of the bounties network registry, which is currently deployed on the Main Ethereum Network at 0x2af47a65da8cd66729b4209c22017d6a5c2d2400, and on the Rinkeby network at 0xf209d2b723b6417cbf04c07e733bee776105a073. The BountiesNetwork.eth name will also always resolve to the most up-to-date registry version for the StandardBounties contract.

Data Schema

For details on the data schema used for all JSON objects which are uploaded to IPFS, see the schema

If you're building on the StandardBounties and would like to add additional data fields, please submit a pull request on this repo.

4. Documentation

For thorough documentation of all functions, see the documentation

standardbounties's People

Contributors

mbeylin avatar gnsps avatar nlaz avatar

Watchers

John D. Pope avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.