Vous êtes sur la page 1sur 20

Trustlines

Network
The global platform which enables permissionless
mobile payments based on people powered money

Draft Version 0.3


February 2017

Heiko Hees
Gustav Friis
Kristoffer Naerland
1

Abstract

Present-day virtually mined cryptocurrencies suffer from a number of issues limiting broad
adoption. Cryptocurrencies being supply constrained virtual commodity money,arenogood
t for our current economicreality,wheremoneyismostlycreatedasdebtbybanks,andthe
capital costincurredwhenprovisioningcryptocurrenciesisprohibitive.Moreover,thegeneral
practical requirements of upfrontdepositmoneyaswellastohaveaccountswithbanksand
exchanges to acquire and exchange crypto currencies, is hindering adoption.

As a solution we propose Trustlines Network; the decentralized, permissionless, open


platform to host currency networks in which money is represented as IOUs issued by its
participants. The design extends on the original Ripple idea with a strong focus on ease of
adoption and smart contract interoperability. The platform comes complemented with a
mobile application and the design is such that for participants, there is no need to interact
with any centralized services such as banks or exchanges.

Tableofcontents

OnAdoptionofBlockchainbasedPayments 4
TheProblemwithCommodityMoney 4
ImpactonAdoption 4

ImplementingMoneyontheSocialGraph 5
IOUsontheBlockchain 5
IOUNetworks 6

TheTrustlinesNetwork 7
PermissionlessMobilePayments 7
OpenPlatform 7
Terminology 7
CreditLine 7
Trustline 8
TrustlineBalance 8
CurrencyNetwork 8
TrustlineMoney 8
MultiHopTransfer(rippling) 8
TrustlinesNetwork 9

TheTrustlinesNetworkfromaUserPerspective 9
JoiningtheSystem 9
Payments 10
Balances 10
Currencies 10
CrossCurrencyPayments 10
Adding/WithdrawingCash 10
TrustlineMoneySecurity 11
RealWorldEnforcementofDebtClaims 11
Revoking/ReducingCreditLines 11
LeavingtheNetwork 11
Interest 11
Fees 12
CapacityRewards 12
ETHMarkets 12
FIATCryptoExchange 12

TechnicalImplementation 12
SystemArchitecture 12
SmartphoneApplication 13
RelayServers 14
ThePlatform(SmartContractFramework) 15

AutomaticAcquisitionofETH 17
CrossCurrencyTransfersandbridgingGapsintheGraph 17
SmartContractInteroperability 17
FriendsDiscovery 18
ScalingtheSystem 18

ApplicationsBeyondPayments 18
Loans 18
Savings 18
CustomComplementaryCurrencies 19

Conclusion 19

cryptocurrencies are acquired to be used


On Adoption of for payments, they feel more like prepaid
accounts or gift certicates than actual
Blockchain based money. Pay for them today, eventuallyuse
them later. This is quite the opposite of
Payments what people are used to. Most of us buy
somethingtodayusingcreditwehavewith
Payments have been seen as the our bank or credit card provider and
blockchain killer application ever since eventuallypayoffourdebtlater.Peopledo
Bitcoin made its appearance. Sending not need to have money to buy stuff, all
value from A to B without intermediaries, they need is credit. The former is scarce
without permission, without centralized while the latter is abundant.
services, was something not seen before.
Despite an increasing number of Generally speaking, when people talk
innovations aimed at usability, about money, its actually debt they are
cryptocurrencies for payments today referring to. This is aligned with the way
come with a rather bad user experience. most of todays money is created by
The average user needs to install awallet, banks. If a bank gives out a loan to a
open an account with a at-crypto customer it creates commercial bank
exchange, prove his identity, buy tokens, money. On their balancesheetthecreated
endure their volatility, secure the wallet, money is a liability, while the customers
deal with exchange rateswhencomparing promise to pay the loan back is an asset.
product offers and nally pay, and wait Denitions may vary a bit, but the
minutes or hours to have the payment essential insight is: Money is debt - and
conrmed. Even worse, the practical governments, businesses and most
constraintofhavingtouseabankaccount people maintain debt relationships, which
when acquiring cryptocurrencies make are also used to facilitate payments.
them non-inclusive for, among others, the Cryptocurrencies as commodity money
2 billion unbanked people in this world, mightbegoodforsavings,buttheirsupply
who would benet the most in the rst constraints and the upfront efforts and
place. capital required to acquire them, render
them infeasible for day-to-day commerce.

The Problem with


Commodity Money Impact on Adoption
Accounting for a reality - where money is
Cryptocurrencies can be seen as virtual
debt - leads to the conclusion that we
commodity money. Coins are minted
wont see broad adoption of mined
according to a certain schedule which is
cryptocurrencies for payments in our
independent of the economys nominal
economy. Furthermore, there is this
output and money demand. Economists
somewhat paradoxical situation that one
have pointed out widespread usage of
in general needs to rely on centralized
cryptocurrencies with an inbuilt
payment services to get access to their
deflationary nature would lead to
decentralized alternatives.
unemployment, since wages generally
don't adjust downward. Further, when

5

These conditions restrictmostindividuals, account nor upfront capital to participate


communities and businesses to benet and money is not scarce but created
from the value offered by blockchain according to demand and it can be
based complementary currencies. denominated in (a familiar at) currency.
Rendering it fair to say blockchain based
payments are still a niche applicationonly
used by a tiny group of innovators.
IOUs on the Blockchain
AnIOU(abbreviatedfromthephraseIowe
We believe broader adoption of you) is usually an informal document
cryptocurrencies for payments depend on acknowledging debt. IOUs usually specify
a value proposition that can outcompete the debtor, the amount owed, and
existing centralized payment services, sometimes the creditor. IOUs may be
instead of relying on them. signed or carry distinguishing marks or
designs to ensure authenticity. -Wikipedia
Implementing Money
IOUs can be used to model payments
on the Social Graph notarized on the Ethereum blockchain. As
an example, a bank could create an USD
The current adoption problem of denominated IOU-Token contract and
cryptocurrencies can be mitigated by promise to feel obligated to owe (and
switching from commodity based money eventually pay out) a certain amount of
to an IOU based money system, which USD to whomever is a holder of tokens.
resembles how banks createmoneyinthe Its a claim the holder of tokens has
real world. The proposed solution is against the issuer for whom its an IOU.
similar by being based on a network of Such a bearer instrument is fungible as
IOUs but diverges in its implementation the traded IOUs have the same properties
where the social graphisusedtoallowfor independent of who the holder is.
decentralized money issuance by its Therefore such IOUs can be transferred
users. Paths inanetworkofIOUsbetween and at backed IOUs, which are issued by
trusting participants (e.g. friends) can be widely trusted entities, can bring
usedtotransfermoneybetweenotherwise commercial money to the blockchain.
non trusting participants. IOUs have the potential to solve some of
the issues that users have with
Modeling money as decentralized issued cryptocurrencies liketheirvolatility,limited
IOUS solves some main problems of supply and exchangerateinconveniences.
cryptocurrencies. Users dont need a bank Bank issued IOUs come with some

drawbacks though, as they are exist trustlines Alice-Bob and Bob-Charlie.


permissioned (i.e. thebanksneedtoknow We then could set this up as an atomic
their customers and can freeze their transaction where Alice signs that she
accounts) and holders need to trust inthe owes $5 to Bob and Bob signs that he
solvency of the issuer. The privilege of owes $5 to Charlie.
money issuance is given to those central
actors which can convince a criticalmass
of users to trust them. With such
at-backed IOUs on the blockchain, one
still has a decentralized infrastructure for
accounting, but token issuance is now
rather centralized. Whats more, such
tokens are prepaidandusersneedtohave
an account with the issuing party.


IOU Networks After this transaction Alice owes $5 to
A system where every user had the Bob and Bob owes $5 to Charlie. If we
privilege to create money by issuing IOUs model this as accounts, we get that Alice
could solve the prepaid,permissionedand has $5 less on her account, Bob received
centralization issues - at least if there $5 and spent $5 so his account balance
wasnt the problem of trust. did not change and Charlie has $5 more
If a random individual on the internet on his account.NotehowCharliedoesnot
would issue USD denominated IOUs, it is depend on the solvency of Alice, but only
hard to imagine that they would have on his friend Bob to stick to his promises.
value to anyone - except for people who A default of Alice would directlyaffecther
actually know and trust the issuer to feel friend Bob, but not Charlie.
obligated to settle the IOUs for cash. If
instead IOUs are issued between friends This example shows, how payments
the aforementioned trust problem can be between strangerscanbeimplementedby
mitigated. Let uslookatanexample;Alice chaining payments on a network of
and Bob are good friends and trust each bilateral trust relationships. Users are
other. They could set up an agreement in obligated to the netted balance of all
order to account for what they owe each transfers that they facilitated(orhelpedto
other on the blockchain. They also agree facilitate). These chains of
that there are limits to the amount theyd friends-of-friends-of-friends allow
lend each other. Further they agree that participants to make fast, cheap and
whatever their netted balance is, transparent payments to peopletheydont
accounted for on the blockchain, is know through their intermediate trusted
representing an IOU in the real world. We social network. Similarly to the theory of
call such a bilateral agreement a trustline. six degree of separation, every participant
Now, if Bob also has a trustline with his in these chains will not necessarily need
friend Charlie we can facilitate a payment to trust more than a few handfuls of
from Alice to Charlie although they dont connections in order to have access to a
know or trust each other: Say Alice wants path enabling global payments.Thisbasic
to do a $5 payment to Charlie and there idea of "money transfer without money

movement" is used in todays Hawala and Open Platform


correspondent banking system. The idea
led Ryan Fugger to invent RipplePay back The Trustlines Network is an open
in 2004. It is also the foundation of the platform extendable by smart contracts
Trustlines Network. on the Ethereum blockchain, which in turn
enables interoperability and
The Trustlines Network synergy-effects with other Ethereum
based Dapps. The open-source nature of
The Trustlines Network is designed to the Trustlines Network furthermore
solve the issues which hinder broad enables 3rd party developers to build and
adoption of blockchain based payments. monetise specialized applications on top
Its the original Ripple idea built on of the platform. The platform can support
Ethereum with a focus on interoperability a varietyofpossibleapplications,ofwhich
and adoption. The foundation is an open some of these are listed in the
P2P platform to host currency networks applications beyond payments section.
which is complimented with a mobile
payment application to provide easy
Terminology
access to the system.
This section explains some core concepts
used throughout the remainder of this
Permissionless Mobile document.
Payments
Ease of adoption is the outstanding Credit Line
property of thesystem,whencomparedto
traditional payment services. Joining the

payment network will be as easy as:
An agreement between two trusting

entities (e.g. friends), which allows one


1. Downloading the mobile
party to be indebted to the other. If the
application from an app store
credit line is used, the granter is the
2. Connect by creating a creditline
creditor and theoneusingthecreditlineis
with a friend onr trusts
the debtor. The agreement is signed by
3. Ready: Send and receivepayments
both parties. The creditor signs the
within the network
maximum amount he is allowing the

debtor to be indebted with. The debtor


The app will hide all the complexity of
signs that he is obligated to pay off the
blockchain technology from regularusers.
debt.
These dont have to deal with Ether, weird

hex strings or understand the underlying
A credit line agreement can optionally
technology. Most importantlyusersdonot
specify an interest rate along with rules
have to register with any exchange to buy
regarding changes on the limit and
crypto tokens, nor do they need to have
interest rate (effectively enabling loans
any money in the rst place. All they need
and other nancial products). A credit line
is a smartphone and a friend who is
can be altered by the creditor at any time
already part of the network.
(unless otherwise agreed on). A creditline

exists in the context of a currency network

and therefore implicitly states the Currency Network


currency in which the accounting is done.
A currency network is the totality of all
trustlines denominated in the same
Trustline currency. Becoming a participant in a
currency network requires agreement on
the terms that a users trustlines can be

used by the network to facilitatemulti-hop
A trustline is a bilateral agreement
transfers.
between exactly two users which
encompasses two credit lines (each party
giving one to the other party) as well as a Trustline Money
balance which indicates if and how much We usethetermtrustlinemoneytoreferto
one party owes the other one. The given trustline imbalances, which are IOUs. Its
credit lines are denominated in the same denomination is dened by the respective
currency. The credit lines can have currency network. It can be denominated
different limits with the edge case being in a real world currency, a commodity, a
that one party gives a zero amount credit crypto token or any other unit of account.
line. A trustline can be closed if the Its main properties are divisibility,
balance between both parties is zero. durability, portability, uniformity,
convertibility and fungibility.
Trustline Balance
TrustlinemoneycanbeexchangedforETH
The trustline balance accounts for what
and vice versa on an on-chain exchange.
two parties to a trustline agreement owe
Therefore one can always tell what the
each other. From the perspective of a user
value of trustline money is compared to
positive balance is what the other
other currencies. Trustline money has
party to the agreement owes the
properties very similar to commercial
user
bank money, as it is an IOU. Also its
negative balance is what the user
fungibility depends on a network of
owes to the other party of the
entities that cooperate when moving debt
agreement
claims through the network at face value
A negative balance is a debt obligation. A
to facilitate payments.
positive balance is a debt claim. The
amountofauserspositivebalanceequals
to a negative balance of theotherpartyof Multi-Hop Transfer (rippling)
an agreement and vice versa. A user A multi-hop transfer refers to the
must/can not owe more to theotherparty mechanism used when multiple usersina
of the agreement than the nominal value currency network cooperate (implicitly as
of the given credit line given by that party. part of theagreementwiththenetwork)to
Exceptions are, if: facilitate a payment between users which
1. The creditor reduces the creditline have no direct trustline agreement.
so that it is lower than the balance The path encompasses all involved users
2. applied interest can increase the and their trustlines.
balance beyond the given credit
line

The Trustlines Network


from a User
Perspective
The following describes how the system
works from the perspective of a regular
When a currency network is pictured as a user, who interacts with the system using
graph, a chosen path is edges that his smartphone. The basic concepts are
connect the two parties to a payment. similar forcommunitiesorbusinesseswho
Each edgecanalsobereferredtoasahop build accountingsystemsontheTrustlines
and a "N hops" transfer would indicate Network, but we dont go into a detailed
that N edges (and N+1 participants) have explanation of such implementations in
been involved in a payment. If thenumber thisdocument.
of hops N is larger than 1, then N-1
participants helped to facilitate the
transfer. Joining the System
Users join the network by downloading a
As the balances along a path are all mobile app which automatically creates a
updated we also say, that the balance wallet for the user. Next users select a
updates are rippled through the system. currency network they want to join and
From the perspective of an intermediary create a trustline with at least one friend,
the total balance over all its trustlines in order to be connected tothenetworkof
remains unchanged, as it only forwarded trustlines. Note that users neither have to
what it received. register with some organization nor do
they have to depositmoneyorlinkacredit
Trustlines Network card or bank account. Furthermore, no
TrustlinesNetworkreferstotheblockchain upfront ETH is required and users can
based platform which hosts a network of start spending based on the credit line
currency networks. It is also the name of given by a friend.
the project and as such also refers to the
Adding Friends and Trustlines
additional tooling like the mobile app,
which makes it easy for users to interact Adding friends on the Trustlines Network
with the system. is very similar to other applications but
with higher privacy standards.Friendscan
be added in the real world by one phone
scanning aQRcodefromtheother.Thisis
also possible by receiving an add me link,
or by pasting in the address of thefriends
account. Users can furthermore see who
of their friends are using the Trustlines
Network. Friends (contacts) already
participating in the network can be
automatically discovered. When adding a


10

friend a trustline is created and both Note: The overall balance is not changed
explicitly agree to the mechanics of the when routing transfers through an account,
system by giving each other a credit line except for tiny amounts which represent
up to some limit. interest or earned fees.

Payments Currencies
Once a trustline is set up, users can start The system supports payments
sending payments to anyone in the denominated in many currencies, at as
network. For making payments a target well as user created ones. There is a
addressandamountisneeded.Addresses distinct network for each currency. Users
are either available intheappscontactlist can participate in multiple networks.
or received by text message or by
scanning QR codes (which can also
include the value). Before sending a
Cross Currency Payments
payments a mandatory fee is displayed. Users can send payments to users which
Both users get a notication once the only have trustlines in othercurrencies.To
transfer is initiallyconrmedandonceitis initiate a payment either the received
nalized. payment instructions contain the target
address, amount and currency or the user
enters them manually. Users are then
Balances
presented the best conversion rate offer
Users areshowntheir(total)available,nextto and fee and the total amountthepayment
their (total)balanceonthemainscreenofthe would costs them, before conrming the
app. A positive balance is the total amount transfer.
their friends owe them, while a negative
balance is the total amount they owe to their
friends. The available amount, is the sum of
Adding / Withdrawing Cash
all their credit line limits plus their balance. Adding or withdrawing funds to the
Users can also inspect the balances with Trustlines Network can be done by
their friends individually but this is of limited interacting in the real world withanyother
information, because these are changed with participant of the network. It is basically
every transfer that is routed through their implemented as a trustlines network
account (i.e. these balances change without payment for cash received.
user interaction).
If a user handles cash to a receiving user,
the receiver sends a payment to the
initiating user, thus crediting him the
amount in the network. Withdrawing
works the other way round. Note, that the
parties in the transaction dont need to be
friends. Converting cash to trustline
money is also the method to pay back
debt in the Trustline Network, which might
be necessary if a user on average spent
more than he received. Withdrawing cash


11

is themethodtoreducebalancesurpluses payment from the creditor to the debtor


given in theTrustlineNetwork(i.e.ifauser would reflect this.
on average receives more than he
spends). Just like withcommercialmoney
based bank accounts, adding or
Revoking / Reducing Credit
withdrawing cash is possible but not Lines
necessary for the system to operate and
Userscanreducethesetcreditlineslimits,
be useful.
e.g. if they want to reduce their risk
exposure to a friend. If their friend has
Trustline Money Security sufcient credit in other trustlines -
indebtedness between the friends can
Credit relationships are always with
immediately be reduced to the newly set
trusted friends only. The system
credit line limit. Users can update the
guarantees that payments which are
credit line limits at any time unless they
routed through untrusted accounts are
agreed on more restrictive terms.
unaffected if one of these accounts
defaults. So a payment from Alice Bob
Charlie is secure for Charlie even if Leaving the Network
Alice defaults shortly after. This is
If users want to quit using the Trustline
because Charlie gets the amount credited
Network, they can issuearequesttodoso
from Bob. Bob might suffer a loss, which
by appointing a limited number of friends
is okay, as he trusted Alice. Thus the
with whom they want to have their
default of a payment initiator doesnt
consolidated debt or creditinthenetwork.
affect the receiver.
The result of this action is a log, which
attests the balance with a friend after
Real World Enforcement of leaving the network. Settlement in cash,
goods or services can be done with the
Debt Claims friends in the real world.
Friends paying back the credit is not
guaranteed and is not legally enforceable
Interest
within the Trustlines Network. With social
norms effect on informal enforceability, a Each trustline can have optional interest
friend will have no incentive to disobey rates for both credit lines. If thereisanon
obligations, due to the negative impact zero balance in a trustline, every transfer
this will have on the friendship as well as and balance update will reflect for the
thesocialreputationamongtherestofthe applied interest since the last update.
community. All IOUs on the network are Users will earn interest if their overall
notarized on the Ethereum blockchain. balance is positive and have to pay
Therefore there is a tamper proof record otherwise. Users can update the interest
of all agreements and their balances. In rates of the given trustlines at any time
case of afriendnotbeingabletopayback unless they agreed on more restrictive
the obligation, theres also always the terms.
option to forgive debt or settle in other
ways than rst anticipated; a trustline


12

Fees in the mobile app and regular users dont


have to bother with it.
Users are required to pay feesforinitiated
transfers, which are composed of a base
fee and optionally a percentage of the FIAT-Crypto Exchange
transferred value. In order to send The mobileappwillautomaticallybuyETH
transfers to the network, users also need necessary topayfortransactionfees.This
ETH topayforpartsthegasfee.Acquiring is done whenever necessary and requires
the necessary ETH is done in the limited user interaction. Regularuserscan
background by the app and payed for also buy ETH for purposes beyond
using Trustline Money. Note: Users dont transaction fee payments.
need to know about Ethereum or acquire
tokens at an exchange. When entering the exchange function of
the mobile application,auserispresented
Capacity Rewards with the cheapestavailableexchangerate,
representing the cheapest of the paths to
Users get rewards for transfers that are an exchange offer. They can send limit or
facilitated using their trustlines. The more market orders to the exchange. Users are
transfer capacity they provide through free to send acquired ETH from the
their trustlines, the more value can be Trustlines wallet to any other external
transferred through them and the more wallets like Mist which allow them to use
rewards they may collect. other DApps.

ETH Markets This is a very convenient way to buy ETH,
as one does not have to setupanaccount
There is constant demand for ETH in the with an exchange ormeetinpersonwitha
system as it is needed to pay for the seller. The option to buy ETH for Trustline
operation of the system as well as to Money makes it veryeasytogetaccessto
facilitate cross-currency transfers or the wider blockchain ecosystem, as it
bridge gaps between unconnected allows to interactwithallkindsofservices
partitions in a currency network. and tokens.

Any user can be an ETH Gateway by


selling ETH for trustline money in the
Technical
system. This works by sending an offerto Implementation
an on-chain ETH/Trustline Money
exchange. ETH Gateways can earnmoney
on thespreadbetweentheirETHpriceand System Architecture
the market price. They can also receive
There are three main components that
ETH when being used in a cross-currency
constitute the Trustline Network system.
transfer and credit money in the trustline

network in exchange.
1. The mobile application allows

regular users to interact with the


The option to sell or buy ETH is on an
system using their smartphone.
exchange labeled as an advanced feature
2. Relay servers bridge between the
mobile apps and the Ethereum

13

blockchain and offer services A transaction which encodes acall


which are not feasible to be to the transfer function of a smart
implemented on the platform or contract with the sender, value,
the mobile app. Most notably the path parameters is signed on the
pathnding required for multi-hop smartphone and sent to a relay
transfers. server.
3. The platform isthefoundationand The relay server forwards the
implemented as a framework of transaction to the blockchain and
smart contracts on the Ethereum listens for events fromit,whichare
blockchain. then forwarded to the smartphone

Basic Operation apps of the initiator andreceiverof


the transfer to inform its users of
The following assumes there is a network thestatusofthetransaction.
of trustlines which users setupusingtheir
smartphone. Then if a user wants to do a
paymentthefollowinghappen:
Smartphone Application
A request to find a path on the Users interact with the system using a
network which has sufficient cross-platform mobileapplicationthatcan
capacityissenttoarelayserverby be installed from an app store or directly.
theuserssmartphoneapplication For payments the user interface
The relay server has a cached resembles interaction patterns known
graph view of all trustlines based from traditional mobile payment apps.
on their state as seen on the URLs, QR codes or NFC are used to
blockchain. It uses a path finding encode payment requests and recipient
algorithm to find the path with the addresses. The appdiffersbytheabilityto
lowest fees and returns it to the manage trustlines, i.e. add friends to a
smartphone contact list and agree on the terms of the
granted credit lines such as their limit and


14

optionally an interest rate for imbalances. would require the mobile app to sync with
For contacts in the phonebook that are the state of the Trustline Network
also using the Trustlines Network the whenever it is activated, potentially
establishment of trustlines is loading many millions of trustlines from
automatically proposed. The application the blockchainintothemainmemory.This
supports multiple user accounts and the introduces signicant latency and would
participation in multiple currency be a burden regarding bandwidth and
networks. It also allows to initiate RAM.
cross-currency payments and as a feature
for advanced users, to trade ETH for Users do not need to trust relay servers
Trustline Money. All transactions are with their accounts, as transactions are
signed locally on the mobile app, which signed locally on their device and
also manages the private keys of the validated by smart contracts on the
users. There is an option to appoint a set blockchain. The worst case is, that relay
of friends that can cooperate to help servers fail to provide the cheapest path
registering a new controlling key in caseit or give false information on the status of
was lost. payments and accounts. This can be
mitigated by setting up a network of
independently operated and incentivised
Relay Servers relay servers where the mobile app
Relay Servers are a back end service accesses a subsetofthemforeveryquery
which implement two main features: and checks for consistency of their
1. Discovering a path between a responses.
payer and a payee in the graph of
trustlines When relay servers forward a transaction
2. Forwarding transactions to the to the blockchain they are payed by the
Ethereum blockchain and sending app for their service using a probabilistic
smart contract events to the micropayments method. The relay server
mobile app. protocol is open and there is competition

In theory the system could work without between relay server operators to provide
Relay Servers, but this would signicantly the best service regarding quality and
decrease the user experience. The path price. Clients do an internal accounting of
nding algorithm depends on knowing all the relay servers service quality and
available trustlines and a reconstructed therefore develop preferences for the
graph of the network in memory. This better services.


15

The Platform (Smart network thereof.



Contract Framework) The API is compatible with the ERC20
The platform is at the core of the Token standard.
Trustlines Network. It implements a
secure, tamper proof, decentralized, The contract records the name and
permissionless, environment to host symbolofacurrency,allitsusersandtheir
currency networks. Ithasanopenprotocol trustlines. In its simplest version the
and API which supports interoperability trustlines are modeled as Accounts
with other smart contract based services which track the credit lines two parties
on the Ethereum platform. agreed on and their current balance:

The platform can host multiple currency In reality the data model is more
networks which can be denominated in complicated as also interest rates, last
real world at currencies (e.g. EUR), modication date and accumulated
commodities (e.g. Gold) or user dened system fees need to be tracked. A design
units (e.g. Beers). User dened currency goal is, to tallaccountdatainto32bytes
networks can be customized in various which is the word size of theEVM,sothat

ways, e.g. to restrict access, impose we only have the gas cost of one
interest rate limits etc. All currency sload/sstoreperaccesstoatrustline.This
networks comewithanon-chainexchange is important as transfers will usually use
that allows to trade their respective multiple trustlines to facilitate a transfer.
Trustline Money to and from ETH. Going beyond the 32 bytes would
Therefore all currencies networks on the therefore basically result in doubling the
platform are connected via ETH, which gas cost of a transfer.
allows for cross-currency payments.
Thefollowingexplainshowthebackendof
the Trustlines Network is implemented on
the Ethereum platform as a set of smart When transferring 5 tokens from Alice to
contracts. Charlie via Bob, the contracts transfer
method needs to be called by Alice with
Smart Contracts the value and thepath,wheretherecipient
is thelastaddressintheprovidedpath.As
Currency Network Token a result the accounts of Alice/Bob and
This contract is at the core of thesystem. Bob/Charlie are updated according to the
One instance of it implements a currency call parameters and a Log is generated
by tracking user issued IOUs and the


16

which records the payment event on the can only be redeemed with a very low
blockchain. The requirement to provide a probability P on the blockchain, which
path, when doing multi-hop transfers would then result in aredeemableamount
breaks the compatibility with regular which is 1/P of the actual feeperrequest.
ERC20 tokens. This canbeworkedaround This is similar to a lottery, where one has
by a method to temporarily register the only a tiny chance to win but can win a
path for a payer-payee combination with multiple of the price of the ticket.
the contract before calling the transfer
method. Users need to put a certain ETH amount
into escrow with this contract. When
Currency Network Token Factory paying a Relay Server (which they do for
This contract can be used to create and every tx they send), they sign a message
register a new currency network on the with the recipient address, the eligible
platform. It generates a new currency amount and a threshold value which
network instance with properties encodes the probability that the relay can
according to a supplied conguration. redeem the specied amount in N blocks
from now if the hash of a block in the
Identity Proxy future is lower than the threshold.
In order to support recovery of lost
accounts, we use a proxy contract which ETH Exchange
is called with transactions signed by the This contract allows to exchange ETH for
users and forwards the actual transaction credit in the Trustline Network. Users who
payload to its target, which authenticates want to sell ETH can registeranofferwith
the request based on the address of the the contract which indicates the number
calling proxy contract. This indirection is of trustline currency tokens they want to
used to allow users to change the private receive in return for the ETH deposited
key they are using to control the system. with the offer. There is one such contract
This is helpful in case a key is instance for every currencynetwork.Users
compromised. We are working on whohaveapathwithsufcientcapacityto
implementing a multisig scheme with the seller can pick the offer, pay with
uPort to allow to appoint a set of friends Trustline Money and receive ETH in their
or other trusted entities, that can account. The same contract can be used
cooperate to update the controlling key. to offer to credit Trustline Money for ETH.
The contract can also be used to
implement spending limits and give other Fees
contracts access to the account of the There aremultiplefeesnecessarytosetup
user. proper functioning of the system. For
users only a single fee is though quoted
Probabilistic Relay Payment before conrming a transaction. Fees are
Relay servers are paid for their service payable with Trustline Money, except for
with ETH. It would be expensive (10k the gas and relay fees which are payable
additional gas per tx) to have ETH in ETH. Note that it was chosen to use
microtransactions on the blockchain. Trustline Money for fees whenever
Therefore they are paid using a possible to avoid unnecessary
probabilistic payments scheme. Basically dependence on ETH supply in the system.
every payment is set up in a way, that it


17

Relay Fee Automatic Acquisition of ETH


This fee goes to the relay servers to
As the system is based on the Ethereum
reward them for their service. The fee is
blockchain it is necessary to pay for
payable in ETH and is a constant amount
transactions in its native currency ETH.
for every transaction.
Relay servers also need to bepaidinETH.

The trustline system aims to hide this


Ethereum Transaction Fee complexity from users. The mobile
This fee is payable in ETH and necessary application will automatically buy and
to payforthegasusedwhenatransaction maintain a certain amount of ETH tokens
is processedbythesystem.Thisfeeisthe for the user. Therefore, when necessary it
predominant one, for transfers less than trades ETH for Trustline Money using the
$10 it accounts for more than half of the ETH Exchange contract.
fees of a transfer.

Imbalance Fee
Cross-Currency Transfers and
This fee aims to incentivise debt bridging Gaps in the Graph
cancellation in the network. It works by ETH can also be used as a bridge if there
making paths which include hops where is a gap in the graph, i.e. when no path
the account imbalance of a trustline is with sufcient transfer capacity can be
increased, more expensive than paths found between two users. It works by
where it is decreased (or increased less). nding a path from the sender to a seller
The beneciary of the fee is the sending of ETH (which has an offer at the
side of a trustline because he might have exchange) and nding a path from
to pay a higher interest due to the added someone trading ETH for Trustline Money
imbalance. The fee is proportional to the to the recipient. Such a transfer is split
imbalance added to a trustline and its into two transfers and two ETH exchange
interest rate. interactions but can be executed
atomically in one transaction. These kind
Capacity Fee of transfers will be more expensive
This fee aims to reward providing transfer though, as the gas fee is higher and also
capacity by maintaining trustlines. The because there will be a spread between
beneciary is every sending side of a bids/asks on the ETH exchanges.
trustline along a path. The fee is
proportional to the transferred amount. Smart Contract Interoperability

The core value of Ethereum is synergy.


Interest

Users can decide tosetaninterestrateon
The TLToken contract is compatible with
tapped credit lines, which is applied if
the ERC20 token standard. There are
there is an imbalance (i.e. the other part
somethingstokeepinmindthough,asfor
owes them money) in a trustline. The
example balanceOf represents the
occurred interestiscalculatedandapplied
spendable amount of a user, while the
when the trustline is updated, but at most
actual total balance of a user can be
once a day.
negative. Also the methods transfer
and transferFrom only work if a path
between sender and recipient was


18

temporarily registered with the contract. Scaling the System


The methods to delegate and check
transfer rights approve and allowance Supporting 100 Million activeusersonthe
work as expected. system would exceed the transaction
throughput of the current Ethereum
Further extensibility is provided by platform by a factor of ~100. Currency
Governance Hooks, which allow to networks and clustering users by
delegate the exclusive right to update connectivity are obvious partitioning
credit line and interest rates to smart options which may allow for efcient
contracts. As the partiesinatrustlinecan sharding which aligns with the Ethereum
also be smart contracts, this allows to 2.0 design.
model more sophisticated logic and
enables applications like trustline based We are working closely with the Raiden
loans. Network team on their efforts to build a
generalized off-chain state framework,
which will be the foundation for scaling
Friends Discovery
the system by moving most of the state
An important feature of all social network transitions off-chain.
based applications is a mechanism which
makes it easy to discover and connect
existing friends in the application.
Applications Beyond
Unfortunately mostofthecurrentsystems
work by uploading (leaking) the address
Payments
book to a central server where it is
matched against all other known users. Loans
This practice is unacceptable and was
ruled out for the Trustlines Network. Credit lines are at the core of the system
Thereforeaschemewherenocontactlists and effectively allow users to lendmoney.
are leaked and being befriended with a A loan is different as it also comes with a
certain person can be plausible denied promissory note which describes the
was developed. The system is terms of the agreement, i.e. usually there
implemented using IPFS, public key are guarantees on the interest rate and
encryption and memory hard hashing and a repayment schedule. Loans can be
phone number combinations with a high implemented on trustlines by delegating
probability of collisions. The details are the right to update interest rate and credit
beyond the scope ofthispaperandwillbe line limits to a smart contract, which can
published in a different document. encode the terms of the agreement.

From a user perspective it works quite Savings


similar to existing methods. Users are
notied if one of their contacts is most Saving works similartosavingwithabank
likely also using the system and then today. If users have spare cash, they can
given the option to send a trustline trade it with any other participant for
initiation message to his friend. False Trustline Money, which (depending on the
positive notications are possible but currency network conguration) yields an
infrequent. interest.


19

Custom Complementary can also customize inbuilt mechanisms


for how to deal with inflation as well as
Currencies decide whether the currency should be
Complementary Currencies are monetary interoperable with other
systems that operate in complement to a currency-networks.
national currency. A popular variant are
LETSystems which are used inmorethan
1500 communities worldwide. Another is Conclusion
time-based currencies where the unit of Cryptocurrencies are an important
account/value is the person-hour or some building block of public blockchain
other time unit. Trustlines has multiple systems, as they provide the foundation
benets over existing complementary for economic consensus protocols. But
currency systems as it is permissionless, their commodity money nature and the
decentralized and tamper proof. Most efforts to acquire them, render it unlikely
importantly itsolvestheproblematicissue for them to become widely adopted
of money issuance. Many complementary everyday payment solutions. If one can
currencies are limited to be local in their admit to a view that money is a tool to
scope and not interoperable with those of account for who owes what towhomwith
other communities as they could nottrust the additional properties of fungibility and
each others issuance mechanic. convertibility, weve demonstrated how
money basedoncurrencynetworkscanbe
The Trustlines Network allows built on the Ethereum blockchain andhow
communities to set up customized they can provide the current banks main
complementary currencies according to services. Weve alsoexplainedhowsucha
their preference. For example system can effectively solve the adoption
communities can in compliance with problem of blockchain based payments.
Islamic banking decide to not enable the Especially as it has onboarding properties
feature of setting interests. Communities superior to traditional payment systems.

Vous aimerez peut-être aussi