Skip to main content

A Software-Defined Funding Distribution

Project description

Continuous Funding

LibreSelery is a tool to distribute funding in free and open source projects. With a new funding model it offers transparent, automated and adaptable compensation of contributors. The aim is to replace the middleman of donation distribution as far as possible with a free and transparent algorithm.

Join the chat at https://gitter.im/protontypes/LibreSelery Docker Pulls stability-experimental

This project is funded by LibreSelery itself. If you contribute to this repository, you will receive portation from the pool to your public email address.

Actions Status Balance BTC Balance EUR Donate with bitcoin Transaction History

Concept

LibreSelery is a simple command line tool that runs upon any git project manuely or automated by continuous integration. It creates as a donation pool collecting cryptocurrency in a wallet. At each run an amount is taken from the donation pool and distributed to the project's contributors and dependencies.

It is designed to run in a continuous integration pipeline like GitHub Actions. Donation transactions are automatically handled and transaction details are published for transparency into the wiki of your repository with a donation page of your project.

Donations are divided between contributors based on a public and transparent metric. The metric can be configured per repository and is based on the following weights:

  • Uniform Weight: Everyone who contributed a minimum number of commits to the main branch is considered
  • Activity Weight: Everyone who contributed in the last X commits
  • Service Weight: Everyone who contributed to successful pull requests based on issues in the last X commits (not implemented yet #132)

More weights are under active development and will be added in the future.

The amount distributed to each contributor is calculated from an accumulation of these weights. It is sent via the cryptocurrency market API to the public email address of the git platform user profile. You can even activate to compensate contributors from your dependencies.

Implementation

LibreSelery ...

  1. is configured based on the selery.yml file and runs as a GitHub Action on your project.
  2. is triggered with every push on the main branch by the GitHub Action worflow file that is part of your project repository.
  3. gathers contributor information about the target project via the GitHub and Libraries.io API.
  4. filters out contributors with a hidden email address in the github profile and below the minimum contribution limit. LibreSelery will not send emails to the git commit email addresses in order to avoid spam.
  5. creates custom funding distribution weights based on the contribution rating of various projects: Minimum contribution, activity, ...
  6. adds the weights to the combined weight used for different distribution splitting behaviors.
  7. distributes the funding between the contributors based on the selected split behavior.
  8. pays out cryptocurrency to the selected contributors' email addresses via the Coinbase API. Contributors without a Coinbase account will receive an email to claim the donation.
  9. generates automatically a dotation and transaction visualization website in your GitHub wiki.

Features

  • Transparent payout of GitHub project contributors with every push you make to your main (master) branch.
  • Minimal changes to your GitHub project shown in the seleryexample to adapt LibreSelery with just a view steps.
  • Detailed transaction history is regenerated in your github wiki every time you run LibreSelery.
  • User defined payout configuration by the selery.yml.
  • Dependency scanning for most languages to even include developers of your dependencies using Libraries.io.
  • The money is distributed via Coinbase. Other payment methods like Uphold are currently work in progress.
  • Donators can see transparent payout logs in GitHub Action.
  • Self-hosted donation website for secure donations is automatically stored in the Wiki of your repository.
  • Simulate the money distribution for your repository without actually transferring money to see how the money would be distributed.
  • Automated statistic generation on how much money was paid out to which contributor.
  • Splitting Strategies:
    • full_split - All contributors receive a payout according to their weight.
    • random_split - X contributors are randomly picked using the weight as probability.

Getting Started

Since the project is in its early stages the amount of funding on your wallet should therefore be limited.

GitHub Actions Integration

Use the template seleryaction to integrate LibreSelery into any GitHub project. Starting with GitHub Actions integration is the easiest way for newcomers and people without Linux knowledge.

Command Line Usage

Running with Docker

  1. Install Docker:
cd ~
git clone https://github.com/protontypes/libreselery.git
cd libreselery
./build.sh
  1. Create a token file for your user, where you store API keys and secrets:
mkdir -p ~/.libreselery/secrets ~/.libreselery/results/public
touch ~/.libreselery/secrets/tokens.env
  1. LibreSelery just needs API tokens from GitHub when simulation = True and include_dependencies = False in your selery.yml. The scope of your github token should not include any additional permissions beyond the standard minimum scope. Find out more about how to create GitHub tokens here. Replace XXXXX with the Coinbase and Libraries.io tokens to get started without creating an actual accounts for these APIs.

  2. Make the token file read only:

chmod 400 ~/.libreselery/secrets/tokens.env
  1. Clone your target repository:
git clone <target_repository>
  1. Copy a selery.yml into your <target_repository>. Set simulation: False in your selery.yml to enable payouts with LibreSelery.
  2. Adjust and test different configurations in simulation mode on your repository project.
  3. Create a dedicated Coinbase account with limited amounts. Coinbase does not support sending emails to yourself. That's why you should use a dedicated email address when you are the owner of the Coinbase account and contributor of the project. Otherwise LibreSelery will skip these payouts.
  4. Buy some cryptocurrency. See the price list for transferring money into the Coinbase account.
  5. Configure the access control settings of the automated Coinbase wallet.
  6. Never transfer or store large values with automated cryptocurrency wallets. Use recurring automated buys to recharge you wallet on a regular base to avoid financial and security risks. Coinbase does not charge for transferring cryptocurrency from one Coinbase wallet to another.
  7. Add your coinbase API keys and secrets to the newly created file (~/.libreselery/tokens.env). Never store these tokens in a public repository .
COINBASE_TOKEN=<your_coinbase_token>
COINBASE_SECRET=<your_coinbase_secret>
GITHUB_TOKEN=<your_github_tokens>
LIBRARIES_API_KEY=<your_libaries_io_tokens>
  1. Send cryptocurrency to weighted random product contributors with a valid visible email address on GitHub:
env $(cat ~/.libreselery/secrets/tokens.env) ./run.sh <target_repository>

Run directly on your host machine

  1. Install the dependencies on your machine.
sudo apt update && sudo apt install git ruby ruby-dev curl python3-pip
pip3 install .
  1. Ensure that $HOME/.local/bin is in $PATH. Check the output of echo $PATH. If it does not contain .local/bin add the following line to your dotfile for example ~/.bashrc.
export PATH=$HOME/.local/bin:$PATH
  1. Run LibreSelery on your target project.
env $(cat ~/.libreselery/secrets/tokens.env) selery run -d ~/<target_repository> -r ~/.libreselery/results/

Roadmap

LibreSelery is gone support multiple APIs and assets in the near future like:

  • GitHub
  • Gitlab
  • Savannah
  • Libraries.io
  • Coinbase
  • Uphold

Support LibreSelery

Donations

Certainly we are funded by LibreSelery over direct donations via our donation website. The usage and development of LibreSelery will always be free and without any charges. If you want to support us by using LibreSelery you need to add us to the tooling_repos.yml.

Contributions

Those who have contributed to the master branch receive emails with cryptocurrency from Coinbase. Only git profiles with emails on the GitHub profile page will be considered. Find out more in the contribution guide or look into the good first issue labels to get into the project with some first simple tasks.

Contact and Feedback

For further information please contact us at team_at_protontypes.eu, join our Gitter chat or check out our wiki.

Artwork by Miriam Winter and undraw

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libreselery-0.0.1.dev74.tar.gz (25.2 kB view hashes)

Uploaded Source

Built Distribution

libreselery-0.0.1.dev74-py3-none-any.whl (36.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page