Académique Documents
Professionnel Documents
Culture Documents
Network
The global platform which enables permissionless
mobile payments based on people powered money
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.
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
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
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
12
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
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
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
18
19