Should the Trustlines Network move onto Gnosis Chain?

Should the Trustlines Network move onto Gnosis Chain?

We propose to migrate the Trustlines Network to the Gnosis Chain and, in the process, change our identity implementation to use Gnosis Safe.


The Trustlines Network currently runs on its own dedicated Trustlines Blockchain, which is a minimal viable Proof-of-Stake (mPos) chain design.

The Trustlines Blockchain has been running successfully for the past three years. We have a group of very engaged and dedicated validators. Despite that, we’ve identified use cases that would benefit us from being on a chain that is not solely dedicated to Trustlines (e.g., buying crypto with peer-to-peer credit aka Social DEX, using Gnosis Safe with social recovery.)

Medium to long term, we’re hoping that this could be a first step towards unifying all Ethereum social graph projects on one technologically and economically interoperable protocol.

We think that the Trustlines community aligns well with the Circles community as the users of both are interested in alternative currencies/economies. Also, having both projects on the same chain could spark exciting collaboration opportunities.

An additional benefit from such a migration for Gnosis could also be that the Trustlines Validators would feel incentivized to run Gnosis Chain nodes as their favorite project would then be running on the Gnosis Chain.

How long will it take

2 - 4 Months.

How much funding are you requesting?

120k EUR paid in DAI or GNO tokens.

Project description

Even in 2022, multiple issues are limiting the broad adoption of cryptocurrencies. They do not fit into the current economic reality where money is mainly created as debt by banks, and the capital costs incurred when people provision cryptocurrencies are prohibitive. Moreover, the requirement of upfront deposit money, having a bank account, dependency on centralized, often non-regulated, cryptocurrency exchanges, lack of user-friendly user experience, and the necessity to deal with cryptocurrency transfers are hindering adoption.

As a solution, we offer the Trustlines Network - a decentralized, permissionless, and open platform to host currency networks. The value in these currency networks is represented in IOUs (abbreviation for ‘I owe you’) issued by its participants. The design extends the original Ripple idea with a strong focus on ease of adoption.

The term IOU acknowledges that the issuing party has a debt towards the receiving party. Suppose Alice wants to buy something from Bob but cannot pay with cash or a bank transfer. Instead, she will acknowledge a debt towards him by issuing an IOU.

Since Alice receives the goods and Bob receives an IOU, this transfer of debt is as good as a cash payment or bank transfer. But rather than Bob having a claim towards his bank, he now has a claim towards his trusted friend, Alice.

IOUs can also be referred to as self-issued debt. They can be used for payment as long as users accept them.

The Trustlines Network is a community-driven project that empowers people to create their own money and access digital payments. We call it People Powered Money.

Features

The Trustlines Network is already built and is being used by users around the globe.

Detailed information on how Trustlines works can be found at the Trustlines Docs.: How Trustlines works - Trustlines Docs.

In summary:

  • You pay with “I owe you’s” (IOU).
  • Users create a bilateral credit line between them (we call it a trustline) by setting the maximum amount they are willing to trust the other party and an initial balance. This trust is denominated in fiat or cryptocurrency of their choice. Note that users are not actually sending the fiat or cryptocurrency, but they use a promise to pay a debt in that currency at a later time.
  • The system supports multi-hop payments. Users can pay other users in an extended network through their connections.

System components

Smart contracts

The contracts repository holds the smart contracts of the Trustlines Protocol.


py-eth-indexer

The py-eth-indexer is responsible for listening to events on the blockchain and storing them in a Postgres database for later use.


Relay server

The relay server is the connection point between the frontend applications and the blockchain. The relay takes care of the meta-transactions and provides an API for frontend clients to query.


Client library

The client library is a utility for applications. It offers the creation of wallets and facilitates interactions with the relay server.


Powerful Mobile App

The Trustlines App is a reference implementation that highlights the features of Trustlines. Users who want to experiment with Trustlines tend to do so using the Trustline App. It has been running stable for several years and is available in both the Google Play Store and the Apple App Store.


How do we plan to execute the migration?

Our plan is first to change our identity implementation to use the Gnosis Safe. There are some unknowns on how we will actually accomplish this, as with our current identity implementation, we track debts in the system. Once this step is complete, we’ll deploy the currency networks currently on the Truslines Blockchain onto the Gnosis Chain. We’ll write migration scripts that will freeze the currency networks on the Trustlines Blockchain, after which we will migrate the balances of the users to the currencies on the Gnosis Chain.

During the migration, we also want to make sure that the identities created on the Trustlines Blockchain can be used on the Gnosis Chain since users shouldn’t have to do anything on their end for the migration to be successful.

The nodes we currently use are running OpenEthereum. In our first experiments syncing the xDai/Gnosis Chain was complicated. We managed to sync with the Gnosis Chain by using Nethermind. So we plan to switch the relay and py-eth-indexer to use a Nethermind node. This change would require some modifications to the relay server. It currently requires an unlocked OpenEthereum node to communicate with the blockchain. But the Nethermind developers are advising against operating the node in this way. Thus, we’ll need to implement transaction signing within the relay server.

We’ll have to change our DevOps infrastructure to reflect the above changes. These changes include distributing new Docker hub images and updating Terraform as well as Docker configs used by the administrators to spin up the Trustlines implementation.

Developer documentation needs to be updated to reflect the move to the Gnosis Chain and Gnosis Safe.

In addition to all this, we’ll have to update internal repositories that we use for end-to-end testing, websites with statistics, etc.

Team description

The team that is planning and executing the migration has participated in building the Trustlines Protocol and has a lot of experience in the Ethereum ecosystem.


Tatu Kärki

Communications and Community. Makes sure everyone knows what’s up.

Andreas Fletcher

Project Manager. Keeps everything under control.

Côme du Crest

Senior Blockchain Developer, Smart Contract Auditor. Keeps the bits & bytes under control.

Daniel Dimitrov

Jack of all trades, master of some. Keeps whatever is necessary under control.

Timeline, Milestones, and Deliverables

We’ve split the project into 4 phases. Every phase has nearly the same complexity. Thus, the total grant would be divided equally between each phase.

Phase I: Migrate to Gnosis Safe

Deliverables: Deploy a new test currency network and update the client library and mobile app to work with Gnosis Safe accounts.

Time best case: 3 weeks | worst-case scenario: 4 weeks

Phase II: Update DevOps infrastructure.

Deliverables: Relay Server works with Nethermind connected to the Gnosis Chain. Docker hub images, test infrastructure and Terraform configs are updated to reflect the new node use. Developer documentation updated.

Time best case: 2 weeks | worst-case scenario: 4 weeks

Phase III: Migrate existing currency networks & users

Deliverables: Once the currency networks are migrated, the existing users will be moved to use the new chain.

Time best case: 2 weeks | worst-case scenario: 4 weeks

Phase IV: Buy crypto with peer-to-peer credit (Social DEX)

Deliverables: Create an MVP for an app that allows users to purchase cryptocurrencies (DAI, GNO, wETH) in exchange for Trustlines credit. The app would use a Hashed Timelock contract to lock credit on Trustlines as well as the cryptocurrency and have it atomically transferred to users participating in the exchange.

Time best case: 3 weeks | worst-case scenario: 4 weeks

Others

Over the past two years, the Trustlines Validators (currently about 30 unique users) have been engaged and dedicated to the project despite not profiting from the process. We think that Gnosis could use the opportunity to incentivize them to run a node of the Gnosis Chain and thus further improve the decentralization of the chain. We would suggest providing additional funds in the form of 10 GNO for these validators to run a validator node for the Gnosis Chain.

12 Likes

Unleash the Unicorn!

5 Likes

I’d be happy to see Trustlines move to Gnosis Chain and I think it would enable more use cases as it would benefit from the Gnosis Chain ecosystem.

5 Likes

This is a great first step! The real value for Gnosis DAO will manifest medium/long term, when all social graph projects (lens, brightid, trustlines, circles) use the same social graph and combine all of their effort, teams, apps, use cases.

4 Likes

I read through and thought about the proposal. If the aims of starting the process of getting more and more social graph protocols on a single framework like Gnosis Chain can be achieved, then this has benefit for Gnosis Chain. Since proposed by Trustlines, I assume they feel it is beneficial to existing Trustlines users. Also, fewer one-off monolithic blockchains seems a net improvement on the overall blockchain ecosphere.

Finally, the cost of 120k Euros for the migration, paid by Gnosis Chain, seems reasonable.

THerefore, I plan to support this proposal as it gets to a Phase 3 vote.

5 Likes

It would a very good step towards a closer cooperation with Circles.

3 Likes