Weekly Dev Update #77
THORChain Weekly Dev Update for Week 77, 12–18 Jan; BitcoinCash, Litecoin, ETH Router finalisation, Midgard Updates.
Summary
Ethereum and BitcoinCash continue to be validated, edge cases found and fixed. Cosmos 0.40 updated. Litecoin support was added.
Ethereum Router
The ETH Router is finalised, so the design can be discussed.
- User requests an Asgard vault (there can be multiple) from THORChain, as well as the location of the Router (it can change).
- User makes a
router.deposit(asgard, asset, amount, memo)call (for either ETH or ERC20). The assets are moved in, credited to the vault, and an event is emitted. ETH is forwarded to the asgard, ERC20s stay in the router, but can only be moved by the credited vault (tracked as an allowance-to-spend). - Bifröst picks up on the Event and broadcasts to THORChain. THORChain processes business logic as normal.
- On a
txOutthe Bifrost prepares an outgoing transactionrouter.transferOut(recipient, asset, amount, memo)(for either ETH or ERC-20) and broadcasts this. ETH is moved from the node, ERC-20 is spent using the allowance-to-spend. - For yggdrasil funding and migrations, the vaults simply credit each other with allowance-to-spends, which increments/decrements. ETH is moved, but ERC-20s actually do not move anywhere, they stay in the router.
- For upgrading, the same methods are re-used from (5), but this time a new router address is specified, which cause funds to be moved out and sent to the new router.
The attack surface is really narrow — the contract isn’t owned by anyone, and all calls are public. The entire contract is 141 LoC including interfaces and comments. ETH always lives on the asgard/yggdrasil vault, and ERC20 always lives in the Router, with an allowance-to-spend. The full lifecycle of an asset is:User -> Router: {Asgard allowance <-> Yggdrasil allowance} -> User
You can review the Router code here:
https://gitlab.com/thorchain/ethereum/eth-router/-/blob/master/contracts/Router.sol
Cosmos Stargate
Cosmos Stargate was merged — this brought in the following:
- Inter-Blockchain Communication (IBC)– cross-chain transactions
- Protobuf Migration — blockchain performance & dev acceleration
- State Sync — minutes to sync new nodes
- Full-Featured Light Clients
- Chain Upgrade Module — upgrade automation
THORChain can already start benefitting from (2), (3) and (4), with more work to do to flesh out (1) — IBC.
THORNode
Multichain patches, along with the huge merge that was Cosmos 0.40 “stargate” (5000 LOC, 400+ files changed). As well as validating the ETH router smart contract upgrade path (funds are migrated from the old router to a new router when specified).
- Resolve “[FIX] BCH migration failed to observe the inbound tx”
- update network fee , make sure we spend more than min relay fee
- ETH router smart contract upgrade path
- [refactor] Upgrade to Cosmos SDK Stargate
- Remove tx marker deadcode
- Simplify reserve contributor code
- Asym staking bug
- Create a custom logger so we could filter out those very verbose log from tendermint
- update dependencies , and also some cleanup
Midgard
Work continues to prep Midgard V2 to handle Multichain requirements.
- Adapt members endpoint for asymmetrical liquidity
- liquidity changes in stats.
- Add period restriction to pool/stats.
- only interval parameter and now calculation.
- Unique swapper count in stats.
- Multichain member details
- Make midgard apply db schema instead of having them in the docker db image
Bridges
Actively-developed bridges will be reported here going forward. Bridges are commissioned once a team who can implement is identified and work begins.
- Bitcoin: Complete, edge case testing on live testnet
- Ethereum: Complete, prepping for testnet
- BitcoinCash: Complete, prepping for testnet
- Litecoin: Complete, prepping for testnet
- Cosmos: Under review — considering moving to IBC implementation
- Haven: Under implementation — work focusses on solving EDDSA MSig
- Polkadot: Under implementation — some hurdles to cross with bifrost state sync.
Clients
BEPSwap Client
Numerous UI/UX tweaks based on community feedback
ASGARDEX Client

Work continues to prepare the client for Multichain Chaosnet.
Community Work
The following tools receive regular updates:
Telegram Bot
Twitter Bot
Delphi Defi Dashboard
https://defi.delphidigital.io/thorchain/chaosnet/network
THORChain Network Explorer
Continual Improvements, now with custom sub-domains for each net:
https://testnet.thorchain.net/
https://multichain-testnet.thorchain.net/
THORChain Official Block Explorer
https://viewblock.io/thorchain
THORChain Dashboard (ViewBlock)
https://dash.viewblock.io/d/thorchain
RUNEData
View historical yield and simulate future yield in pools:
RUNEBalance
View current arbitrage opportunities in the pools. New card-style overviews.

https://www.runebalance.com/#/pools
RUNEStake
RUNEStake can be used to see yield in THORChain liquidity pools.
Trading Leaderboard
View the current leaderboard for traders on THORChain
https://leaderboard.thornode.org/
GrassRootsCrypto Youtube
GrassRootsCrypto consistently puts out great educational videos on THORChain, users should subscribe and bookmark the channel.
https://www.youtube.com/channel/UCuC_PiCEsNIT6HH88r7vCsw/videos
Next Milestones
Multi-chain Testnet with Native Rune is deployed and being stabilised. The next milestone is to re-deploy with Ethereum, BitcoinCash, Litecoin and 0.40 update.
You can view the live network here:
http://18.198.92.45:1317/thorchain/doc/
Community
To keep up to date, please monitor community channels, particularly Telegram and Twitter:
- Twitter: https://twitter.com/thorchain_org
- Telegram Community: https://t.me/thorchain_org
- Telegram Announcements: https://t.me/thorchain
- Reddit: https://reddit.com/r/thorchain
- Github: https://github.com/thorchain
- Medium: https://medium.com/thorchain