Home
We forward
100% of donations to
the projects.
Our projects
break free of
aid dependency.

Donation System

As of October 2014, this explanation is obsolete. Our projects are now typically going to be managed through Betterplace, so that we had to change our algorithms to conform to Betterplace’s simpler system.

Our donation system only knows one type of donation, the donation on individual needs. This ensures that you’ll always have the most fine-grained control over your donation. In addition to this per-need donation, however, our website allows you to donate per project and now even globally on all projects. To reconcile this, the broader donations need to be algorithmically broken down to the level of per-need donations. Depending on whether the donation is per project or global, we use different kinds of algorithms.

The Algorithms

If you make a donation for a specific need, the money is assigned to that need. If you donate more than the need requires, the remainder is added to your project donation.

The aim of the project-level algorithm is to get things done, as it were: Your project donation is assigned to the smallest need. If there is a remainder, it is assigned to the next larger need, and so on.

On the global level, however, we need to be as just as possible: Following the (paraphrased) mantra “From each according to their ability, to each according to their need,” the total amount of money a project requires determines its share in the global donation. This individual share is then allocated to each project, and the remainder, if any, held back for the next iteration. In the next iteration, each project’s share is recalculated, based on the projects that have not been fully funded in the previous iteration. This process is repeated until the global donation is exhausted, all projects are fully funded, or each project’s share in the donation is less than one cent.

As you can see, it is possible that a few cents may not be allocatable. There are a few more measures in place to allocate those cents, but it is possible that in some cases they remain unallocatable. They are marked accordingly in the summary you see on the confirmation page. We collect those cents and later allocate them all at once.

Example Code

In the interest of perfect transparency, I’ve written stand-alone versions of our global allocation algorithm in Python and—in case you can’t read non-functional languages—Haskell. Even though our website is written in Python, the exact implementation used in our backend is necessarily somewhat more complex; the principle, however, is the same. Enjoy.

The algorithm in Python

The algorithm in Haskell

Comments