THORChain
Published in

THORChain

Weekly Dev Update #20

THORChain Weekly Dev Update for Week 03–09 Dec 2019

Overview

The team believe the current bottleneck to THORChain’s decentralisation is the number of nodes that can participate in a single TSS signing ceremony. As the number of participants grows, the complexity becomes exponential. This is in part because THORChain uses a TSS scheme that has no trusted dealer, which is a non-negotiable aspect. The team scoped out two features this week to address this.

Multi-realm Asgard

Instead of a single Asgard with 66 of 99 participating, Asgard can be broken up into different realms, each with a smaller participation number, such as three 22 of 33 realms. This also means that each realm can be rolled at different times, increasing the availability of the network.

THORChain has no opinion on where funds are located, they just have to exist and be accounted for in the network. A Multi-realm Asgard does not change any security characteristics of the network, rather it works to shard the funds and increase the scalability.

With Multi-realm Asgard, TSS scalability is no longer a concern, instead the upper limit of nodes now becomes a Tendermint scalability issue. Cosmos Hub is working hard to solve this, recently increasing their node count to 125, and with 300 as their long-term target.

TSS Timeout

The trigger to shard Asgard into smaller realms will no longer be a hard-coded number, instead it will be triggered when the key-gen process in a new vault times out after 10 minutes. This means that if the TSS key-generation process for the increased participation number takes too long, it should be sharded. This prevents the network ever generating a committee size with too many members. 10 minutes was chosen as the cutoff due to diminishing returns above that, and a pre-existing shelling point existing on that particular time-point, thanks to Bitcoin.

Trailing Gas Fee

A 1 Rune Fee was hard-coded into THORChain a week ago as the simple solution to a hard problem. The community had a lot of feedback about this, mainly concerns about ease of updating this in future, and they were correct. THORChain must take the governance-minimal approach to all things, and as a result a programmatic solution has been scoped out. The Network Fee will now be twice the 7-day trailing average of gas fees. This will ensure that it always exceeds the expected gas, and drives long-term income into the system. Currently it is global, but it could easily become chain-specific.

Incentive Pendulum

The system is theoretically unsafe when staked assets exceed bonded assets, whether a cartel exists or not. The reason is that a single node could craft an outgoing transaction that spends asset equally to other defecting nodes, and assuming profit-seeking entities, the assumptions around mutually assured destruction no longer hold. While incredibly unlikely to happen, since defecting nodes would need a modified binary to facilitate this transaction and be able to communicate, the system should protect around this edge case.

The solution is to disencentivise staking as the system approaches the edge, so that staking rates reduce and the system becomes safe again. The only tool at the system’s disposal is incentives, and the approach is reduce pool rewards and increase bond rewards. This is known as the “Incentive Pendulum”, designed to keep the system at its happy centre; 67% bonded and 33% staked. The Incentive Pendulum also works in the other direction, increasing incentives to stake at high bond rates.

The equation is: poolRewards = (y + x) / (y — x), where x = totalStaked, y = totalBonded.

  • At exactly 50% bonded and 50% staked, pool rewards will be 0%, incentivising bonding.
  • At 67% bonded and 33% staked, pool rewards will be 33%, the intended amount.
  • At 100% bonded and 0% staked, pool rewards will be 100%, incentivising staking.

Removal of Hard-coded Constants

The team intend to remove as many constants as possible from the constants.go file, and replace them with programmatic logic. TSS Timeout, Trailing Gas Fees and Churn Heights help solve this. The team will continue the effort.

THORChain

Cosmos was upgraded to the latest version, allowing the team to begin removing uint64 casting and replacing it with BigInt casting which is better when handling large numbers. The team are also in the process of removing float64 from the codebase, which is unsafe when computed on different machines.

Work continues to refactor the codebase to be more modular, testable and easier to grok.

Bifröst Module

Work begins on the feature/bifrostv2 branch, which is a chain-agnostic Bifröst Module that will be verified to work on Binance Chain, Bitcoin, Ethereum prior to mainnet. Monero has also been scoped out, but testing it may not happen prior to mainnet.

https://gitlab.com/thorchain/thornode/tree/feature/bifrostv2

Timelines

The team will soon move away from signalling dates for releases, instead will work to signal around completion status of milestones. Whilst ChaosNet seems to be on time for 03 January, much is left to be done:

This is captured here:

Community

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

--

--

--

A decentralised liquidity network.

Recommended from Medium

SeekTiger Powers STI in Multiple Ways to Continuously Deflate STI

Graphene Use Cases — Healthcare

RECAP: De/ Centralize 2018!

#KyberDeFi Partner Spotlight — Chainlink

ISTARDUST partners with Stream Protocol

Blockchain? Is it the Right Solution for the Climate Crisis?

RFOX Games Frees Bored Ape Yacht Club NFTs from Ethereum Cages

BlockchainSpace Partners with Filipino Education Guild Pinoy’s Learn and Earn

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
THORChain

THORChain

The official team for THORChain — the decentralized liquidity network.

More from Medium

Dev Update #130-#132

Bi-Weekly Community Recap #16 (Mar 16-29): THORChain

Deep Dive: Terrafirma NFTs & $CERES Token on Terra (Property meets DeFi)

Dawn of Money Markets