Skip to content

Instantly share code, notes, and snippets.

@yondonfu
Last active April 4, 2017 19:29
Show Gist options
  • Save yondonfu/a563cd063344b4ef6d7e2992b9a8f0f9 to your computer and use it in GitHub Desktop.
Save yondonfu/a563cd063344b4ef6d7e2992b9a8f0f9 to your computer and use it in GitHub Desktop.
OSSMarket

Abstract

The OSSMarket project is a proof-of-concept approach to allocating time and resources for open source software development using economic incentives embedded in a blockchain based protocol.

Introduction

Open source software (OSS) is crucial component of software development. Individuals and organizations ranging from large technology companies like Google to hobbyist developers working on side projects rely on OSS. Arguably one of the most impressive attributes of OSS is that the continued development and maintenance of OSS projects often primarily depends on the altruism of contributors and maintainers. The scarcest resources of OSS projects end up being the time and attention of contributors and maintainers.

Although OSS has already seen a tremendous amount of success as is, it is not without its problems:

  • OSS projects are often just side projects. There is no strong incentive for a maintainer to carefully review a complicated pull request for a complicated issue if the code already passes CI tests. However, code that passes CI tests may make the codebase worse in other ways.

  • As a maintainer, how do you prioritize issues?

  • There is a need to attract regular contributors and maintainers who are familiar with the codebase.

  • People become reluctant to create new projects due to the maintenance burden.

  • Maintainers are reluctant to leave a project when they have other things on their plate in fear of leaving a vacuum of leadership.

Bitcoin pioneered a system in which economic incentives embedded in software could influence human behaviors. Even in a game of imperfect information, parties acting out of self-interest could reach a game-theoretic equilibrium - in the case of Bitcoin the equilibrium representing peer to peer value transfer on the Internet.

The creation of Ethereum and its general decentralized computation model with smart contracts allowed developers to bake economic incentives into applications and platforms with digitally scarce tokens. Adding economic incentives to OSS development in a clear and transparent way could help sustain OSS projects by attracting new contributors and relieving maintainers of the burden of properly allocating time and attention in the project on their own.

This project is a proof-of-concept and experiment in adding economic incentives to OSS development. There have been past attempts to use money to incentivize OSS contributions with efforts such as BountySource and CommitETH. However, these efforts rely on bounty systems that only reward contributors and not maintainers who play a crucial part of OSS development. Furthermore, with the advent of token economies, the possibility of leveraging the network effects made possible by aligning the interests of parties in a system using tokens in the case of OSS development is an interesting idea worth exploring at the very least.

OSSMarket Protocol

Actors

  • Voters: up vote and down vote issues by bonding tokens. The weight of a vote is proportional to the number of tokens bonded. The net cumulative voting weight on an issue will determine the ETH bounty assigned to an issue and the ranking of the issue on the issue board.

  • Contributors: submit pull requests to resolve issues. If a contributor's pull request is merged in, the contributor earns a portion of the ETH bounty assigned to the issue for the contributor's reward.

  • Maintainers: review pull requests for issues. If a maintainer merges in a pull request, the maintainer earns a portion of the ETH bounty assigned to the issue for the maintainer's cut.

Maintainer Verification

Maintainers of an existing OSS repository on Github can choose to use the OSSMarket protocol. In order to set up a repository to be used with the OSSMarket protocol, there must be a MAINTAINERS.md file in the base directory of the repository listing the Ethereum addresses of all the maintainers. One of the maintainers would initiate a verification transaction with a smart contract that would use Oraclize to verify the transaction creator as a maintainer and use the maintainer addresses in MAINTAINERS.md to create a smart contract for the repository.

Voting and Funding with Tokens

Anyone can purchase OSSTokens. The cost of an OSSToken depends on the current total supply of OSSTokens in circulation. The cost is computed using a cost function that takes the current token supply as an input. As a result, as the number tokens created increases, the cost of each token also increases. OSSTokens can also be traded on secondary markets.

Token holders can vote on issues by bonding their tokens to issues, thereby signaling the importance that they place on the issue. Since voters must buy in, they have skin in the game. Voters also assume the risk of a drop in token price when they lock their tokens up for a period time. However, in return, voters gain influence on issue prioritization. Voters might be parties interested in influencing the development of an OSS project. Voters might also just be strong believers in an OSS project that purchase tokens with the expectation that the continued success of a project will lead to an appreciation in token value. Voters that buy into the system early on might sell their influence on the project to other parties who do not want to take on the price risks of token ownership.

The ETH paid to purchase OSSTokens is sent to a repository smart contract that controls how the ETH is used to pay contributors and maintainers. As a result, token purchasers can also be viewed as project funders.

Bounties

The repository smart contract uses the current ETH balance to assign ETH bounties to issues according to the net cumulative voting weight associated with an issue. When an issue is resolved by a pull request, the contributor receives a portion of the ETH bounty as the contributor's reward. The contributor's reward is the ETH bounty minus the maintainer's cut. The maintainer's cut percentage can be parameterized. The maintainer that reviews and merges in a pull request receives the maintainer's cut. The maintainer can also choose to deposit any rewards earned into the repository smart contract. A larger contract ETH balance leads to larger bounties which can attract more contributors to the project.

The repository smart contract would use Oraclize to verify the existence of merged pull requests for issues.

The repository smart contract would also have an emergency stop using an X of Y Ethereum addresses scheme that the maintainers of the repository can use if a bug in the contract is discovered.

Influences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment