jjranalli / merge-to-earn

Merge to earn

Home Page:https://mte.slice.so

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge to earn banner

Automate rewarding contributors with a slice of ownership over a project and its earnings, when pull requests are merged.

Install

  1. Install Merge to earn Github app on one or more repositories
  2. Initialize the app for each repo on mte.slice.so by following the setup process

Setup process

Merge to earn (MTE) relies on:

  • A Slicer, to split the project's ownership and earnings among multiple contributors;
  • A Gnosis Safe, typically owned by the project's maintainers, to execute rewards distributions.

The setup process is carried out on mte.slice.so by someone who is both owner of the repo and the safe related to the project. It consists in:

  1. Delegating MTE to propose transactions on the appointed safe;
  2. Creating a slicer to represent the project.

How it works

When a pull request is opened:

  • A comment is automatically posted with instructions on how to request a slice reward;
  • The MTE bot keeps updating the scheduled slice distribution in the PR discussion, as new requests are made;
  • The PR owner can edit the scheduled distribution anytime, for example as new commits are made or after discussing with the reviewer.

When a PR is merged:

  • MTE proposes on the project's Gnosis Safe a transaction to mint the agreed amount of slices;
  • Once maintainers sign and submit the transaction, the contributors receive the reward. As a result they will receive a proportional share of earnings related to the project's Slicer from that moment onward, directly on slice.so.

See it in action on this Demo PR

MTE first comment and instructions (click to expand)
Example scenario (click to expand)
  • A project starts with 1000 slices to each of its 5 creators, for their initial work. The creators share equal ownership over the project's slicer, and those who act as maintainers are also owners of the Gnosis Safe which approves new slice distributions.

    Any payment sent to the slicer at this stage will be split equally between creators (20% each).

  • A new contributor opens a PR and asks for 500 slices for its work. Once the PR is merged and the transaction is submitted on the safe, slices are minted to its wallet.

    Any payment sent to the slicer at this stage will be split: ~9% to the contributor, ~18% to each project creator

As a result, contributors are retributed proportionally to their work and receive earnings based on when their PRs were merged.

Everything is handled transparently on-chain, while Github settings and permissions can be used to customize what happens between opening and merging a PR.

Notes

  • Each PR has a pinned MTE comment showing the scheduled slice distribution.
  • Contributors can manage their slices and withdraw any earnings on slice.so. Slices are ERC1155 tokens so they can also be managed on the owner's ETH wallet and can be freely transferred (learn more on slice.so).
  • If a PRs is merged while previous mint proposals haven't been executed, a new transaction will be proposed which includes all those not yet executed queued on the same nonce. It is thus possible to combine multiple proposals in a single transaction, by executing the last transaction proposed by MTE on a safe for each nonce.
  • When a slicer is created on mte.slice.so, the appointed Gnosis Safe becomes its controller and is able to mint or burn new slices or sell products on the slicer's decentralized store.

Learn more

Contributing

This project uses Merge to earn to reward contributors with a piece of the Merge to earn slicer and its earnings, when pull requests are merged.

About

Merge to earn

https://mte.slice.so

License:Other


Languages

Language:TypeScript 99.6%Language:JavaScript 0.3%Language:SCSS 0.2%