The ERC-777 re-entrancy bug, trading halt, Router Upgrade, USDT rescue, return to solvency and operational, improvements

Summary

On 9th July 2021, a whitehat discovered a vulnerability in the THORChain router when dealing with ERC-777 tokens and worked with the team to rescue the funds back to the THORStarter deployer account. The Router was patched and deployed to testnet, but during testing an issue when dealing with non-standard ERC-20’s was found, specifically USDT. A recovery plan was posed to the community, which was to rescue the USDT back to the treasury (after a 24 hour notice) and the rest of the tokens migrated via the normal Router Upgrade path. Complications arose since simultaneously the Testnet was found to…


THORChain Weekly Dev Update for Week 98, 03— 10 July; ERC777 re-entrancy on Router, THORStarter launch, MCCN Update 0.57.6, 0.58.1, Community Updates, Ledger-thorchain published

Summary

RAISETHECAPS

The caps were raised to 10m RUNE and filled as part of the THORStarter launch. At this stage the target is 30m RUNE bonded and 15m RUNE pooled for the system to have caps lifted (this was the maximum seen on SCCN).

The THORStarter launch significantly overloaded the network to the point where a lot of the nodes went offline to new transactions since there was far too much demand. The team are still looking into this, but likely it was due to an event with 30x the typical demand, and the network could not handle the spike.

Router Re-entrancy Bug on ERC777

A whitehat…


THORChain Weekly Dev Update for Week 97, 25 June — 02 July; Bitcoin Mempool Scanning, Ethereum Symbol Parse Errors and Exploit, MCCN updates 0.56.3, 0.57.2, 0.57.3, 0.57.4, 0.57.5, Community Updates

Summary

RAISETHECAPS

The caps were raised to 7m RUNE and filled. The continual Cap Raises give the protocol, middleware and interfaces more and more time to stabilise. Only when the system is stable throughout can the Caps be lifted. At this stage the target is 30m RUNE bonded and 15m RUNE pooled for the system to have caps lifted (this was the maximum seen on SCCN).

Bitcoin Mempool Scanning


$140k in funds were taken by a targeted exploit on a logic error in the ETH Bifrost. The network was halted by nodes and patched. Swaps were re-enabled 6 hours later.

The line of code that caused the bug

Summary

A small logic bug in the Ethereum Bifröst caused a carefully-crafted ERC-20 to be mis-interpreted as ETH.ETH and swapped into the network.

Total funds stolen:

  • - 9352,4874282 PERP
  • - 1.43974743 YFI
  • - 2437.936 SUSHI
  • - 10.615 ETH
  • Total value: ~$139k

The bug was that all non-ETH assets were being initialised with common.ETHAsset (ETH), but if the symbol returned “ETH”, it would skip. This means that it was being reported as ETH.ETH and not ETH.ETH-0xaddress.

The fix is to initialise the assets with common.EmptyAsset and return before handling ERC20s. This was merged.


How THORChain will achieve Mainnet, the Unlock Schedule, Planned Obsolescence and Beyond.

Overview

Mainnet will be achieved when the network achieves its stated goal of being a decentralised liquidity network:

  • Over 40 active nodes (sharded Asgard vault)
  • 30m RUNE is bonded (equivalent to the maximum seen on SCCN)
  • 15m RUNE is pooled (equivalent to the maximum seen on SCCN)
  • 5 Chains are stable, with no major bugs for previous 30 days
  • SCCN BEPSwap IL Protection is paid out
  • SCCN is Ragnaröked (or close to being)
  • Hardware Wallet support
  • Nodes are granted mimir control

At this rate, this is likely to be achieved sometime in the next 6–8 weeks at the earliest.

Bonded/Pooled KPIs

This has…


THORChain Weekly Dev Update for Week 96, 17–24 June; Node Churning Speed, MCCN V0.56.1, BEP2 RUNE Bug, Community Updates

Summary

RAISETHECAPS

The caps were raised to 5.5m RUNE and filled. The continual Cap Raises give the protocol, middleware and interfaces more and more time to stabilise. Only when the system is stable throughout can the Caps be lifted. At this stage the target is 30m RUNE bonded and 15m RUNE pooled for the system to have caps lifted (this was the maximum seen on SCCN).

Node Churning Speed

The biggest limitation for how quickly the network can scale is the total active bonded RUNE. The network deliberately churns its set every 3 days, but was limiting to only 1 new node per churn event…


The treasury comprises of $109m, funding protocol development, liquidity and paying out to community grants. The protocol has 190m in RUNE reserves. Planned Obsolescence July 2022.

Summary

The treasury is at $109m, sufficient for the roadmap. Community grants can be allocated.

The Protocol Reserves total 191,200,173.00 RUNE, worth $1.4bn. These are allocated for Chaosnet & Mainnet emissions.

Planned Obsolescence is set for July 2022.

Operational Treasury

The treasury comprises of $47m USD liquid and $62m in RUNE, total of $109m.

These funds are spent on protocol development, technical costs and community grants. The treasury has increased partly due to the rise in value of currencies as well as active yield-farming. THORChads will look for more ways to discharge the treasury into the ecosystem.

Treasury Drawdown

The treasury drawdown over the last…


THORChain Weekly Dev Update for Week 95, 01–16 June; Dynamic Synth Units, MCCN V0.55.0, DragonsDex, SKIPSwap, THORWallet, Community Updates

The last two weeks updates were rolled into this week due members travelling

Summary

RAISETHECAPS

The caps were raised to 4.5m RUNE and filled. The continual Cap Raises give the protocol, middleware and interfaces more and more time to stabilise. Only when the system is stable throughout can the Caps be lifted. This is still expected to be 6–8 weeks away.

Dynamic Synth Units

THORChain will now track synth units dynamically. This ensures the loss/yield is realised immediately. The derivation for the formula is given below and has been verified by several members of the community.


THORChain Weekly Dev Update for Week 94, 24–31 May; MCCN V0.53.1, MCCN V0.53.2, MCCN V0.54.0, Midgard 2.1.1, DragonsDex debut, Megingjoro debut, DecentralFi updates, GrassRootsCrypot new videos

Summary

RAISETHECAPS

The caps were raised to 3m RUNE and filled. The continual Cap Raises give the protocol, middleware and interfaces more and more time to stabilise. Only when the system is stable throughout can the Caps be lifted. This is still expected to be 6–8 weeks away.

Updates

UTXO consolidation

Fixes include UTXO handling behaviour when accrueing many inbounds. Since TSS has to sign every input, it’s not wise to let them grow uncontained since TSS may have to sign far too many inputs and time out. Instead the Bifrost will now track input count, and automatically consolidate inputs every 15. This keeps the…


FOR RELEASE: The world’s first cross-chain liquidity protocol will launch a multi-chain address service

Overview

The THORName Service (THORNames) is a distributed, open, and extensible naming system based on the THORChain blockchain.

THORName functionality is to map human-readable names like chris.thor to machine-readable identifiers such as cryptocurrency addresses, and metadata. THORName will support ‘reverse resolution’, making it possible to associate metadata such as a Twitter username or canonical names with a ‘home’ THORChain address.

A THORChain address can be assigned one (1) THORName to manage the other addresses associated. For example: the THORName chris can receive $BTC to the chris.btc address, chris.eth to receive $ETH and so forth. …

THORChain

The official team for THORChain — the decentralized liquidity network.

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