freedomlayer/offset

Multi currencies proposal (orig: Exchange rates example)

Closed this issue · 16 comments

Hi there, I really like the idea of distributed ledger without proof of work. Really cool project.

I don't have much of a financial background, and I would like to better understand a scenario that would be common to me and a couple of my friends, if I was to present them the idea of the project.

If we setup a ledger between us, Alice, Bob and Charli, we would start with a 0 balance as documented. Alice provides Bob milk by 1 offst token in Brazil. Bob travels to meet Charli, which lives in Germany, and she also sells milk to him.

For how much should Charli charge for the milk? I thought of two scenarios, with some tradeoffs:

  • Have one ledger in each coin

I could setup a wallet between Alice and Bob, and another between Bob and Charli. But that means that I could never exchange money between both wallets, otherwhise I would be converting a less valuable token to a more valuable token. We would rely on social norms to avoid this, and that does not seem like a good idea.

  • Allow people to determine the amount when selling you currency by offst token

That looks like what bitcoin does, and could lead to a lot of volatibility on the token, and become a trading market on itself, if that is what I've understood.

  • Have a wallet based on a currency
    If each wallet had a token type, it would be possible to create one wallet per currency, and manage debt only between those currencies. So far, as I've learned about accounting, this seem to be what plaintext accounting does.

Introducing exchange rates between wallets seems complicated for the system tho, and seems enough to separate the ledgers and repay the person to clear your debts. Or you could buy some currency using one ledger if the other person is willing to accept as well, selling the "good" using the system.

I've been looking at the project for a very short time, but I've didn't see any comments regarding different currencies and exchange rates. Is this something to be considered by the project at some point?

Hi @bltavares, thanks for your interest in the Offst project, and for sending this question!
I thought about this question for a while myself. Like you, I don't have financial background, but let me share some of the ideas that led me to my current conclusions.

The short answer is that Offst currently does not support multiple currencies. It supports only a single type of credit.

Rephrasing the issue

To be sure I understand the issue, I will try to rephrase it. Consider this friendship configuration:
Alice -- Bob -- Charli

Alice thinks that an Offst credit is worth one bottle of milk (Because this is how things work in Brazil), but Charli thinks that an Offst credit is worth two bottles of milk (Because this is how it works in Germany). If Alice and Charli ever meet, a strange conflict of expectations could happen.

One idea you thought of for solving this issue is having multiple types of credits supported by Offst. For example, Alice and Bob could work with the Brazil offst credit, and Bob and Charli could work with Germany Offst credit. Whenever Alice wants to buy something from Charli, the payment will go through some automatic exchange at Bob's node.

Technical solution

I am pretty sure this is something we can code. In fact, I believe that @spolu (Stanislas) did something similar on the settle project (Allowing multiple currencies and exchange rates between currencies).
Whether we should implement this is a different question, I try to answer it in the next section.

Financial considerations

I believe the issue mentioned here is something that is present in every day life, even with the usual fiat currencies.

I remember one day I went to climb a very big rock in Colombia. I don't remember its name, but it is probably a very famous rock. On the bottom of the rock there were people selling water bottles. I wasn't thirsty at the bottom, so I didn't buy any bottle. After a few hours of climbing I reached the top, and surprisingly, at the top there were also a few people selling water bottles. However, the bottles at the top of the rock were almost three times more expensive than the water bottles at the bottom.

I was furious when they mentioned the price of the water bottles, but then when I thought about it I realized that the price is right. The water are the same, but the situation has changed.

I think that having a one coin for the top of the rock, and another coin for the ground level is not a good solution. It's not that the value of the coin has changed by a multiplication by a constant. The way I see it, water is more rare on the top of the hill, so I need more money to buy it.

Another example: In my country Oranges are very cheap, but in Japan they are very expensive. However, in Japan fresh Tuna fish is cheaper than in my country. Therefore, I think that there is no real multiplicative factor we can apply to balance the prices of Oranges and fresh Tuna fish between the two countries.

About solving volatility

and could lead to a lot of volatility on the token

One thing I definitely agree with you here is that volatility of Offst credits can be an issue. I'm not fully sure how to solve it yet, but I have an idea.

I think that the first public node we will set up for Offst will also have a reserve of money (For example, in USD dollars), and it will promise that N Offst credits can always be exchanged for 1 USD. In reality Offst credit can be worth more, but it should always be possible to redeem N Offst credits for 1 USD in this exchange.

Other Offst nodes might also have reserves, and could possibly set up different exchange rate, maybe using a different local fiat currency.

I am still not sure about this one. Any ideas on this are very welcome.

EDIT:
@SonOfLilit: What do you think about this?

I would like to add, that creating interactions in two different currencies, would require more than two wallets: it would require two parallel networks.

The main idea of Offst, as I understand it, is that it lets you transfer funds between people who don't know each other, not just to keep a ledger between people who do. For this end, you can transfer credits in various routes, which are computed for you and which (usually) don't interest you very much.

If you (Bob) had two wallets belonging to the same network, one with a ledger only with Alice, in currency A (so one credit = 1A$), and another with Charlie in currency C (so one credit = 1C$), and 1A$ = 2C$, you could do something quite strange: you could give Charlie 1C$, so he would give you a credit in your wallet with him. Then you could transfer this credit via Offst to your other wallet. Then you could give this credit to Alice in exchange for 1A$, which you could then change in your local Money Change to 2C$! You just made a profit of 1C$. This means, that the price of one credit has to be more-or-less uniform across the network.

Of course, nothing is stopping us from running several separate Offst networks in parallel. But then the question arises, why would the price of a credit in one differ from the price in another?

Indeed, I think there are two main approaches:

Either you consider Offst tokens to record debt denominated in an existing currency (e.g. USD, or even BTC), and then the milk bottle problem has been more or less solved for the last few centuries at least, or you consider Offst tokens to record debt denominated in a new currency (lets call it FST) that could change in value relative to e.g. USD or BTC or whatever currency your users usually deal in.

Since it's possible and a lot more comfortable, I don't see any reason not to choose the first solution, except maybe greed (invented worthless coins have been seeing a lot of growth lately, maybe it's worth investing in them).

Since Offst is a ledger for recording debt, 1 FST != 1 USD even if you choose to denominate the debt in USD. There is still some credit risk involved and people may choose to only buy or sell FST at a different rate of exchange reflecting that credit risk. Actually, 1 FST = 1 FST is not even guaranteed - being owed 1 dollar by the Bank of America may be worth more than being owed 1 dollar by me. But that's fine, because in the world we imagine with bank-like nodes only they will have to figure all this out, and most users will be able to just use the system to transfer USD to each other, which is what they want.

Now, if we denominate debt in USD, why not also allow users to record debt to each other in units of BTC or EUR or RUB or AAPL stock or SPY units (a popular S&P500 ETF) or FCOJ-A Futures (payable in physical containers full of frozen orange juice)? Sure, why not. Technically it's very easy. It's a separate network per denomination, for every intent and purpose (except that identities are shared and infrastructure is shared). Of course we shouldn't include an intrinsic system for translating between denominations, this will be a huge security breach because their relative values change by the microsecond presenting crazy arbitrage opportunities, but don't worry - there will pop up nodes happy to buy your EUR debt for BTC debt or vice versa (and take a small spread).

I'm not sure enough nodes will agree to trade in FCOJ-A futures to create a network capable of transferring them from one side of the world to the other, but that's ok - users who choose to transfer less common currencies will understand the limitations, and most users will choose to work in USD or maybe maybe BTC which will have big networks.

If all you're doing is recording debt that people owe each other, I say let them record it in liters of gasoline or pizza slices or slaps of the face for all you care. It won't do any damage to your main USD debt recording system, and it will make it more useful when society collapses and we all go back to transacting in pure gold (but still through the internet).

(To be clear, the centuries old solution is to go to the supermarket and see how much a milk carton costs in the local currency, and then go to a currency trader and see how much the local currency costs in a popular currency like gold or USD, and multiply)

And @realcr, I strongly advise you not to start the first Offst based bank node (any node that agrees to trade strangers their Offst for real dollars is a bank node) if you know nothing about banking. Let other people with more relevant skills take that risk. As long as you use it only within one group of friends, you don't need bank nodes for it to be useful.

I agree with everything that @SonOfLilit said - except for "this world we imagine with bank-like nodes". Having bank-like nodes is not only not required for Offst to function, it's also deterimental to its distributed nature. With enough users and "six degrees of separation", you should be able to transfer credits just fine without bank nodes as a back-bone. As a corollary, for converting fiat to credits, you don't need a bank, any cornershop can do that for you (at least technically and financially; regulatorily is another issue).

@amosonn and @SonOfLilit : I'm glad that I asked (:
These are the important points I get from the conversation:

  1. What value does one Offst credit claims to represent? Some options:
    1.a No specific value
    1.b Claim that it is one US dollar or another currency.
    1.c Have multiple types of Offst credits with different values?

  2. How decentralized is the network, having a gradient of options:
    2.a Fully decentralized: Only private nodes, (exchange at the cornershop?)
    2.b Federated: Having public nodes with solid infrastructure that possibly provide exchange services.

(1) The value of one Offst credit

(1) The issue of the value of one Offst credit, originates from the issue @bltavares raised about price volatility. I have to admit I don't know a good solution for volatility issues, and I don't even know if these can be solved by choosing a specific option (1.a, 1.b, 1.c).

From a technical point of view, I see no difference between 1.a and 1.b. Option 1.c might require some kind of infrastructure change.

Leaving volatility and technical issues aside, I am highly in favor of option 1.a: Having no specific value stated for 1 Offst credit, for a few reasons:

  • If I claim that 1 Offst equals 1 USD I might get into trouble, just as If I began printing papers, claiming that they equal one USD.
  • Why pick one currency over another? For example, why USD and not EUR, or S&P500.
  • If I pick a currency run by a government, I lose some freedom. For example, the supply of USDs is (probably) supervised by the USA goverment. Part of the idea of having something like Offst is to avoid artificial changes to the currency.

(2) Level of decentralization

To keep the system decentralized and lock-in free, there is only one type of Offst node.
If someone decides to start a "bank" node, that only means he has an Offst node running on solid infrastructure, and he is willing to add strangers to his friends list, and possibly infrastructure for exchanging "real money" with Offst credits.

Therefore the way I see it the choice between a fully decentralized friend-to-friend network, and a federated network with bank nodes is a matter of branding and not a technical issue.

With enough users and "six degrees of separation", you should be able to transfer credits just fine without bank nodes as a back-bone

@amosonn : Initially I had your opinion about forcing the network to be fully decentralized, but these days I think that a fully decentralized network has some problems that I am not sure how to overcome:

  • Connectivity: If all my friends are using cell phones to run an Offst node, and they are all offline at the moment, does this mean I will not be able to pay?
  • Bandwidth of payment: Most people will be able to trust their friends up to some credit limit, but probably not so much. If I ever want to be able to make large payments, or keep large amounts of credits, I might need a larger organization to trust. The new design of Offst also allows multi-path payments, but I am not sure even this will be enough to pay large amounts of credits among friends.
  • Bootstrapping: I really like the cypherpunk idea of exchanging Offst at the corner store, however, I believe that it will only be possible if Offst is very commonly used. Until then, new users will be stuck without any means of exchanging their fiat currency with Offst. It's a chicken and egg problem. If there will be at least one node that also runs an exchange, this might allow to bootstrap the system.

Eventually, I won't have control about what people do with their Offst nodes. It can go the decentralized way, or be more federated, or possibly some middle ground.

I strongly advise you not to start the first Offst based bank node

I agree. If I ever do, I will surely let someone that knows what he is doing to lead the execution.

How are the credits actually created? Are they mined or staked, like cryptocurrencies are? Is there a cap per say? There is no 'one ledger', correct? We can all exist in our own 'worlds'?

It is very interesting!

Thanks a lot for the time put on thoughtful replies to the question everyone.

Now with the summarized discussion I think I can better understand what lead me into thinking about multiple currencies on the system, and the difference that was not clear.

Reading the documentation and the blog post, the first comparison I could do was that this was similar to Splitwise simplified expense sharing, where you can track expenses and clear of debits on whatever/as many currencies you want.

Splitwise has a similar concept where you start with 0 credits or debits, and you can become in debit with a friend and pay over later. This is very useful for group parties or shared households.

There is this implicit credit limit, where you will avoid to pay for things in real life if someone is too much in debit with you. And there is this simplified concept where you can contribute to a group expense and the debit is offset and simplified who has to pay who, with the fewest transactions.

The main difference that I now see, is that TransferWise is record-based system, and there is no 1 TransferWise Token on itself, while Offst design is token-based system.

Given that the closes example I had for a Mutual Credit system was a record-based one, that made me anchor to the idea that I could track what I owe to others, regardless of the token or unit used, while still clearing of the debit by others owing my friends of friends and so on.

@SonOfLilit has well summarized my first impression and expectation when it's said:

Either you consider Offst tokens to record debt denominated in an existing currency (e.g. USD, or even BTC),
If all you're doing is recording debt that people owe each other, I say let them record it in liters of gasoline or pizza slices or slaps of the face for all you care.

The benefit I see is that you can bootstrap tokens that already have liquidity, and bootstrap the network faster as people could use to track their debt on whatever currency they trust. A person could have many applications for different types of token, and that would even allow for a 1 FST token to exist in such system.

Picking 1.c does not seem to loose any freedom, and to me, it seems it would allow people to track debit on whatever they wish. I could have a small community exchanging bottle caps tracked by the ofsst network, acting as a community clearing house.

By anyway I meant to disturb the future of the project, and I'm sorry if it came out that way. I really liked the idea of being able to track debt between friends of friends, and say that I'm all ok, because I owe a friends that owes a friend that owes me. If not, it was an anchoring to a similar system I'm used to, without requiring me to convince a friend to trust a new type of token that only we've heard of.

I'll definitely will keep an eye on the project, and I would really like to see how a Distributed Mutual Credit system grows, not matter if it is token-based or record-based. Feel free to close the issue, as my main question has been answered as part of the discussion.

How are the credits actually created?

@GorbulasDev : The total amount of credits is always 0. The trick is that some people have negative amount of credits, and some have positive amount.
Credits in Offst are created by debt. If I owe you 100 credits, it means that I have +100 credits, and you have -100 credits. When the debt is repaid, the credits are gone. Offst does not rely on a blockchain, therefore no proof of work or mining is required. What is required instead is that you trust some friends or other entities for some amount of credit. If your trusted friends ever default, you can possibly lose credits, up to the amount you trusted them.

By anyway I meant to disturb the future of the project, and I'm sorry if it came out that way.

@bltavares : Actually, having these kinds of questions around here is very helpful. Sometimes in weeks of typing code you can get into very specific details of things, but you forget about the big picture.

I asked a few other people today about this issue. It turned out many people prefer to use their native and familiar currency for their debt (Which is option 1.c). This is just like you and @SonOfLilit suggested:

If all you're doing is recording debt that people owe each other, I say let them record it in liters of gasoline or pizza slices or slaps of the face for all you care

The way I currently see the status of the project, the most difficult thing is to get adoption. If we can get more adoption by letting people have their familiar currencies, I think it could be a good idea.

Current state

The current state of an Offst node allows you to open an isolated network, recording debt in any unit you prefer. However, it is somewhat uncomfortable for a few reasons:

  • In the current implementation, there is a one to one match between an identity (public key) :: wallet :: unit of debt. This means that if you want to trade using some other unit of debt, you need to create a new node, with a new identity.

  • If you create a new node, and accidentally connect it to two different Offst networks that trade in different units, you are going to lose money, as @amosonn pointed out. The current implementation is oblivious to different trading units, and therefore will not be able to protect you from this kind of mistake.

  • There is no built in method for exchanging different units in the network, and any external service built over Offst will have issues implementing atomic and secure exchange without modifications to the core Offst protocol.

Implementation idea

The current design is pretty flexible, I think we could change it to support multiple trading units natively, but there are some issues to consider first.

From the point of view of the end user, the user can set up mutual credit accounts with multiple friends using multiple currencies. An example of what a friends list should look like:

  • Alice:
    • USD: -50
    • EUR: +20
    • BTC: +1
  • Bob:
    • USD: -20
    • FST: 5

For each pair of (Friend, unit) there is a separate balance, and separate credit limits. (Note: we should probably allow dealing with smaller units, like USD/1000).

Next, there is the question of exchange. If we natively support multiple units, I think we should also natively support some means of exchange. If my local currency is USD and I visit another place that only handles EUR, I want to be able to pay with USD.

@SonOfLilit said:

Of course we shouldn't include an intrinsic system for translating between denominations, this will be a huge security breach because their relative values change by the microsecond presenting crazy arbitrage opportunities

I agree that we shouldn't hard code exchange rates somehow, but we could let nodes announce, for example, that they are willing to sell 1 USD for 2 EUR, or that they are willing to sell 1 EUR for 3 USD.
This was inspired by the implementation of offers at the settle project, by @spolu.

but don't worry - there will pop up nodes happy to buy your EUR debt for BTC debt or vice versa (and take a small spread).

Most nodes will probably not do any exchange, but some brave nodes might be willing to take the risk.
Of course that this is a serious foot-gun to implement. If anyone sets up exchange service in his node and configures the wrong numbers, he could lose money.

From implementation point of view, I see the exchange service as a generalized form of transaction fees (where the multiplication can be by fractions larger than 1).

From the user point of view, if I get an invoice to pay 5 EUR, I will ask an index server for the best route for me to pay this invoice. From the proposed route I will be able to deduce the amount of USD I have to send to pay the invoice.

I think that the main implementation complexity for making all of this work falls on the index server logic. (Which luckily, we haven't fully implemented yet). The index server will need to be able to find the best routes, or multi routes, possibly exchanging multiple currencies, multiple times, along routes from the source to the destination. I still need to think a bit about a general enough form, allowing to represent both exchange rates and transaction fees.

Regulation

I'm not sure what are the legal implications of tagging virtual debt as USD, EUR or even BTC. Could this get this project into trouble?

Interesting. The value of FST would greatly differ based on where it comes from, as there is no 'global' ledger such as in most public cryptocurrencies, where value is measured against its supply, in most cases. Satoshi refers to BTC as a commodity or collectible. We are still in experimental stages at this point. We must also understand the origins of the movement and why it came into existence.

Edit: I found some interesting posts by Satoshi regarding the internal functions of the BTC system. It appears that suggestions had been proposed as to eliminate the need to display the value of what is transfered across the network.

Satoshi responds and adds further comments down the line; https://bitcointalk.org/index.php?topic=770.msg8637#msg8637

He states that a better implementation of BTC would be possible.

Grin (coin) has been able to do this by applying some blinding magic. It has garnered a lot of praise for doing so.

@SonOfLilit Re 3, I don't think competing with USD is the main point of the Liberty Dollar story. It was mentioned there, but the charges were mostly for counterfeiting - both because it said "Dollar" and "God", and because it had to do with percious metal, which is still a delicate subject. BTC is clearly competing with USD, but I haven't heard of any legal action regarding that.

Solved by PR #240
@bltavares : Thanks for this great proposal!

I'm happy to have helped with just a question :)
And thank you for taking it in consideration, I'm looking forward the evolution of the project and to follow over the next steps of the experiment (now that I'm back online)