Alternative Currency Support

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
matslats's picture

Moved to official ideas list

The 'mint of the realm' is not the only store of wealth or medium of exchange. Community currencies facilitate trading all over the world.
Such currencies

  • are resilient against recesssion and collapse
  • do not favour the rich by charging interest
  • belong to communities, not to banks
  • prefer local goods and services over the globalised economy
  • are used for economic regeneration and international development

Not being a sexy or emotive subject, community currencies have attracted little interest from business or donors, and these communities need software to support their trading. Old, paper-based systems put off young people and do not scale well.

Working with the UK LETS coordinator, I built a prototype online trading / social network system which would support different kinds of trading mechanism. Here's the whole story. But Drupal is now the obvious platform because it has such a huge buy in. (and because it rocks!)

Here is a requirements document for a community trading facility, which includes wisdom from seasoned activists,(it's long, and could be more polished) and here is a plan for how to build it as a set of Drupal Modules, to plug into existing community web sites. We are currently investigating making an API for the java application, Cyclos, so that currency schemes can choose to outsource the actual banking functions and data.

Since I'm not a student, this project needs a student to champion it. I hope to be able to co-mentor the project, as I'm not good enough yet at Drupal to make the best decisions

Comments

Cross-posted to social networking group

webchick's picture

Hopefully they can help give you some feedback on the idea.

Userpoints

kbahey's picture

Userpoints can be used as a basis of arbitrary currency for web sites.

It has transactions, accounts (via term IDs) and debit/credit operations. What you use it for is totally up to you.

An upcoming feature will allow performing transactions remotely from other web sites and non-Drupal applications. This uses XML-RPC and can add/subtract points, or retrieve the current balance.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

I would strongly support this

chx's picture

This meshes nicely with everything we stand for -- freedom, openness, communities...

excellent idea!

Matt V.'s picture

I've been ruminating on just this idea since reading "Deep Economy" several months ago. I've done some research into the complimentary currency systems described in "The Future of Money" and other books. I don't have any actual personal experience with anything beyond plain barter though, so it's exciting to see your detailed plan.

In looking over your Currency Module Architecture plan, it looks like what would be needed most is an accounting module, probably using the API provided by the Userpoints module. Much of the other functionality you describe could probably be accomplished using CCK, Views, Organic Groups, Taxonomy, Location, and other modules. Later, an install profile could be used to tie all that together.

It looks like the deadline is approaching for getting a proposal posted. Can we boil down some more specifics of what would need to be included in an accounting module, to make this possible? I think the more concrete and concise the proposal, the more likely it is to catch a student's interest. Otherwise, this is an obscure enough topic that I can see it easily getting skipped by students more interested in APIs, RDF, and other more technical topics.

architecture

matslats's picture

Thanks Khalid for showing me userpoints. In my opinion, we need to build from scratch to make it more like money, and less like points. I was happy to explore two things in your module:

  1. three transaction statuses. complete, pending, denied.
  2. a running total, or cache, of user's balances

Regarding RPC-XML transactions between servers have you read Richard Kay's spec on exactly that subject?
http://copsewood.net/mrs/mrsspec.html
Such a facility detracts from the localness of a currency, and makes zero-balance accounting a whole lot more complicated. We need a whole range of currency models because we don't know what the future holds.

Matt V. Thanks for your comments. I hope you're right that much of the heavy lifting could be done by making a recipie. In terms of boiling down, see phase 1 of my proposal. We could offer something usable with a transaction API and some analytical, or accounting functions, and the offers / wants will be simple. Then if there's more time the roadmap is clear.
I'll write a list of functions for the transaction and accounting API - check my progress here.

expand on that?

greggles's picture

Can you expand on how it would be "more like money"? I'm using userpoints as a banking system for a module I've built and it works fine in my opinion.

If there are a specific set of features missing from userpoints it would be great to see a proposal to add those features.

Regarding the xmlrpc feature, you can always turn it off ;)

--
Open Prediction Markets | Drupal Dashboard

more like money than userpoints

matslats's picture

Greggles, that's an excellent and important question. Of course userpoints could be extended, but my impression is that it's purpose is actually different. Anyway, here are the ways in which userpoints would need to be extended.

-Transactions should be initiated by either party
-There should be room for several currencies on the system
-There should be a description and rating and a category for every transaction
-There would need to be a many to many relationship between users and trading accounts.
-It would need to be ready to work with filters
-It would need to be expandable to cope with dependent transactions

In short, the module would need so much expansion that it would turn into something else. (I say all of this but I've only read the userpoints code, not seen it in action.) My approach would be to keep userpoints userfriendly and fun, while community currencies would be more complex and extendable. The idea is to build something which can be configured to serve communities trading with many kinds of currency.

Question, why does the userpoints transaction function require only one user id?

API not application

kbahey's picture

Userpoints is mainly an API, not an application, so most of what you said is doable. It is so abstract that you can use it for virtually anything.

"-Transactions should be initiated by either party"

Your module decides who gets points and how many and for what action.

All you need is this:

    $params = array (
      'uid' => 20,
      'points' => 5,
    );
    userpoints_userpointsapi($params);

You just gave 5 points (kudos, bananas, ...etc.) to user 20.

"-There should be room for several currencies on the system"

Categories can be currencies. Just pass in 'tid' => $tid in the example above and the points will go to that category. You can call your categories anything, be it currencies, or accounts. It is totally arbitrary.

"-There should be a description and rating and a category for every transaction"

There is a 'description' => t('Some description') that can be passed per transaction too. For category, see above. Not sure what a rating is here.

"-There would need to be a many to many relationship between users and trading accounts."

Each user can have many categories and each category can have many users, so it is an M to M relationship.

"-It would need to be ready to work with filters"

Not sure what filters here are, but you can access the transaction file and filter it anyway you like.

"-It would need to be expandable to cope with dependent transactions"

Not sure what that is either.

Check the 3.x API for more details. Scroll down the section called "API".

The XML RPC uses Drupal's Services module already, so it is disabled unless you have that module installed, and you have a key from it.

If you think the API needs some other calls, then I will consider patches for it, as long as they are generic and useful to others.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

currency API

matslats's picture

hanks Khalid for explaining userpoints in more detail. I understand now how it works as an API.

A few people on the alternative currency scene have done a lot of work thinking through the problem of modelling currencies in software systems. John Waters, above is stressing the need to create libraries of functions and APIs independent of Drupal. LETSlink UK is just launching my system despite it's not having any support for groups. The guy who originally wrote the spec for LETS, is now working on a handheld digital payment system. Here is another advanced wealth-acknowledgment information system architecture with insights to offer. My aim is to serve them and the communities already trading, and to leave the door open for future experiments with currency systems by providing something flexible.

I am working on an API to help discussions with those people, then I hope we shall talk about the role of userpoints in this project.

In answer to your questions:

  • userpoints seems to assume that the logged in person is initiating a payment to the designated person. We need transactions to be initiated by the payer or the payee, and to be confirmed by the other party, or not. That is what I have called a transaction type. Many of the systems we are talking (especially LETS) are zero balance systems. That means points always have to come out of one account and into another.
  • When I said multiple currencies, I mean potentially interchangeable currencies. While some like to stress the localness of currencies, others are bothered that they can't be exchanged for other local currencies. The system I wrote already has everything valued nominally in minutes, and then a flag to indicate whether the currency is interchangable with other currencies. So systems can be designed with these options, and with minute values, trade can even happen outside the system using Richard Kay's API.
  • You say categories can be currencies. I was thinking along the lines of signing up to 'currency groups', and using tags to categorise trades and offers. This needs more thought.
  • Many-to-many: I think you misuderstand. Some users need to have many trading accounts, such as one for work and one for pleasure, while some accounts need to have many owners, such as for business.
  • Filters a way, later on, of making large trading communities more managable, by filtering out users from views. This means the active user can operate in a virtual, adhoc community of people filtered on basis of, say, geography, what currency they use, or what areas they trade in.
  • A dependent transaction would be a tithe, tax, or per-transaction fee. Every transaction would check to see which dependent transaction mechanisms it fires. Then the dependent transactions would hang off the main transaction and complete with it. This is not for this summer though.

Note: I should add to the spec that the system should be able to trigger payments!

Finally, Khalid, would you be interested in mentoring this project? I could handle the politics with the LETS community, to get the work recognised and relevent, but enthusiasm and experience such as yours would also be essential.

It is simple yet powerful

kbahey's picture

Userpoints is very simple, yet very powerful.

  • Again you misunderstood. Userpoints does not assume the logged in user initiates a transaction. It is totally up to the modules to define who gets what (not the why, who and what).

  • The concept of "currency" and "accounts" is not hard coded in userpoints. It is totally agnostic to such concepts, and you (the module developer) define what "categories" (term ids actually) mean in your problem realm. They can mean currency, they can mean accounts, they can mean ranking/level, or anything you wish.

  • Many to many is already there with some term ids used as accounts. One account can be business the other can be personal.

  • Dependent transactions can be done via the userpoints hook system, using the "points before" or "points after" (probably the latter), and you can fire transactions that take a percentage of the previous transaction and route it to somebody else as a tax. The hook system, and/or the integration with workflow-ng (already in 5.x-3.x) can do miracles.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

It is simple yet powerful

matslats's picture

This is sounding much more appropriate
Thanks

Complementary Currency support - a few comments

juanaguas's picture

Thanks for doing this Matthew. I've been hoping for a long time that someone would bit the bullet and initiate a Drupal project along these lines. I'd hoped to be able to find the time to put together a specification over a year ago, but I've been kept busy on too many other projects.

I'm currently working on an incipent complementary (multi-)currency project, but have ended up embedding Cyclos within an iFrame in an otherwise Drupal-based. This is certainly not an ideal solution, but having compared a variety of options it seems to be the best open to me at this time.

LocalExchange may also be embedded in this way.

I believe it would be very useful to develop a Drupal-centred CC framework in which the accounting functions can be met be at least 3 means:
(a) embedded Cyclos+SSH (with interfacing back-end modules) where stronger security is an issue;
(b) embedded LocalExchange (with interfacing back-end modules) - which mght be particularly good for timebank systems; and
(c) a more tightly integrated Drupal-only system.

Both Cyclos and LocalExchange are already well developed and their embedment with Drupal might allow attention to be focused on those areas where they are lacking, i.e. social networking and multi-route resource-to-need matching; systemic indicators (in particular for the mapping of social capital); etc.

In particular, Cyclos may be of particular value where security is an issue. In fact it was rewritten in Java (the first version having been PHP) for security reasons, and its objectives seem to go far beyond the LETS/TimeBank requirements. Furthermore it already has interfaces to card payment systems, phone payment systems and (potentially) Ripple. The fact that it's written in Java and relies on Tomcat is also a drawback since that makes hosting more of a challenge.

LocalExchange is is PHP-based, clean and easily customized, but is essentially a single-currency system. Like Cyclos, however, it's released under the GPL and could probably be extended without too much difficulty to provide multi-currency support. Since it's PHP-based it might also be adaptable for tighter integration into Drupal.

Of course, the more tightly something is integrated with Drupal's existing (or incipient) modules the more use can be made of its features, but there's no reason to restrict it unnecessarily. By taking as modular an approach as possible we should be able to produce a very flexible and powerful framework to meet a great diversity of CC needs.

I believe there's particular benefit to be gained from building in visual indicators to show how well a particular CC is serving its community (such as Lorenz diagrams to indicate the distribution of trading or accumulated credits), connectivity matrices or the interesting spiral map used by Geoff Chesshire in his "Regenerosity" software to display the growth of social capital).

(I was pleased to see a few of my words comments extant in the "requirements" page. ;-)

John :)

Cyclos and card payment systems?

sharonmiranda's picture

Hi.
I have been reviewing cyclos and haven't been able to determin that they are interfacing with any outside payment system. Can you give me any info about that? I have some pretty intricate need for a multi-currency option system. Am about to install joomla, but maybe there's a smarter track. I'm interested in giving feedback on system features since I'm in midst of determining the need for my system.

sharon

Please comment on application

matslats's picture

A team has been assembled, an ideal student identified, and we've worked intensively to draft this application over the last few days. We'd love to hear any comments from other Drupalers, as we continue polishing.

http://docs.google.com/Doc?id=ddm6qs69_0qj7hx9f6

To conclude the discussion above, user points hasn't been proposed. Instead we plan to build an API to an open source java banking system, Cyclos, and let the admin decide whether to outsource transactions to a 3rd party java server, or to use a new transaction module, based on the new API.

powerful

benovic's picture

I cant really comment on the discussion state, but I consider the whole Idea very powerful. Not the software-part is the interesting thing for me. Its the power of the Idea, globally speaking. I will sure as ... follow this discussion!

ps: If chx doesn't even question a bit of it, consider it a rock solid idea :)

Subscribing to interesting project

lejon's picture

Sounds interesting to me - maybe there's also some lessons learned from flat-swapping sites where you can lend out your capital (your flat) to someone in return for borrowing theirs.

Anyway, will be interested to see where this goes. Good luck, Matthew!

One nice question:

alternative's picture

Reading this news, where is the difference between legal and non legal, official and non official currencies?
Thanks for your answers, this is my opinion:

One of the capitalism rules is competition.
Everything is just fine while number of the real competitors is 0-zero.
Legal (and not only) spectacle is guaranteed, soon or later...
Best regards,
Duric Aljosa

Crom Alternative Money - The First World Peace

Crom Alternative Money - The First World Peace

One nice question

matslats's picture

Zdravo Aljosa!
Imao zenu se zovi Djuric iz Nisu.

This isn't really the place for such philosophical discussions. Are you a member of http://openmoney.ning.com ?
or
http://copsewood.net/mailman/listinfo/mrsdev

Looking at your web site though, I see you have worked extremely hard on it, and you have a lot of experience; my guess is that you are working alone. Are you interested in supporting this project?

Collaboration

alternative's picture

Hi matslats,
in the next few days, we are going to build a new system from zero, as simple as possible:
http://forum.cromalternativemoney.org/viewtopic.php?t=256
If you want, there is a place inside for your system-group-currency-experiments.

Try to google the most important words for every country in the world :
platni sistem, vijesti, sistema di pagamento, notizie alternative, alternative payment system, payment system, alternative news and search for our position.

We are working on global currency for a better world, so some functions in our system are not welcome because of political reasons:
you can see one of them here, in my comment: http://www.rgemonitor.com/blog/economonitor/252488/
This is a very difficult objective.
Our full name is the first world peace.
This means full cooperation and collaboration:
i can give you many ideas which you can build in your system (without any restriction) and become very competitive.
Together, we are stonger.
Let me know,
best regards,
Duric Aljosa

Crom Alternative Money - The First World Peace

mayb123's picture

Hi!

I run an offline woman's social club (for mothers) and we have a complimentary-currency-like system. We have several instruments. Hours which we keep track of on a register. Coupons which are paper. Points (for various group activities) and credits. Each are exchangeable one into the next and back. Essentially, it does all = 0. There are no profits involved. It's presently very basic such as trading babysitting time so we can all finish college.

Anyway, recently I've been interested in seeing if I can put together a website for us to help with some of the administrative burden. I've been dabbling with Drupal Commons (not live) and it seems to be promising. I learned about the mutual_credit module but have some issues with it.

I see this thread is from 2008. Has there been any progress since then? It appears there are mods here and there but nothing works that I have tried. So we still have no website. And I'm something of a n00b so I am learning. I'm not a master of php by a longshot. So it's a learning curve.

Where can I go to keep up on any progress?

live project

matslats's picture

Mayb
If you have issues with the mutual_credit module then please report them. All user experience is useful to me, the developer and your problems should not be show-stoppers. Please note that version 2 is recently out. Version 2.1 is imminent.
Matthew

Cool!

mayb123's picture

I did post on the module's bug report. Otherwise, I didn't want to bother you because you looked busy. I signed up for community forge to see how it works but my account wasn't activated yet. I will send you a gmail.