Komunitin
SCF #26 Activation Award Payments $44,850 View in SCF

Komunitin provides a payments system and marketplace for existing local currency exchange communities.

Team

esteve

Technical Architecture Doc

https://docs.google.com/document/d/1SlqOTNei9Zo8hCTZldA8KpWtfEscu87JpEX9Va3GRCQ/edit

Project URL

https://komunitin.org

Code URL

https://github.com/komunitin/komunitin/

Video URL

https://youtu.be/YT369kfJTSQ

Pitch Deck URL

https://docs.google.com/presentation/d/1G__dXNnS_Ogkz9w5x9MNg9cbNE7OrIpmPrU3RN5mlXo/edit?usp=sharing

Progress on Previous (Awarded) Submissions

We received positive feedback on the project idea, user growth possibilities, deliverable specification and the team, but required more clarity on the project definition and technical architecture. We have significantly improved the application by:

  • Creating a repository with a proof of concept of the Stellar integration for this project.
  • Rewriting the entire submission and specifically the project information section and the technical architecture document, with more details and some diagrams. Now it clearly answers the questions in the feedback and many more.
  • Onboarding a senior team member, Warren Puckett, with wide experience in financial software and the blockchain field. Warren will be involved in all aspects of the project including development, project management, documentation and community outreach. Esteve and Warren have been working together for more than a year.
  • Creating a higher quality and focused deck and video.

Section

read

Product & Architecture

What is Komunitin?

Komunitin is an app featuring a local community currency wallet and a marketplace allowing these local communities to easily trade between themselves and other communities. It effectively facilitates trade between a decentralized set of local community currencies.

Community currencies, also referred to as local currencies or local exchange trade systems (LETS), are a tool for financial inclusion that allows for a transition to a fairer and more ecologically sustainable economy. They are issued and governed by mutual credit groups, cooperatives, time banks, local councils, etc. These groups define the currency rules and deploy local monetary policies, yet they need more features than just a payments system: providing a marketplace for buyers and sellers, publishing community news, facilitating communication between members, etc.

Blockchain technology has not yet penetrated this user base and most of these communities use classic centralized systems (CES, Cyclos, IntegralCES, TimeOverflow, MutualCredit). This is due to the individual communities lacking the resources to develop a product with these features*. For the most part, existing cryptocurrencies don’t have the required features and are generally not flexible enough or are very difficult to use and deploy.

*The LETS movement, on a whole, hasn't been able to keep up with technology. (Investopedia)

Komunitin aims to be the leading open source project for community currency exchanges by providing an engaging and decentralized, yet reliable application they can all use.

As part of this project and with the help of Stellar, Komunitin will be able to provide a critical feature that all current systems lack: the ability to reliably trade between different community currencies without the need for a global exchange or a common global asset. This will enable Komunitin to effectively scale any heterogeneous and autonomous community currencies across a locally-governed global payments system.

Komunitin is already up and running and is being successfully used by scores of local communities across Spain, Italy and Greece over the past 10 years. Recently, the project team began work to modernize and enhance the system by re-designing a new user interface, and now is the perfect time to upgrade the backend functionality as well.


The goal of this project is to replace the current payment system with a new web service with Stellar at its core: the Komunitin accounting service.

Community currency model incorporating Stellar

In order to model community currencies in the Stellar network, we need to define a concrete set of assets, accounts and trust-lines. In practical terms, each currency has an issuer account that issues its own asset, and an administrator account that distributes the asset. Each user within a community has their own account with the administrator account acting as an additional signer.

 

To facilitate trade between users of different currencies, each currency will have a special external account, which acts as a proxy to foreign currencies via bidirectional sell offers. The currency administrator may set trustlines with external accounts of the other communities, after determining that the foreign currency is indeed trustworthy. Once in place, end-users in a community can effectively trade with users from other communities, each using their own local currency.

> See the Proof of Concept Repository of the Stellar integration.

This repository creates the essential elements that allows this model to work within Stellar and generates a few test transactions on the Stellar testnet. The README file in the repo contains more granular details of the model.

Architectural features

The following are the main characteristics of the Komunitin accounting service with a focus on the architecture.

 
  • Full representation in Stellar: Each community currency issues its own Stellar asset. Each user has its own Stellar account and all transactions are reflected in the Stellar network.
  • Locally governed: Local currency administrators have full control over their user's accounts. There is no superstructure outside the local communities.
  • Sponsored: Both base reserves and transaction fees are fully sponsored by the platform.
  • Multi-tenanted: A single Komunitin server can hold multiple community currencies. A new community currency can be created by filling in and submitting a form. Data from different communities is isolated in its own database.
  • Federated: Several Komunitin servers can coexist, each one in charge of a different set of community currencies. Users can trade with other users on the same or different servers (provided there is a trust path between their currencies)
  • Custodial: Users and administrators don’t save their Stellar private keys. Their server is responsible for signing transactions on their behalf and users will need to trust it to do so. It would be a goal, in the future, to implement a non-custodial architecture.

Architecture

The Komuntin accounting service is the bridge between the Komuntin app and the Stellar network. It implements a JSON REST API for communication with the Komunitin app. It features payments and all other related operations: CRUD for currencies and accounts, local (same currency) and external (foreign currencies) payments. It is also responsible for implementing some features not directly provided by Stellar: payment requests, negative balances, recurring payments, the collecting of membership fees, sending notifications to users and persisting state not suitable to be stored on the Stellar ledger.

 

Once deployed, the Komunitin app will switch from using the current backend to the new Komuntin accounting service for all payment-related operations. Subsequently, the app and the backend features will co-evolve. The social features (offers, needs, news, profiles, etc) will still be provided by the current backend.

 

The service will be developed in TypeScript, using the Nitro web server toolkit, a PostgreSQL database server for data persistence via TypeORM, the JavaScript Stellar SDK for interaction with the Stellar network and the OAuth2 protocol for client authorization. The whole system will be deployed as a set of Docker containers using Github Actions with automatic tests.

 

Push messages to users will be sent via the notifications service, an additional micro-service written in Go, already developed and working, and using the Google Cloud Messaging service.

 

Security

All user’s private keys will be stored in a database and symmetrically encrypted using a different key per community. These community keys will also be stored in the database and further encrypted using a master key. This master key is provided to the service at deployment time, only in memory and not shared with other OS processes. Master and community keys will be rotated periodically by policy as well as on demand.

 

This is a simple but effective security approach for the case of community currencies, where the strongest security layer is given via interpersonal trust within these small communities. The fact that all transactions are recorded in Stellar makes it possible for the local currency administrator to verify and restore the balance of a compromised account or in case of human error.

The sponsoring account is the only one with positive XLM balance. This account will have a small balance but sufficient for day-to-day operations and will be regularly charged from a cold wallet.

 

The current architecture allows for switching to a non-custodial model in the future if required. For example, for any community currency that is ever convertible to fiat or cryptocurrency assets.

Federation

There can be multiple Komunitin servers. Each local community currency resides on a single server, but a single server can host multiple local currencies. The Komunitin team will maintain an instance at komunitin.org, but communities are encouraged to deploy additional instances if they have the resources.

 

The main federation feature is the availability to perform payments between users on different servers. For same-currency payments on the same server, the user can select or search the list of members. Account names, avatars and profiles are provided by another subsystem called the Komunitin social service that is out of scope for this project. This service is not available for external users yet, and hence the user will need to enter an account URI (either scanning a QR code or selecting the currency and account number) to identify the target account. The server will call this URI to get the user’s public key and perform the path payment through the Stellar network.


 

Project Categories

Project Type [If End-User Applications]

Section

read

Deliverables List

Concept

Hours

Engineers

D1 Stellar model: 

  • Model implementation on the Stellar test-net. 
  • Local and global payments.
  • Redefinition of stellar model, as required

50

Lead: Esteve

Support: Warren

D2 Local payments service implementation 

  • New currency
  • New account
  • Local transactions
  • Automatic testing
  • Key storage
  • Authorization

100

Lead: Esteve

Support: Warren

D3 More features for local payments

  • Payments/payment requests
  • Credit/debit limit schemes
  • Edit currency
  • Edit/delete account
  • Currency, transaction and additional account state
  • Post events to notifications service
  • Automatic testing

80

Lead: Esteve

Support: Warren

D4 Global payments

  • Stellar model
  • App interface for external payments
  • Automatic testing

60

Lead: Esteve

Support: Warren

D5 Data migration

  • Migration of current state of Komunitin accounts
  • Deployment to production in parallel with current system

60

Lead: Esteve

Support: Sergi, Warren

D6 Statistics

  • Define Statistics data endpoints
  • Implement currency statistics endpoints
  • Implement visualization pages in app

50

Lead: Esteve

Support: Warren

D7 Connection with clearingcentral.net

  • Implement the credit commons protocol for interaction with CES and mutual_credit networks.
  • Automatic testing

50

Lead: Esteve

Support: Warren

D8 Additional payment app workflows

  • App interface for bulk payments
  • Load CSV file for bulk payments
  • QR / NFC

60

Lead: Esteve

Support: Warren

D9 Currency administrator interface

  • Account limits
  • Trust-lines
  • Account activation
  • Notifications

80

Lead: Esteve

Support: Warren

D10 Complete replacement of legacy service

40

Lead: Esteve

Support: Warren

TOTAL

630h

Requested Budget in USD ($)

44850

Total Expected Roadmap

This project and its predecessor IntegralCES has been developed and supported by the community for more than 10 years. We have a concrete roadmap but we don't have concrete deadlines, as the speed of development depends on available funding or volunteer commitment.

Development roadmap

The team is doing an epic effort to convert our old centralized system to a modern, engaging, easy to use, secure and decentralized app. Komunitin aims to be the leading open source project for community currencies, thereby harnessing the development efforts of the broader community .

The four main stages of the development roadmap match the four components of the whole Komunitin system:

  1. Komunitin app
  2. Notifications service
  3. Accounting service
  4. Social service

Currently we have published and working versions of the Komunitin app and the Notifications service. This project will focus on point 3; developing the Komunitin accounting service.

Once point 3 has been implemented, we will need to upgrade the social service (offers, needs, profiles, locations, governance). This will be a project of a similar scale to this one and will enable a federated decentralized marketplace (with other social features) integrated with the Komunitin app.

Traction roadmap

In conjunction with the development roadmap, we also have a roadmap for growing the user base.

 
  1. Migrate all local currencies currently using IntegralCES. This will be done as part of the current project.
  2. Adopt new grass-root community currencies. By providing an open source, first class product delivering an almost-free service for grass-roots communities, we expect new communities (or existing communities seeking to deploy their own local currencies) to choose Komunitin.
  3. Migrate all time banks from TimeOverflow. This will be done after the current project and in collaboration with the ADBdT association. They have already expressed their need to migrate to a modern platform and to collaborate on software maintenance.
  4. Migrate community currencies from CES. Either by migrating them in bulk through an agreement with their maintainers or by providing an easy migration path so individual currencies can migrate when ready.
  5. Adopt new institutional local currencies. Local councils, trade unions and similar institutions are deploying local currencies. They may have extra regulatory or other requirements, but we expect Komunitin will be able to offer these custom development services in the mid term as an ongoing source of revenue for the project.
 

Beyond onboarding communities to Komunitin, we would also encourage community currencies to join the global trade scheme in the Stellar network. Other platforms can directly integrate Stellar and use the defined model for global community currency trade in order to allow users of both platforms to trade between them.

Section

read

Team bio

Esteve Badia, the project submitter and main developer: Esteve has 10+ years of experience in the software industry, mainly working in edtech and financial software. With academic background in both mathematics and computer engineering, he combines solid skills in the full technology stack for the web—handling algorithms, APIs, storage, DevOps, and user interfaces—with management and executive experience. Esteve has contributed to advancing online learning technologies for math and science (mathtype.com, wiris.com/wirisquizzes/) and developed open-source projects for community currency management (integralces.net, komunitin.org). He is teaching a cryptography and code theory course at Universitat Politècnica de Catalunya.

 

https://www.linkedin.com/in/esteve-badia-orive/

https://www.toptal.com/resume/esteve-badia-orive

Warren Puckett. Warren is a seasoned technologist with almost 30 years of experience working across a number of business sectors, including financial services, web3 and political activism. He was the technical founder of the one of the UK’s largest political action organizations with over 3 million members (https://38degrees.org.uk) and was the technology lead on a sovereign identity pilot project using smart contracts on the Ethereum network that was sponsored by a banking consortium including Barclays, HSBC and Northern Trust in 2015. He believes strongly that decentralized platforms are the way forward. Warren will be involved in all aspects of the project including project management, documentation and community outreach.

https://www.linkedin.com/in/peatfire/

 

Sergi Alonso, member of ADBdT (adbdt.org) Spain time banks association and maintainer of TimeOverflow (timeoverflow.org), used by 50+ time banks in Spain and Latin America that are interested in migrating their systems to Komunitin.

https://www.linkedin.com/in/sergialonsonicolas/

 

Finally, all local network administrators will also be important contributors to this project. We have a wide network of enthusiast users that will be very useful for getting feedback.

Existing, Significant and Active Userbase?

Yes!

Komunitin is an upgrade to a currently operational system that has been online for more than 10 years. It presently holds 40 different local groups across Spain, Italy and Greece with 6000+ registered users. Only a fraction of the them are active. Current users now use either the new (Komunitin) interface or the legacy (IntegralCES)  interface, both of which are connected to a common backend.

 

TimeOverflow is a time banking management app used by 50 local groups across Spain and Latin America, being maintained by the ADBdT. They expect to migrate their user base to Komunitin when it is ready.

 

Beyond that, Komunitin also aims to serve the CES user base. There is fertile ground for a direct collaboration with the current maintainers of CES so that the entire CES user base migrated to Komunitin since both systems share the same use case and their software has become obsolete and impossible to maintain. They have already shown interest based on recent conversations. The numbers within CES are substantially larger, with more than 1000 networks in over 100 countries.