THORChain
Published in

THORChain

Weekly Dev Update #40

THORChain Weekly Dev Update for Week 21–29 Apr 2020

Summary

THORChain Benchmarks

The team are now working out how to optimise THORChain after completing initial benchmarks.

THORChain (without any optimisation) is able to process:

  • 180 swaps per minute
  • 2400 stakes per minute

Given connections with Bitcoin, Ethereum and Binance Chain, it could process the following:

The following are the assumptions:

  • Bifrost capacity is split between the three chains
  • 75% of inbound transactions are swaps, 25% is stakes
  • Real-world throughput taken as of 27 April 2020

The results show that THORChain can handle (at the same time) over 50% of every transaction on Bitcoin, 25% of every transaction on Ethereum and over 3 times the full current throughput of Binance Chain.

In reality, THORChain is likely to only receive a level of demand at most 1/10th this theoretical capacity. This position is taken from looking at how many arbitrage transactions are made on average through UniSwap’s contracts. Thus, THORChain has plenty of spare capacity.

Optimising State

As part of optimisations, the team began optimising how state is queried and saved in the state-machine to minimise key-writes. As an example, if a single pool is to be updated, it is not necessary to store them all in a large array of pool objects, and then re-write them all when just one pool needs to be modified. The solution is to break each pool into its own query, so it can be read and updated much faster.

Removing Outbound Memos

The team also implemented a change that removes all outbound memos from the network. This minimises complexity in handling outbound transactions, enable better batching and reduces how much on-chain meta-data is left behind.

THORChain instead takes a hash of the txOut object (which should be unique) and compares that in order to find which outgoing txOut corresponds with each observed transaction.

Double signing

CosmosSDK natively includes a module that is able to process evidence submitted of double-signing a block and slash bonds. The team spent the week hooking up this functionality into the existing THORChain node module since it processes bond differently.

Double-signing a block is bad, because it can lead to consensus breakdowns fast if nodes become confused which chain is correct. If everyone is punished for trying to sign more than one block at once, then nobody will and the only chain will be the correct one — this results in instant finality.

Chain-specify Ragnarök

The last feature the team implemented was the ability for nodes to signal support of connected chains. If more than 2/3rds signal they want to stop supporting a chain, the chain is immediately purged and all assets returned to whoever was staking on that chain.

This will be useful for contentious hard forks, or a catastrophic bug on an external chain. The end result is that all funds are returned and if the chain is to be re-added by the community later, it can be.

THORNode

The following merge requests were made to the THORNode repo:

Midgard

The following merge requests were made to maintain the Midgard repo:

Clients

The clients are being prepared to be merged into one: ASGARDEX. This will be a desktop electron app connects via the THORChain Byzantine module to the network.

ASGARDEX will have excellent account management tools

Audit

Code Review: Complete

Economic Review: Completed most of THORChain's economic architecture

TSS Audit: kickoff

Next Milestones

The updated testnet is in the final stages of testing. Chaosnet is expected once testnet has been fully-validated in several environments. There currently isn’t any known blockers to Chaosnet release.

Community

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

--

--

--

A decentralised liquidity network.

Recommended from Medium

First NodleX decentralization NFT sold for $10,000 (62 KSM) for the benefit of charity: water

11Minutes — Blockchain Play2Earn Platform

Understanding HALO Network’s Consensus Mechanism (HPOS)

#BlockforceProduct: Digital Currency Connect

THORChain release Testnet 3

DIA Data AMA with Paul Claudius and Samuel Brack at t.me/amaroom

Blockchain in Retail: 5 Methods for Building Consumer Trust

Some Things I Wish I Had Known About Permissioned Blockchain Solutions

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

CT enters Warzone, Terra buidls

Distinguishing Between Price Exposure and Impermanent Loss in Asymmetrical LP’ing

Dev Update #133-#134

PRISM- what’s it worth?