Weekly Dev Update #42

THORChain Weekly Dev Update for Week 05–11 May 2020

THORChain
THORChain
5 min readMay 11, 2020

--

Summary

Native Rune

The team with feedback from the community, have decided to target Native RUNE THOR.RUNE for mainnet for the following reasons:

  • Better asset security. Since THOR.RUNE is not managed by TSS, it is instead managed by THORNode block validation via tendermint consensus, which means an attacker cannot steal the bond without super-majority consensus.
  • Better node scalability. Since the Network Bond is not bound by TSS committee limits, it is bound by tendermint consensus limits of theoretically 200–300 nodes.
  • Better asset flexibility. Native assets means THORChain can control mint/burn and this will lay the groundwork for CDPs and more. Additionally it means transferrable staking units (similar to Uniswap liquidity tokens).
  • Better independence. THORChain will no longer rely on an external network to manage asset accounting.

ASGARDEX will have support for native rune, and will allow incredibly easy entry and exit of THOR.RUNE from all other asset types with one single transaction.

Infographic on Native Rune

More details about native Rune will be released in time.

Mímir Administration

Once the public testnet is complete, THORChain will move to a Chaosnet with capped funds set to around $10k. This will limit liability and act as a public bounty to find bugs. At regular stages, the team will increase the fund limit of Chaosnet to increase the network’s utility. At some point in the future, the team will then Ragnarok the Chaosnet and move to mainnet.

This requires the team to have an ability to unilaterally change some THORChain’s constants:

The important ones being MaximumStakeRune and ArtificialRagnarokBlockHeight. Mainnet will launch without any Mímir administration.

The name Mímir is a figure in Norse mythology, renowned for their knowledge and wisdom, who is beheaded during the Æsir-Vanir War. Mímir gives the team god-like powers over the chain, but will end in its head getting chopped off, and thus giving up that ability.

Swap Queuing

Swap Queuing is an important ability for the chain to prioritise certain swaps over another. This is important:

  • stops any pools becoming locked up
  • stops the chain being DoS’d
  • prevents traders exploiting the path-dependent nature of CLPs (breaking their trades up into many small ones)
  • maximises revenue for the system

The following are the Swap Queue Rules:

  • Each swap is scored with fee and slip metrics, then summed and ordered
  • 50% of all swaps are processed each block, with the highest swap scores completing first
  • A minimum of 10 and a maximum of 100 swaps are always completed
  • The swap with the highest score in each direction in each pool is processed first

This means:

  • In normal operation with less than 10 swaps, all swaps are processed
  • In periods of demand (more than 10 swaps, less than 100), only 50% of the swaps are completed, so traders need to maximise fee + slip scores
  • In periods of peak demand, only the top 100 swaps are completed (20 swap/second), which limits overhead and maximises chain revenue
  • Shallow pools don’t get locked up (due to high slip swaps)
  • Deep pools don’t get locked up (due to high revenue swaps)
  • Medium pools with Medium fees (implying low volatility) will be prioritised last once the demand clears.

THORNode Merge Requests

Cleanup, bugfixes, maintenance, new features.

Refactoring in the new Event Manager:

Finalising Ethereum integration:

Native Rune support:

Midgard

Work continues to mature out the Midgard API. It will need to be refactored soon to handle the new event manager.

Clients

ASGARDEX is now at the following repo:

The team are working to build it out and port in the BEPSwap and Asgard Wallet components:

ASGARDEX-Common

This is a npm package that contains the Binance Client, ASGARDEX theme and will soon include the Bitcoin, Ethereum and the THORChain wallet client:

The clients will be built to comply with the following interface (example, BitcoinClient):

Audit

Code Review: Complete

Economic Review: Completed most of THORChain's economic architecture

TSS Audit: begun work

TSS Audit Completion

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:

--

--

THORChain
THORChain

The official team for THORChain — the decentralized liquidity network.