Dev Update #137-#138

THORChain Weekly Dev Update for Weeks 137–138, 14 Mar — 31 Mar; Terra Launch, Hardfork, Pooled Nodes, THORFi Design Released, Network and Community Updates

THORChain Author
THORChain
8 min readMar 30, 2022

--

Summary

Terra Launched, Chain halt and restart, Hard Fork and CosmosSDK upgrade, Trading Halts and resumption, Pooled Nodes now activated — a lot has happened in a couple of weeks. The community of THORChain, Devs and Node Operators shone. Three important Mainnet milestones were achieved, TVL cross 1 billion USD and trading volume hit an all time high, along with several network and community updates.

Terra Launched and Soft Cap Removed

After many months of effort by many THORChads, Terra integration occurred on the 25th of March. This enables the combination of the only decentralised exchange with the only decentralised stablecoin.

See full details and how-tos in this Terra Launch Article.

The Soft Cap was permanently disabled, removing the last guardrail for Chaosnet. For wallet backward compatibility the Softcap has been set to the 500m, the max RUNE supply, and later it will be set to the total bonded RUNE, which is the hard cap. The hard cap is now the only liquidity limit on the system, and it is extremely unlikely the hardcap will ever be reached due to THORChain’s Incentive Pendulum.

Pooled THORNodes Went Live with a Warning

This important feature allows a group of up to six friends to team together to come up with enough $RUNE capital to run a node. This effectively means that more people can run nodes which will further decentralise the network while also deepening the BOND on the network, which allows the network to support more liquidity and a higher TVL. THORChain Docs have been updated with more information.

BUT! The community should take caution to avoid scams. Anyone who is running the node effectively has access to the Yggdrasil funds of that node, and therefore has an ability to rug pull you.

DO NOT send your $RUNE into the node of a person you don’t know who they are and don’t fully trust. Do not contribute to the node of a random person on Twitter, telegram, discord etc (even if that person is any member of the core devs or mods/admins, as names can be spoofed).

Please protect your RUNE with the utmost caution and paranoia!

If you are consdiering this, read: https://docs.thorchain.org/thornodes/overview#risk-of-running-a-node and https://docs.thorchain.org/roles/node-operators#private-delegation

Unscheduled Chain Halt

A consensus failure caused an unscheduled halt of the chain. The bug was not related to any recent code change, as was thought in the early investigation. The source of the bug has been there since early June at the latest, which means it was a part of all audits before/after summer exploits, THORGames, informal audits and testing. From discovery to resumption took less than 6 hours.

See more details at: https://twitter.com/THORChain/status/1504949355476033540

Trading Halts for ETH and TERRA

Trading was halted for the Terra and ETH chains. A bug was found where amounts are not rounded properly for any token with fewer than 8 decimals. The fix has been identified, and the patch has been merged in release 1.84.0. Trading has now resumed.

Hardfork and Cosmos SDK Completed

The Hardfork and Cosmos SDK upgrade on Stagenet and Chaosnet occurred. The chain ID for Chaosnet is: thorchain-mainnet-v1. Node Mimirs were overlooked in the genesis file and were dropped, which meant nodes needed to cast their re-vote.

Ensure you update any software such as desktop apps or browser extensions.

Max Reward Ratio for Validators Changed

Max Reward Ratio for Validators was changed to from 1 to 3 via node voting, which changes how much rewards Node Operators can earn. Before, each node earned the same reward (minus slash points), irrespective of the bond size. Now the rewards will be relative to bond size up to 900k rune (no additional rewards after that). E.g. they will get 3 times the normal reward if they have 3 times the minimum bond, which is sent to 300K.

100 Active Validators Reached

The required 100 active validators were reached, marking an important decentralised milestone for the network. The amount of nodes is limited to 100, however to a long standing bug, it is actually 101. Nodes are now voting to make it the limit 120 nodes.

Synths Maximum Cap Increased

Some pools have seen quick adoption of Synths up to the maximum 5% asset depth (2.5% of the pool) cap, and much higher overall trade volume were observed compared to pre-Synths. Nodes have voted to increase Synths maximum cap from 5% to 15% of asset depth of each pool. The Synths maximum cap is expected to be gradually raised until the maximum of 33% of asset depth.

THORFi Design Publicly Release

The THORFi design was publicly released on gitlab for review — https://gitlab.com/thorchain/thornode/-/issues/1255

It has taken months to design with many iterations, tweaks, and even wrong directions at times. It is complex and there are a lot of moving parts. The core team has been thinking hard on the concepts for a while, it’s easy to grow blind spots, bubble thinking. The design will undergo several more updates and tweaks as public feedback is received, before it is finalised.

Milestone Update

The below milestones are required before Mainnet. Only two points remain.

  • Launch Synths — Done
  • Hardfork and Cosmos SDK update — Done
  • Terra Launch and Kill Soft Cap in Chaosnet — Done
  • 100 Active Nodes Target — Done
  • Multiple Bond Providers —Done
  • Development of https://dev.thorchain.org/ — In Progress
  • THORName Service (TNS) Activation in Stagenet — Scheduled
  • TNS Activation in Chaosnet — Scheduled

30 Days of stable operations is required once all points are achieved. No date for Mainnet has been set but planning has started.

Roadmap Update

Want more information?

See more THORChain and Community News at https://www.runebase.org/ and https://medium.com/@THORNOOB

Network Updates

THORNODE Update 0.81.3

These are the changes include in the release.

1) [ADD] Parallelize transaction fetch while get a block. https://gitlab.com/thorchain/thornode/-/merge_requests/2166

https://gitlab.com/thorchain/thornode/-/tags/v0.81.3-chaosnet

THORNODE Update 0.82.0

Changes in this release:

1) [ADD] Upgrade cosmos sdk to latest version (0.45.1). PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2122

https://gitlab.com/thorchain/thornode/-/tags/v1.82.0

THORNODE Update 0.83.0

1) [BUG] Fix for consensus failure back to develop branch. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2178

2) [BUG] Fix tx out manager version. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2175

3) [BUG] Cosmos v0.45 no longer has UnmarshalBinaryBare. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2173

4) [BUG] bump txout manager to v83. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2171

5) [ADD] Optimise seed list generation. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2170

6) [BUG] Fix Lint for MRs on Alternate Branches. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2167

7) [ADD] Terra client. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2162

8) [BUG] fuzzy asset matching doesn’t respect synthetic assets. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2154

https://gitlab.com/thorchain/thornode/-/tags/v1.83.0

THORNODE Update 0.85.0

1) [ADD] Log broadcast response to gather more information. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2182

2) [BUG] Fix asset didn’t round up to pool’s decimals. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2181

3) [BUG] Max validator patch. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2180

4) [ADD] Take slip into account when reimbursing pools for fees. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2126

5) [ADD] When Match outbound , Round up decimals. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2185

6) [bugfix] Round txout item amount. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/2184

https://gitlab.com/thorchain/thornode/-/tags/v1.84.0

https://gitlab.com/thorchain/thornode/-/tags/v1.85.0

Wallets Not Handling Pending Deposits Properly

A quick check of most wallets reveal they don’t handle, or incorrectly handle, pending deposits. A pending deposit happens when 1 tx in a dual-sided deposit doesn’t go thru. The first asset is put in “pending” until it is matched.

Pending Asset Dump: https://pastebin.com/vNTDjRfc

Detect: {thornodeEndpoint}/pool/{pool}/liquidity_provider/{address}

https://thornode.ninerealms.com/thorchain/pool/BTC.BTC/liquidity_provider/thor13lqegruxnapq969vhtxgp7j2ct3t6aldxvt50w this shows the LP has their BTC in limbo, and should send in RUNE.

Wallet Developers and Users should be aware, users should ensure they are using the latest wallet software.

New Alpha XChainJS versions for Hard-Fork + Correction on REST Endpoint Deprecation

1. Alpha Versions of XChainJS for Hard-Fork:

📦 @xchainjs/xchain-cosmos@0.17.0-alpha.1

📦 @xchainjs/xchain-thorchain@0.24.0-alpha.1

These alpha versions should be fully compatible with post-hardfork (and pre-hardfork) THORChain. Note: these packages can be used now — they should work with current version of THORChain since the new APIs are already available. Please pull them in ASAP and report any issues here.

2. Correction on REST Endpoint Deprecation:

Counter to what the Cosmos SDK documentation reported, the endpoints listed in the below REST migration guide will NOT be deprecated in Cosmos SDK v0.45.x. They will be deprecated in Cosmos SDK 0.46. This means the following relevant endpoints will still work (for now):

- /bank/balances/{address}

-/auth/accounts/{address}

-/txs/{txhash}

-/txs/encode

-/txs/decode

Full guide:

https://docs.cosmos.network/master/migrations/rest.html

It is recommended to complete the REST Migration now to prevent issues down the line.

Community Updates

THORNoob Updates

Bi-Weekly Community Recap #15 (Mar 3- 15): THORChain

AMA RECAP with Pluto (9R)

RUNE Base Podcasts

https://www.runebase.org/podcast/

TRX1’s Weekly Dev Report (14.03.2022–20.03.2022)

THORChain Monitoring bot

• Preparations for THORChain hard fork

• Added ILP payouts to Tx notifications if applicable

• WIP: ILP payout tracking for daily tally

• Synths:

- Showing wallet balances

- TX notifications

- Correct display of asset names

- 24h synths trade volume was added to the daily report

• Fixing bugs in the Mimir notification logic

• New THORYield links

• Basic Terra/Luna support

• THORNode/RPC/Midgard URLs are configurable now

• Various minor typos and errors eliminated

Python Library: aiothornode (https://pypi.org/project/aiothornode/)

• New URLs and predefined environments are available (Stagenet, NineRealms, ThorSwap)

• bond_providers support

• Support for the new TX endpoints after the hard fork

• Genesis query

Next week:

• Fixing bugs for Slack module

Brokkr Dev Report 🚀

- Add Liquidity Providing Feature

- Support for Thorchain Hardfork

- Add Icon System (new Icons for Synths and Coin Pairs)

- Fixes on our Transaction Result Check Tool

- Fixes on Status Page for maximum available Synth amount

- Add XDEFI Synth support

- Add Smart Contract Support

- IDO Preparations

You can follow Brokkr updates here:

Twitter: @Brokkrfinance

Telegram channel: https://t.me/brokkrfinance

Discord: https://discord.gg/2DkVsqdhRD

RX1’s Weekly Dev Report (21.03.22–27.03.22)

THORChain Monitoring bot

• New Rune circulating supply calculator for BEP2/ERC20/Native

• New approach for calculating liquidity capacity

• Slack:

- picture uploading and posting

- pause/resume slash commands

- automatically stop the notification feed for channels that have become unavailable

• NodeOp tools:

- node presence monitoring

- testing and debugging all types of notifications

- fix bond change notification

- filter old messages

• New Mimir constant names added

• ILP payout tracker

• Bug fix: Mimir not found crash

• Bug fix for refund TXs

• A few typos fixed

Next:

• Deliver Slack support

• Users request: Price divergence alerts

Community Projects are listed at https://docs.thorchain.org/ecosystem

Bridge Status

Next chain integration is being assessed. The following are on the radar:

On the Horizon

Want to see bridges built quicker, get involved on our Discord Server!

THORChain Community

To keep up to date with the project, please monitor community channels, particularly Telegram, Discord and Twitter:

--

--