20130113230106-cps_graphic_for_kickstarter

Cascading Payment System

Get paid for your open source contributions.

Cascading Payment System

The CPS system is a way to make money off of OSS and Free Software.

It works as follows. If project A is included in project B, and
project B makes money, then project A would also make some money.

The money is delivered through the CPS automated payment system
and only through that system. If project B makes some money not
through CPS delivery method, B is not liable to deliver a portion of it to A. This means that CPS, when activated, will only add money to all the projects involved.

CPS works equally well with software libraries, patches, or even help code on sites software forums like StackOverflow.

CPS Providers

This spec enables many companies to implement CPS. A company that implements
CPS is called a CPS Provider. Two different CPS systems are not compatible
unless the two providers have internal agreements. The CPS Provider will
define all the different payment options, as well as a fee if any that it
takes.


Example 1: Video Player and a Codec.

Suppose you are making a video player, and need to use a codec
library. The codec library is released under GPLv3 license (free
speech), at this CPS price (the beer is not free):

- use: $1 USD,
- cascade: .01,
- enforcement: strict
- id: codec-abc123
- provider: http://www.some-cps-provider.com

This means that it costs $1 to begin using the library in your project, and
if your project makes any money through the CPS system, then you must give
0.01 fraction of it to the codec library.


In order for you to use this codec, you must:

1. Visit CPS Provider's home page www.some-cps-provider.com and create an account with money in it.
2. Add at least $1 to the new account.
3. Download and install CPS toolset from Provider http://www.some-cps-provider.com for your development box.
4. Start using the codec library in your video player code.
5. Run the CPS toolset to inspect your code. If it identifies that you are using the library, skip next step.
6. Add somewhere in your code a comment:

// LICENSE CPS: http://www.some-cps-provider.com/cps/codec-abc123

7. Run the CPS toolset with pay command. Then $1 will be transferred to the codec.

Suppose your Video Player is complete and you release
the player with the GPLv3 license and the following CPS provision:

- use: $1 USD,
- cascade: .01,
- enforcement: none
- id: player-xyz456
- provider: http://www.some-cps-provider.com

Note "enforcement: none" this time. This means that the consumer
of your video player is not forced to pay for the video player.
Also, note that your software is registered with the CPS provider
under id "player-xyz456".

Now, I download and install your video player, and I happen to
be a developer who had been already introduced to this same CPS
Provider, and have its toolset installed. Then next time I will
run the toolset I will get a notification, something like this:

"Would you like to pay $1 for player-xyz456? This is optional, but would be nice for the developer."

I decide to go for it, and a $1 from my CPS account is transferred
to your CPS account. Now, because the Codec library has "cascade: 0.01",
a 0.01 fraction of the $1 that you received is transferred
to the Codec library CPS account. So in the end, the balance is:

I:
spent $1
You:
spent $1 got $1 spent 0.01 = spent $0.01
Codec library developer:
got $1 and then got another $0.01


Example 2: Website and jQuery

Suppose jQuery library author John Resig decides to get on board
with CPS, using some CPS Provider. He releases jQuery under MIT
license, with the following conditions:

- use: .05 USD,
- cascade: .01,
- enforcement: strict
- id: jquery-v1.8.3
- provider: http://www.some-cps-provider.com

You would like use to jQuery on your website. You open CPS account
with the provider, and add at least $0.05 to it. Then you run the
CPS toolset and 5 cents is transferred to John Resig's CPS account.

Once your website is ready and live, you register it with CPS Provider with
the following provision:

- use: .05 USD,
- cascade: .01,
- enforcement: none
- id: website-xyz123
- provider: http://www.some-cps-provider.com

I happen to be a developer who really likes CPS, and also uses the same CPS
provider. At the footer of your website I see that you have the CPS Provider logo.
I click the logo and arrive at the CPS provider site (or get a popup) where I
am asked to send $0.05 to you, the maker of the website. I agree and you
get the nickel.

Now, suppose your site is actually providing auseful service consumable by
API. For example, you provide a document format conversion service that can be used
through a series of REST HTTP requests. I decided to use your webservices API
for my own website, which I also registered with CPS, with this provision:

- use: .05 USD,
- cascade: .01,
- enforcement: none
- id: website-xyz123
- provider: http://www.some-cps-provider.com

Since your CPS setting is "cascade: 0.01", if I would receive money through
the CPS for my website, you will get 0.01 fraction of that.

Using CPS with patches

CPS is great not only for complete software packages or websites, but most importantly, for software patches! Simply register your patch with a CPS Provider, and add the following comment somewhere to the code in your patch:

// license cps: http://www.some-cps-provider.com/cps/package-xy... /DO NOT REMOVE/

When the patch is merged, this line will be merged as well. When software package that integrated the patch receives money, you get the cascaded portion of that. 

Example patch:

-------8<----------

diff --git a/lib/contacts/hotmail.rb b/lib/contacts/hotmail.rb
index 6825bc3..5be8488 100644
--- a/lib/contacts/hotmail.rb
+++ b/lib/contacts/hotmail.rb
@@ -61,7 +62,8 @@ class Contacts
if @contacts.nil? && connected?
url = URI.parse(contact_list_url)
data, resp, cookies, forward = get(get_contact_list_url, @cookies )
-
+ # license cps: http://www.some-cps-provider.com/cps/john-doe-123 /DO NOT REMOVE/
+ data = Iconv.iconv("utf-8","utf-16",data).join
+
@contacts = CSV.parse(data)[1..-1].map{|x| x[46]}.compact.map{|e| [e,e]}
else
@contacts || []

-------->8--------------

When the patch is integrated, the license line can be moved elsewhere in the big project.


Enforcing CPS usage

When you release your software or patch with enforcement level
set to "strict", you may want to make sure that the consumer of
your software is going to set the CPS toolset of your provider
and will actually pay you. To do this, you may encrypt a portion
of your patch, and submit a few encrypted lines.

To continue above patch example: put this in your patch:

+ # license-encrypt cps: http://www.some-cps-provider.com/cps/john-doe-123 /DO NOT REMOVE/
+ data = Iconv.iconv("utf-8","utf-16",data).join
+ # license-end

Before submitting your patch, run the CPS toolset on your source code, and get something like this:

+ # license-decrypt cps: http://www.some-cps-provider.com/cps/john-doe-123 /VISIT URL TO DECRYPT/
+ qngn = Vpbai.vpbai("hgs-8","hgs-16",qngn).wbva
+ # license-end

Here the encryption is nothing more that rot-13, but you get the idea. To use this patch, whoever is merging it will need to decrypt it first by installing the CPS Provider toolset, setting up his account etc.

The encryption and decryption can be automated with git hooks. When you checkout the code it is automatically decrypted, when you check in the marked block of code is encrypted.


The CPS toolset

The CPS provider toolset should not be a standalone package, but a plugin into a generic CPS toolset, maintained by the development community. It would allow to create comfortable and seamless integration with different development environments, operating systems and browsers. 

For example, consider a Ruby programming environment and suppose
you are building a Ruby-on-Rails website with Bundle. The CPS can
be shippesd as a gem, providing its operation as rake tasks. These
will be automatically executed when new libraries are added to
Gemlist file and "bundle install" is executed. If any of those
libraries have CPS provision, they will be automatically payed
for first "use", and will be registered as dependancies for this
software with the provider. If your ruby software will ever receive
money through CPS, then all the dependant libraries will receive money as
well through the cascade.

 

Is there legal enforcement of payment?

Although this would be good, CPS will not be able to make such
enforcement practically. If the toolset is not installed because
of lack of awareness or on purpose, no legal action is taken since
it would be impossible to track it, or differentiate between the two.

The overall CPS system is voluntary according to the following analogy.
Today anyone can download music on Bittorrent for free, yet people buy music
on iTunes. If you download a song on Bittorrent, no legal action will be
taken against you.

A developer at a company may get a prompt "please install and
configure CPS to use this gem". He will escalate this to his
supervisor, and there's a good chance that the supervisor will
say "yes". Or the prompt can say "you will need to setup CPS
within 30 days". Many developers don't know if the library is
what they need, until they integrated it and tried it.

However, if the programmer will monkey-patch to short-circuit the CPS toolset,
he won't end up in court.

Companies however are used to pay for software, and because CPS
is designed to bring large amounts through micro-payments, the
amount for an individual company will be comparable to a taxi expense.
Companies also do not want to deal with mods, but prefer
to work with standard packages. Unlike an individual developer, they won't
bother hacking a CPS toolset.

Implications for Bitcoin

A CPS provider may support many currencies, but Bitcoin is a great
choice for CPS. It has dual benefits for both CPS and the overall

Bitcoin community. For the latter, companies that use OSS code
will have to buy some bitcoin. Imagine the possibilities! The
more people use Bitcoin the stronger the currency is.

For CPS Provider Bitcoin offers a cost free way to transfer funds
and avoids the need to hold users money in centralized accounts.
It also allows offline operation as described later in this document.

Ethics of Charging for Software

As Richard Stallman, the number one person in Free Software
movement explained, the word "Free" is like in "Free Speech", not
"Free Beer". There is nothing wrong with releasing your code with
GPL license, but still charging money for it.

Here's some background. The Open Source (OSS) movement claims
that it is more practical to distribute software and provide its
source code. The Free Software movement (FSF) claims that it is
not only impractical, but also unethical to distributed software
without source code. Despite this difference in motivation, many
OSS projects are released with the GPL license that FSF developed.

The ethical implications of CPS is that if you're making money through
CPS then your dependencies must make money as well.

The FSF claim that distributing software closed source is unethical
has created a taboo in the OSS community against any change that
even remotely resembles the world of closed source commercial
applications. That is why majority of OSS work is free as in "Free Beer".

The taboo disappears when one understands the philosophy of the
claim that closed source is unethical. The claim is equivalent
to the statement that knowledge is a basic right. If this were
true, then you are obligated to tell everything you know to any
stranger, including your passwords. Actually, the confusion here
is between knowledge of invention and discovery. If a discoverer
of a law of nature announces his discovery, he can't expect others
not to capitalize on it. An inventor, however, can protect his
work because it is his creation. Consequently, a programmer can
choose to publish his work with open source code, but nevertheless
charge for its use.

Reference: http://aynrandlexicon.com/lexicon/patents_and_copyrights.html

 

The CPS Dependency Graph

Over the time, the CPS provider will be able to publish a network
graph in which the vertices represent pieces of software, and edges represent
dependency. Analysis of this graph will reveal popular software enabling
developers of good code to advertise themselves. For example, suppose there is
a certain one-line hack that John Doe programmer figured out, and published on
StackOverflow with a CPS provision comment. Over the time, his one-liner
(together with the CPS provision) makes to the awareness of hundreds of
dev teams around the world. Without the CPS, the knowledge about the origin of
the hack would be lost, and it would become common knowledge. However, thanks
to the CPS Dependency Graph, we would see that John Doe is an awesome programmer, with so many people using his code. In this case the CPS not only delivers money to John Doe, but also boosts his value in the job interviews.


Changing Cascade Value

Even if you change the cascade value, all the existing users of your code will
pay you at the old cascade value.


CPS Options

The CPS provider can have many more options in the provisions in addition to
the ones described already. Here are some examples:

The currency of payment

People can use different currencies, as supported by the CPS provider.
Examples are: dollars, euros, bitcoin, or simply points.

Levels of Enforcement

There can be many levels of enforcement, also separate for "use" and "cascade"
amounts.

Payment Amounts

In additional of fixed amount, and percentage, there can be a
setting based on rating, popularity, complexity or simply
line-count. Most of this can be figured out automatically by
the system. For example, the popularity of the package is just
the number of times it is a dependency in other projects. Rating
can be retrieved from hub sites collecting ratings and reviews.
Complexity can be estimated with data-theoretic algorithms.

Stock Option Model for Pricing

A CPS provider may issue stock options. The option gives its
owner a right to use a certain package as dependency at some
price point (use/cascade values). These options can be traded,
and the rules of economics will generate optimal evaluation and
price for free software.

Cross CPS Payments

Given two CPS Providers A and B which both accept USD payments, there are no
technical difficulties for delivering money to both A and B cascade systems.
For example, suppose the Linux kernel has dependency of two patches, one
done with CPS Provider A, and another through CPS Provider B. Suppose the
Linux kernel itself is on CPS Provider C. With the basic system, if Linux
Kernel receives payment through toolset C, cascade will not proceed to
the above patches. However, if provider C supportes A, and B, by default or
custom provision options, then money will be also delivered to the patches.

Legal and Tax Issues

A CPS Provider may or may not

- publish transactions,
- provide cumulative monthly or annual receipts to participants,
- have limitations on number of transactions per day, or total amount,
- verify identity of participants,
- publish dependency graph.

CPS Provider Fee

The provider can charge per cascade transaction, per membership,
or per account funding, or any other method. It can also add
itself as dependency and receive a cascade payment from all
payments.

Loop Detection

For a circular case of dependency is A -> B -> C -> ... -> A
whatever strategy is chosen, the system should not go an infilite
loop.

Programming Language Integration

Some CPS Providers know .NET dev environment, others know Ubuntu
or XCode. Their toolsets will have different strengths and are
applicable to different projects.

Earning Points for Participation

Being an active node in the Dependency Graph may earn you points.
These points can give different benefits. One example, is that
points are added to your account as money. Another example is
that points enable you to keep all your money and not deliver
cascade payments down the hierarchy.

Payment Methods

A CPS may use hosted account balances, PayPal or Bitcoin as delivery mechanisms.

Integration with Donation systems

Some providers will integrate with Paypal Donate and Flattr to deliver a
portion of your collected funds to the payment cascade.

Offline Operation

A CPS Provider can do all the transfering work on its servers, or it can
leave it to the user to do the payment transfers. For example, after all
computation, a toolset pay command can print a table of Bitcoin addresses or
PayPal addresses with amounts to transfer to each. It will be up to the user
to do the transfer. (Can be done by piping the list into a shell script and
invoking a custom delivery script for each line). Moreover, even the computation
of the amounts can be done offline, if the dependency graph is downloaded
and available to the toolset. An offline CPS would hold no tax
responsibilities since it does not itself transfer any payments.

Cascade Cut Off, Rescaling and Random Cascades


If a project has 101 dependant projects, each with cascade
setting of 0.01, we have a problem that the total is greater
than 100%. Even if there were only 99 dependent projects, it
is not logical for the main project to keep a mere 1% of
contributed money. (The idea of CPS is for the main project
to receive most of the money, with dependencies getting only
some of it.) To solve this, a cascade cut off is set at
a configurable level. For instance, if the cut off is set to
20%, then at most 20% of the contributed money will go to the
dependent projects. A CPS may implement different algorithms
to divide available cascade money into the dependencies. If
there are more dependencies that can be satisfied, then a random
set of dependencies can be chosen, or rescaling can occur so
that each dependencies will get less than what it was asking
for.

Git Integration

Instead of adding a CPS line to the source code, it will be possible
to read git author configuration to mark automatically patches with CPS
information.

Summary

A CPS is only a loose specification for a new concept in Free Software.
Best CPS implementation will take into account the development platform
which it targets. In any case, it will allow developers to make a passive
income from their Free Software contributions.

 

What exactly will be implemented

A version of CPS System will be implemented, and will be hosted under the website http://Propster.me, as yet another way to be a fan of free software. The exact details of how this implementation of CPS will be figured out as we go along, and will be heavily influenced by the feedback from the contributors. For example, what payment systems are supported (e.g. Bitcoin, PayPal etc.) ?  What operating systems are supported (i.e. is there a .deb package?). What programming environment are supported  (e.g. a Gem or Eclipse plugin?).  With what donation systems does the CPS integrate (e.g. Flattr) ?

One thing for sure, there will be a CPS system, one that works and will be useful to a large set of software developers. It will set an example, and more CPS systems will be developed to target other platforms.

 

Your Pledge

The money you pledge will make it possible to develop such system in a short time, and will allow you and other developers to enjoy the world in which you can make money for your OSS work.

Created By: