Trustlines are the new IOU20th April 2019
Trustlines are the new IOUs
The concept of debt first appeared in ancient times in the form of barter exchange. Later, when a monetary system emerged, it became an integral part of the financial system, and new kinds of debt obligations came into existence.
We can’t imagine our world without deferred payments, credits or ordinary loans. Nowadays all these ties and relationships are supported by centralized financial institutions — banks and governments. But, thanks to distributed IOU networks, things could change drastically in the near future.
What is an IOU (I Owe You)?
Imagine you loan $10 to a friend. Now you have your friend’s IOU on the sum. In other words, IOU, or debt obligation, is an unwritten (verbal) contract confirming that obligation.
Now you can ‘spend’ a debt obligation of this kind, for instance, by asking another friend of yours to pay for your coffee, and telling him that the money will be returned by your first friend. Such a debt obligation has several distinctions: you’re able to spend it within a particular circle only, i.e. people who trust one another; also you can issue your own IOU only for the amount of money your second friend (your creditor) trusts you with.
There are a number of other kinds of debt obligations. Look at the table below for the key differences between them.
In the real world, we are dealing with IOU systems much more often than we think we are — virtually every day in fact. We’re talking about ordinary (fiat) currency here, that is essentially a variation of an IOU obligation. By accepting it we thereby confirm our trust in the issuing government, and, since we use fiat money very frequently, the amount of trust we hold in a state corresponds to the total sum of its currency we possess and/or accept.
Essentially, banks are trust intermediaries in this kind of IOU system. We give our money to a bank in exchange for its IOU, and then we pay other people with those debt obligations, plus the bank itself collects a small amount of interest.
But what if anyone could be an intermediary?
The advantages of such a system are obvious: there would be no central emission body, there would be no commission fees, there would be no need to trust in a state or government etc.
In this article, we will describe existing and potential solutions to make this happen.
One of the most prominent examples of existing IOU alternatives is Hawala. It is used for money transfers bypassing the banking system. It’s easier to explain how it works with an example.
Let’s say a citizen of country A plans to perform a money transfer to country B. But for a number of reasons (fees, legal issues) he doesn’t want to do it through the banking system. In this case, he could use the Hawala system, through a hawala broker (known as hawaladar). Our citizen finds a hawaladar in his country A, hands him the needed sum of money and gets a secret code that he then has to pass to the recipient. Then hawaladar of country A communicates to hawaladar of country B and tells him to give the sum equivalent to the secret code bearer. So, the transfer takes place, but at the same time, no money leaves the country.
Now hawaladar of country A owes money to hawaladar of country B. But this debt could be covered when a reverse transfer from country B to country A takes place.
There are also more complicated schemes for mutual debt coverage. In the above example, brokers from countries A and B could work within a broader network of brokers. After the first transaction, broker A owes broker B. But broker B has a client that wants to transfer to country C. If he doesn’t have partners in C, he could turn to broker A, and ask him to find a connection there, another broker that owes to A. So, when hawaladar C pays the recipient on behalf of broker B, all debts between A, B, and C considered to be settled.
Trustlines and blockchain
The emergence of distributed technology can’t help but lead to the transferral of these kinds of relationships to the blockchain sooner or later.
The idea of creating such a system was first described in “Money as IOUs in Social Trust Networks & A Proposal for a Decentralized Currency Network Protocol” published by Ryan Fugger back in 2004. It led to the creation of an entirely new technology — trust lines, which was later used in projects like Ripple, Stellar, Trustlines Network, and others.
The name of the technology suggests that there is trust involved between at least two participants of a particular network.
So, in our example, Alice and Bob set up a trust line of $10 from A to B. That means that Bob can use this sum at any time for a purchase. The trustline balance is specular: in other words, if Bob uses the funds, then on his side the balance will become positive and on Alice’s side it will become correspondingly negative (+10 and -10 respectively).
The negative balance of one of the participants, in this case, means that another participant (Bob) owes her (Alice) the sum of this balance. Whether this debt will be settled depends on the debtor entirely. So that is why trustlines have their name. One should credit only the trusted ones, otherwise, there is a risk of money loss.
But when you have a large number of users of such a system, a possibility emerges to create an entire credit network, where participants could perform mutual settlements with different currencies or with debt obligations derived from them.
So let’s see how trustlines technology is used in different projects.
Ripple is probably the most famous and the oldest project on our list, and for now, it also holds the third place among all cryptocurrencies in terms of market capitalization, according to CoinMarketCap.
Since the Ripple project itself consists of several technologies (XRP, xCurrent, xVia), everything written below is related to XRP only, and not to Ripple in general.
The initial idea of Ripple was to make the exchange of debt obligations more decentralized, but later on big financial institutions became the target audience of the platform, so, in order to maintain the system’s operability, a certain degree of centralization was introduced (for instance, centralized control over the list of validators, to determine who is responsible for transaction validation in the ecosystem). As xCurrent gained more and more new partnerships with banks and various payment systems, the xRapid project, where the original idea was embodied, slowed its development pace.
Trustlines in Ripple are called Ripple State Objects. When created, each of these objects has a number of parameters responsible for its particular characteristics, such as the user that will pay fees, limits for every party, the possibility of rippling (cleaning), etc. To create a new trustline one needs to reserve 5 XRP, which will be returned after the trustline’s deactivation. Also, Ripple has a feature called Authorized Trust Lines that allows for limiting a circle of participants who can own funds issued by a particular user.
One of Ripple’s main trustline features is the possibility to perform freezing. There are several variants of freezing:
- Individual freezing (freezes a particular trustline, forbids a counterparty from decreasing the balance of it);
- Global freezing (freezes an address and forbids anyone from decreasing balances in all trustlines connected to this address);
- No freezing (forbids switching individual freezing on, as well as switching global freezing off).
Also, Ripple has gateways that enable deposits and withdrawals of currencies in exchange for their XRP blockchain equivalents. Generally, the gateways can follow three basic business models:
- Deposit and withdrawal of money in and out of the system
- Liquidity pool for currencies exchange
- Services provided in exchange for internal system currency
Gateway incentives are enabled by deposit/withdrawal fee, transfer fee, exchange rate spread, services payments, etc.
Trustlines Network is another project that is aimed at the portage of real-life social and credit relationships to a decentralized basis.
The maximum quantity of possible user trustlines is unlimited, which undoubtedly is one of the project’s advantages. But in practice, the real number of set connections won’t be higher than 150 (according to Dumber’s number). But creators of private currency networks can set this parameter as they wish. Unlike Ripple, there is no possibility of trustline or account freezing in the Trustlines Network, but the developer’s team has considered the possibility of establishing an analogue of the no-ripple-flag function in the future.
A serious disadvantage to projects utilizing trustlines is a new connection establishment fee. And the Trustlines Network is no exception. There is an ETH commission fee for establishing a new connection. New asset creation, as well as current trustlines balancing, happen on-chain. On the one hand this protects the project with admired blockchain security and also avoids network spam, but on the other hand, this could repel new users and create some obstacles for scalability. The project’s developer team plans to sort out this issue in the near future in cooperation with the Raiden project.
Trustlines Network also lets its users issue their own currencies with their own characteristics and limitations, so a user could explicitly define a circle of potential users of his/her currency. All issued assets will be implemented on the Ethereum blockchain with the help of the currency network contract.
While discussing trustline technology we can’t help but mention its safety and the dispute-resolution mechanism. When a problem caused by a network or node failure arises, a procedure for conflict situation solving is defined for each separate customized currency network. If such rules and procedures weren’t defined, the conflict would be solved directly by its participants. An automated cycle closure is built into the Trustlines Network’s routing algorithm (Dijkstra’s algorithm). For the sake of node synchronization (for example, the agreed trustline balance), all the information is stored in a smart contract on the Ethereum blockchain. So if one node suddenly fails, it could check its balance on such a smart contract. Despite its obvious simplicity and ease of use, this solution has a significant disadvantage: constant smart contract updates require a huge amount of gas, so when there are more users, it would be not feasible to support the network. Trustlines itself is also set on-chain in the Trustlines Network.
Stellar is a Ripple fork that appeared in 2015. Lumens (XLM) is a native currency of this project, but there is the possibility to create other tokens. There is no need to set up a trustline for XLM transfer, but you would have to use them if you would like to transfer other assets. Those assets are issued by special actors — so-called anchors, who act like PayPal, i.e. accept a real asset and issue a digitized Stellar version of it.
Anyone, from a private individual to a major company, can be an anchor. In order to create a Stellar asset, anchors require special accounts. Every new asset gets its own unique code. The code could be in any format for the majority of assets, except for currencies and securities where it has to meet the ISO 4217 and ISIS standards correspondingly.
The anchors are able to freeze any asset (even the one created by another account) or limit access to it. In contrast to that, there is an option to opt out from a freeze possibility.
In this project, trustlines exist in the form of credit connections. The main problem that the Silent Whispers project is eager to solve is privacy in all its manifestations. By privacy, it means privacy of sender, privacy of the receiver as well as privacy of the credit connections themselves. In similar systems, i.e. Ripple, Stellar, there is only pseudo-privacy instead, since all the transactions are transparent and there are ways to connect them to real persons or entities by means of various analysis methods.
Privacy in Silent Whispers will be provided by special nodes called beacons. Their main task is to build credit routes (a credit route enables a user to lend or borrow funds without setting up a direct connection with a counterpart, by utilizing existing connections of other network participants), as well as to provide privacy. The latter is achieved by Shared Multi-Party Computation, a technology that enables several participants to conduct a computation that depends on secret input data of each one of them (these are their credit connection balances), in a way that no other participant could access any information of the secret input data of others.
The dispute-resolution mechanism is quite simple. Every transaction leads to a balance change that counterparties have to sign and put a timestamp on. If any of the transaction participants have an objection at any time, it can request an additional verification. To perform this procedure in Silent Whispers a Judge protocol is sent. Every party submits their data about the current state of the channel. The validity of this data is checked (signature verification), and if the transaction participants are in the settled state (are not performing any transactions that could affect the balance), the system rolls the channel’s state back to the latest timestamp.
By utilizing all of the above-mentioned technologies, users of the system are able to enter trusted credit relationships with one another, thus forming a credit network.
Our own project, GEO Protocol, aims to build a decentralized P2P infrastructure that allows the exchange of any kind of assets and values. It also enables users to choose on what basis they want to perform such an exchange: whether trusted (using trustlines), or trustless (using state channels).
Trustlines in the GEO network have a number of peculiarities. First, all trustlines are off-chain in GEO; for complete information about balances, connections with other nodes are stored locally within each separate node. This local storage does not contain excessive data about the entire network and allows a node to be a completely autonomous entity, independent from third parties (like relay-servers etc), and also means they don’t have to pay for their services. This approach greatly adds to the network’s scalability and economic effectiveness.
Also, GEO network supports the issuance of various equivalents (called cross-units in GEO), so any user can create his/her own currency or asset for free and unrestricted exchange.
Although local data storage has a number of advantages, it requires a dispute resolving mechanism in the case of unexpected situations. There is such a mechanism in GEO Protocol — the trustline audit — that is performed on a regular basis (frequency can be set by the user), or in a case of critical parameter change (for instance, generation of a new set of encryption keys).
In the course of the audit, participants’ balances are checked, as well as incoming (the sum a counterparty trusts you with) and outgoing (the sum you trust your counterparty with) trust of both sides of the trustline.
Since GEO is aimed at enabling a free and unrestricted exchange of any assets, no complete or partial freezing possibility of either account or trustline is provided by the protocol.
The development of debt obligations (or IOUs) has come a long way from ancient barter to the modern decentralized systems of various solutions. Of course, there are still major challenges, like on-chain based trustlines, centralization attempts, legal issues, and a social acceptance problem. The latter is especially topical, since the recent huge pump and consequent dump of all cryptocurrencies undermined some people’s trust in the industry and the technology, to the extent that those people started to view them as something complicated, less stable, and sometimes even ‘illegal’.
Of course, the very idea of trust-based transfers sounds quite futuristic for a contemporary audience, since the majority of the population tend not to trust one other, but life has taught us that this idea is viable and could be practically implemented.
When it is implemented, it could redefine a number of ingrained practices, as well as opening a whole new horizon of vast possibilities.
Follow GEO Protocol at:
[ Medium | Twitter | GitHub | Gitter | Telegram | LinkedIn | YouTube ]
Trustlines are the new IOU was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.