Weekly Dev Update #16

THORChain Weekly Dev Update for Week 05–11 Nov 2019

THORChain
THORChain
6 min readNov 11, 2019

--

Recent Changes

Some recent updates to the protocol:

Genesis & Node Bonding

THORChain mainnet will launch via 4 genesis nodes that do not bond and are centrally deployed. The final transaction tests will be performed by the protocol using an extensive testing framework that will handle real assets. Once 100% test coverage is gained the network will enter the 3-day churn cycle and begin to accept bonded THORNodes, choosing the highest bonded node each time. The genesis nodes will be purged and destroyed, never to be used again.

Once the network reaches 12 nodes, it will activate and begin to accept stake as well as distributing protocol rewards. The minimum bond will be set at 1,000,000 RUNE at Genesis, but due to Day 0 incentives, it is likely that the limited slots of 12 Nodes will attract heavy competition and a more realistic figure to enter the system is likely 3m+. The entire Genesis cycle will take 18 days to complete and will be public the entire time.

Once the system has 12 Nodes, there will be likely 24–36m RUNE bonded, allowing a maximum of 22m — 32m RUNE to stake. The system has a safety hard-stop of 90% the bonded amount, which mean it will prevent the network becoming insecure. This will restrict the growth of the system, incentivising THORNodes to bond even more, in order to increase the security.

Assuming a launch price of 10c, THORChain will be able to secure $2.2m-$3.2m safely in staked assets on launch. As more nodes join the network (1 every 3 days) the network will become more secure over time, and be able to hold more and more assets.

Node Churn and Target N

As implied above, every 3 days the network will churn, replacing an existing node, and adding two more. It will select the highest bonded node from the standby queue. To join the standby queue, a node operator simply bonds the required RUNE and runs the THORNode daemon.

The system will try to target a specified N (intended to be 99, may be lower at launch), at which point it will stop increasing the consensus set, but still churn a node every 3 days.

The node that is churned is:

  • The oldest node (marked from the day it joined)
  • The most unreliable node (marked in the number of witness transactions it failed to participate in)

Nodes can also choose to leave the system, at which point an unscheduled churn will begin and the node will be removed inside of around 6 hours. The salient point here is that front-end clients and wallets should continually refresh the THORChain address feed to ensure they have the latest correct Asgard address.

If the current node count is less than the target, then the system will begin adding nodes from the queue again.

Protocol Incentives

The protocol has 220m RUNE in reserves in order to incentivise security and liquidity. The protocol will emit 1/3rd of the remaining reserves every 12 months, splitting it 2/3rds : 1/3rds between THORNodes and Liquidity Providers.

Given an efficient market, over time the amount of Rune bonded vs staked will also match this split, which is the desired outcome. This means that Nodes and Stakers will receive the same per-annum return on their capital if the split is optimal.

BEPSwap Development

The team are working on 4 parallel streams of effort. Cross-chain infrastructure has now been merged into a single repo called “THORNode”.

  1. THORChain
  2. Midgard Public API
  3. Threshold Signature Scheme implementation
  4. Front-end Integration for BEPSwap

THORChain

Work was done to enable the new churn logic, Yggdrasil funding, TSS integration, refactors, 3-day liquidity competition cycle and more.

Midgard Public API

The Midgard Public API schema update is going well and is now publicly available to review. It closely follows UniSwap standards. Midgard will field most of the end-user consumable data from THORChain and anyone will be able to build discovery products on top of it.

To make the data more consumable, THORChain was updated to return richer event data so that Midgard end users will not need to run much more infrastructure to query and show information.

TSS Implementation

TSS is being implemented in the statechain. Now with the updated Yggdrasil logic, there will be two pools: Asgard and Yggdrasil.

Incoming funds are received at Asgard, processed by the statechain, and delegated to a smaller Yggdrasil pool that can process the outgoing transaction almost instantly.

Asynchronous Liquidity Delegation

Yggdrasil pools are named after the mighty tree with three roots in Norse Cosmology where creatures of all kinds assemble together. The three roots symbolise the 2 of 3 security of each pool.

The signer will now pass a [keyArray] into the TSS process via local API that specifies the next committee. Each signer will whitelist nodes in the keyArray and begin the key-generation ceremony. This is now extensible to any t of n since n is keyArray.length and t is (n/3)*2 .

When THORChain processes the outgoing transaction, it will now delegate to a Yggdrasil pool. Each node monitors to see when they are delegated, and as soon as they see it, will pass the transaction to sign into the TSS process for signing. They will join other members from their Yggdrasil pool and complete the signing process.

Frontend Implentation

Work continues to refine and test the pages. The next key milestone will be to integrate the new Midgard Public API.

The new Staking interface

Timelines

The team are working for these milestones:

  • Code Freeze: 20 November 2019 on-time
  • Audit: 20 December 2019 on-time
  • Genesis: 03 January 2020 on-time

Note: With the recent launch-failures of Kava’s mainnet as well as Cosmos’ recent failed network upgrade the team are discussing the potential of extending the testing period to complete the following:

  • Validate the addition of Protocol Incentives
  • Validate cross-chain by including Ethereum into the transaction test-suite
  • Validate schema, software and network upgrade logic.

The community will be kept up to date at all times.

Community

To keep up to date, please monitor community channels, particularly Telegram and Twitter:

--

--

THORChain
THORChain

The official team for THORChain — the decentralized liquidity network.