Trustlines Network Preview: Releasing “Sputnik”

tl;dr: We’ve built a PoC of the Trustlines Network, which is deployed on the testnet and can be used.

In the previous blogpost we hinted that we’ve already built a working Proof of Concept (PoC) of the Trustlines Network. The initial version dates back to the time around DevCon2, but we’ve polished it a bit recently, so that we can now share the “Sputnik” release with you. Please be aware that it is far from the real thing we are currently building (see below). The PoC runs on the Ethereum testnet only and has quite a few flaws. Nonetheless, watch the video to get a first impression.

Getting your hands on it

As said, it’s far from being ready for prime time. We are sharing it at an early stage, since we’ve been approached by multiple complementary currency communities, who loved the idea and expressed interest in using the PoC to give feedback.

So here’s how you get started:

The application is currently built as a browser based webapp. Therefore you do not need to install anything to use the PoC on your mobile phone, except for a recent version of Chrome. We’ve deployed three currency networks on the testnet, denominated in Euro, US Dollar and Chinese Renminbi.

Choose your flavor by pointing your mobile browser to any of these URLs:

This will load the app, ask for a nickname and create a wallet. But be aware that the Trustlines Network has “Network” in its name for a reason, so unless you plan to connect with at least one friend by creating a trustline, the app will be pretty useless. The video above and this user guide should give you an initial idea how to onboard friends and do payments. For all further questions please meet us in our Slack.

Tech Excursion

The system is built out of three components.

1) A smart contract on the Ethereum blockchain, 2) a mobile web application and 3) a relay server, which acts as a middleware between them.

The Smart Contract

At the core of the system are so called Trustlines. A Trustline is basically an agreement between two friends that they give each other (bilateral) creditlines. These can be used to spend money, by using the trustlines a friend has with others. Another important part of the agreement is the balance, which tracks how much the friends owe each other and that they’ll be good for what they owe.

Consequently the smart contract manages the network of all trustlines, and acts as a notary of all creditlines and balances. We’ve deployed one such smart contract for each of the three supported currencies on the Ropsten testnet and verified them with Etherscan. They can be inspected here:

The Mobile Web Application

This is simply the user interface, which allows to establish trustlines, do payments and inspect the current status of the account. It also acts as a simple wallet in the sense that all transactions are signed locally in the browser which also stores the private key. Note, that there is currently no easy way backup your private key(s). The web application is served by a webserver and uses a restful API to communicate with the smart contracts on the blockchain via the Relay Server.

The Relay Server

In order to do payments on the Trustlines Network, a path of trusting users between the payer and the payee must be found, along which the payment can be rippled. This pathfinding can’t be done efficiently on the blockchain nor on the mobile phone. Therefore it’s provided by the Relay Server which also acts as a helper to relay transactions from the mobile phone to the blockchain.

Deprecating the old network

We’ve used an Euro denominated trustline network for internal testing for several months, which is now deprecated. In the unlikely event, that you’ve been a user and want to settle, you can still find a dump of all accounts here.

Mapping of all accounts and their trustlines on the old eur trustline network

Above you can see the graph of the old network, which was mostly used by our colleagues at brainbot for bill splitting at lunch, at team retreats and after-work beers. As said, for the Sputnik release we’ve created a fresh currency network and the previous one is history.

The way forward

Having built this PoC was a valuable exercise. We’ve learned a lot, got insights and real hands on experience which helped to come up with a solid design for the real implementation.

With a team of five we are now working towards a beta release scheduled to be available around DevCon3. But we are basically starting over from scratch to work on a set of more sophisticated smart contracts, real Android and iPhone based mobile apps and a scalable relay server infrastructure.

We’ll keep you updated on our progress in this blog. Meanwhile, if you want to follow our work more closely or help out, please join our Slack.

Bernd, Kristoffer & the Trustlines Network Team