Repository navigation
Federation Options for CES2: Inter-Exchange Transaction Architecture #919
Replies: 10 comments 4 replies
|
This is to clarify about Credit Commons Protocol and Clearing central. |
|
The most important difference between credit common and Kommunitin API is in what I call the strructures of credit that emerge. Credit commons leads to a tree, and Kommunitin to a mesh. |
|
Thanks @olivier108 for starting this exciting dicussion and @matslats for joining it! I'll try to summarize my experience with inter-exchange trading so far: Back in the 2010's decade in Catalunya we had a vibrant movement of exchange communities. We used CES and then IntegralCES, and used the similar inter-exchange trading features of both systems. First of all, let me say that inter-exchange trading proved to be a critical feature for escalating of local community exchange networks, allowing for bigger and richer transactions. It happened that one of the networks experimented with a kind of a basic income feature, monthly adding X to the balance of each member. The network quickly became flooded with all balances (but one) very positive and just a few offers, and people used the inter-exchange feature to spend their credit in other neighbour exchanges. Specifically and generally speaking, country-side exchanges were providing goods to this exchange in the city that could never equilibrate the trade balance. Some producers saw their accounts full of a balance that they could not spend because there were not sufficient attractive offers, and stopped accepting exchanging through the system. In my exhcange, we saw the issue before it was too late and we decided to stop allowing the inter-exchange trade just to protect our producers. After that, in 2016, we created the Espai de coordinació de monedes socials (Coordination Space for Social Currencies). This was a federation of 7 local exchange communities in Catalunya. This space was created (among others) to address this issue and we created a protocol for safe inter-exchange trading. We decided to set a debit and credit limit to each exchange to be 10% of their anual transaction volume. However this protocol didn't had automatic enforcement and in practice it did not work beyond making people aware of the issue. In fact we found that it was difficult to maintain this coordination space because people from the exchanges in the edges struggled to attend to meetings and we dissoluted the space a couple of years later. There is a different coordination platform for exchanges in País Valencià called XXIV, most of them using the CES platform. I think this was a prototypical use case for the Credit Commons protocol, but still we struggled to make it really work due to, in my opinion, several reasons:
After this experience, I think that actual federation (with meetings etc) among local communities is very difficult and totally impractical in some cases. Decentralized technologies allow for trading between entities without further coordination. Cryptocurrencies apply that at an individual level and I think this is not good because it pushes for more individualism and capitalist society. However I think that this technology suits perfectly when it comes to inter-exchange between communities. And among the different options here, my favorite one is what @matslats calls the credit mesh network. This idea was developed in Ripple (again at the individual level, in a centralized server), then in Ripple Labs (the well-known blockchain network) and also in the Stellar network (similarly to ripple labs). In this case, each exchange unilaterally defines trustlines with other neighbouring exchanges. In CES terms, the trustline sets the debit limit of a neighbouring exchange globally. This is, the trade imbalance between the two exchanges can't excess X units. That allows for trading between trusted communities, but also allows trading between distant currencies through a path of trustlines. So if A trusts B and B trusts C, then a user in C can buy from a user in A. The trade balance between A and B and between B and C is modified by this transaction. Another example: suppose A trusts B but B does not trust A (for example, A is a time bank and B is an euro-backed local currency). Then a user in B happens to buy from a user in A so the trade balance is positive in favor of the time bank A. Then A users can buy from B users until the trade balance goes to 0. As @matslats points out, trustlines can get full and therefore stop the trade. Then the administration of both exchanges should act to restore the trade balance (eg: send a trailor of oranges from B to A), or just increase the trust limit if thats fine. Some final points:
|
|
I commend you @estevebadia on your tackling the root question.
|
|
I think it is not really possible to evaluate which of the two schemes is better in general and from a theoretical point of view, and maybe there will come more people with more schemes, so we really need to see what happens in reality. I think that the mesh scheme is more practical and politically aligned, but your points make sense too. Thats why my approach now is just to somehow enable inter-exchange trading between exchanges in CES (and ideally other systems as well), with the focus more on the user experience than in the actual protocol behind the scenes. Then, see what happens and eventually see what new features are required in the protocol and evolve it organically. I think the Credit Commons protocol is a perfect candidate for that, since it has a good fitting from the architectural point of view (message-based server-to-server open protocol) and it has born in the right context (Collaborative Finance and Community Currencies movement), it is already somewhat well-know in that context and it is maintained by the right person (you ;)). I imagine setting up a default simple topology and then be open to evolution. We can setup one CC node per CES instance and a trunk one. From this starting point, we can evolve the tree, the policies implemented in the nodes, or the protocol itself based on actual requirements from communities. Probably we'll need more features on account discoverability, payment workflows, quoting a transaction, currency conversion rates etc before we really need to act on debit limits and policies. Also very important is to have a federation protocol for offers and needs and profiles beyond transactions, but thats a different topic. So I'm more inclined to work towards good UX for inter-exchange trading because I think this is the way it will actually be used. |
|
For your information, here is some CES inter-exchange activity data for the past 12 months: What we would wish to achieve :
|
|
@matslats I'd like to get clearer in my own mind about how federation between We have a demo instance of CES2 running the Komunitin code at
The goal isn't to settle the whole federation design here, just to get one real |
|
Hi, 1 Versions. Clearing central is rather fragile since at the moment the old API is implemented as a wrapper around credit commons. Also ces only supports one workflow, so ideally we would move towards retiring the clearing central v1 API then migrating to a clean clearing central instance. Also note that credit commons addresses take the form of a path name, and this doesn't map very well onto clearing central v1 CEN codes. |
|
ok there is a demo tree now working. the following will help Esteve get started. Each expects requests as defined in the API document. The first request a communitin node might make is to request a new account be created. Currently twig does not accept account creation requests from anonymous, but branch does. The request looks like this. I think that's all you asked for. I believe it's all working. |
|
@matslats, brilliant, thank you. Standing up the whole demo tree is above and beyond, |
Uh oh!
There was an error while loading. Please reload this page.
Context
CES serves 1,000+ exchange groups globally through a single clearing central. As we develop CES2, we need federation architecture that enables:
Current CES Stats (main server incl. Australia)
320 active groups, ~30,000 transactions annually, 4,700 active users
Limited development resources, staged implementation needed
Federation Options
Single server handles all inter-exchange transactions.
Pros: Simple, proven, minimal effort
Cons: Single point of failure, blocks decentralisation
Regional nodes in tree structure, transactions escalate only as needed.
Note: CES's Clearing Central was upgraded to a Credit Commons node, though CES servers still connect via the original API.
Pros: Balanced decentralisation, proven DNS-like architecture, regional organization, already partially implemented in CES infrastructure
Cons: More complex than current system, requires regional coordination, legacy API integration needed
Already used in Komunitin. Users establish explicit trust relationships, payments route through multiple trust paths (up to 6 hops) with automatic path-finding.
Pros: Already implemented in partner system, proven at scale, fully decentralised, automatic optimisation
Cons: Blockchain overhead, may be complex for current traffic levels
Key Questions
Protocol Choice: Which approach best balances decentralisation with implementation complexity?
Phased Implementation: Should we complete the Credit Commons integration (updating CES servers to use Credit Commons API) or explore other federation approaches?
Stellar Integration: Should we leverage existing Komunitin implementation or develop new solution?
Timeline: Implement in Version 4 milestone or prioritise differently?
Migration: Best transition path from centralised approach?
Expert Input Needed
@matslats (Credit Commons Protocol) - hierarchical federation architecture
@michielbdejong (Federated Bookkeeping) - peer-to-peer credit networks for inter-system communication
Community currency developers - practical inter-system trading experience
CES community - inter-exchange functionality requirements
What factors should we prioritise in choosing our federation approach?
All reactions