Weekly Dev Update #82
THORChain Weekly Dev Update for Week 82, 15–21 Feb; Impermanent Loss Protection, Synthetic Assets, DOGE finished, Community Tool tweaks
Summary
The week saw continual bug fixes for multichain testnet, as well as two significant features added, Impermanent Loss Protection and the final design of Synthetic Assets.
Impermanent Loss Protection
This feature uses the assets in the Reserve to underwrite LP assets against Impermanent Loss on a sliding scale from 0->100% after 100 days. The following are intrinsic to this feature:
- The reserve has enough RUNE assets to fund it, and the increase in economic activity on the network is high enough to cover the extra liability
- The pools are of “high quality” and THORChain’s pool curation logic is not susceptible to enterprising RUNE holders wishing to game the feature.
- LPs earn enough in the first 100 days to be “in the green” so that their need for IL protection is minimised.
Importantly, LPs are only insured against symmetrical deposits. If they add asymmetrically their deposit values are accounted for based on the slip on entry. This is the same logic as issuing them LP units for their pool ownership.
The bet is that with Impermanent Loss Protection, there should be no reason to withhold adding liquidity, or bail from a pool that is under water due to an unfavourable price change. In the long term this means higher TVL. With a higher TVL, fees and revenue from the system will grow to counter the increase in liability.
Notes: The team are still gathering data on Chaosnet, so the final figures (100 days etc) may be tweaked. In addition, the community should keep an eye on the draw down on the reserve and look for ways to capture income to ensure the reserve is always healthy.
Full spec: https://gitlab.com/thorchain/thornode/-/issues/794
Synthetic Assets
After several iterations, the team settled on a Synthetic Asset design that uses LP shares to provide collateral to synthetic assets, such that the synth is always back 50% by the asset, and 50% by RUNE. Synth liquidity units are minted when a user deposits capital in the pool, and the synth is minted to their address. The reverse occurs on redemption, with a pro-rate share of the units being burnt.
The keen-eyed DeFi economist will notice that when the synth is redeemed, the synth redeemer gets their true purchasing power avoiding any IL retained by the associated liquidity units. They are essentially offloading IL to other passive LPs in the pool. The same is true for any yield — the yield is not captured on redemption, even though the liquidity units might have a share in that. Thus Synthetic Assets should go hand-in-hand with Impermanent Loss Protection to prevent issues to passive LPs.
Synthetic Assets will be utilised in more advanced THORFi features, but the most relevant one would be for traders to arb pools at low cost and fast execution.
Synths will be live on MCCN, but more work required to build an interface around it. If you want to build a 100% synth trading web-app (no external chains), then reach out to get funded.
Full spec: https://gitlab.com/thorchain/thornode/-/issues/795
Multichain Resources
Midgard: https://testnet.midgard.thorchain.info
THORNode: https://testnet.thornode.thorchain.info
RPC: https://testnet.rpc.thorchain.info
Seed Service: https://testnet.seed.thorchain.info
THORNode
Multichain patches, including some updates to Ethereum decimal handling.
- Update BTC/BCH/LTC estimate TX size method , to do calculation manually
- Resolve “FIX: Standardise /vaults”
- Only mint 1m rune at testnet genesis instead of 220m
- update thorchain client, parse mimir as int64 instead of string
- Resolve “[BUG] BTC sending dust to customer didn’t observe back”
- Resolve “[BUG] When Leave/unbond , MsgDeposit don’t need to include coin”
- [bugfix] add synth units to pools
- Resolve “CHANGE: Upgraded BNB.RUNE sent to owner”
- Resolve “Add DOGE chain”
- update asgard vault to finish migration
- [feature] Impermanent Loss Protection
- [feature] Queue API internal
Midgard
Work continues to update Midgard V2 to handle Multichain requirements.
- Increment outbound window
- Add liquidity fees (asset, rune, total in rune) and rewards fields to pools in history earnings
- Stop all goroutines before quitting
- thin websocket client using gobwas
XChainJS
Bridges
Actively-developed bridges will be reported here going forward. Bridges are commissioned once a team who can implement is identified and work begins.
Complete
- Bitcoin: Deployed to testnet
- Ethereum: Deployed to testnet
- BitcoinCash: Deployed to testnet
- Litecoin: Deployed to testnet
UTXO Chains
- Dogecoin: Complete, will be activated after MCCN
- ZCash: Scoped, rain-checked
Cryptonote
- Haven: MSS complete, require some updates now to finalise integration
- Monero: Pending Haven implementation
Custom
- Cardano — Scoping
- Polkadot: Ready for testnet demo.
- Avalanche: Rain-checked
- Zilliqa: Scoped, rain-checked
EVM Chains
- Binance Smart Chain: Likely after MCCN
- Ethereum Classic: Rain-checked
- Rootstock: Rain-checked
- Arbitrum: Rain-checked
IBC
Pending IBC integration — Cosmos, Terra, Kava, Secret Network, Injective Protocol, Sifchain, Akash Network
Clients
BEPSwap Client
Numerous UI/UX tweaks based on community feedback
ASGARDEX Client
Work continues to prepare the client for Multichain Chaosnet. V0.0.5 was released and is stable for BTC, BNB and THOR. Work continues on ETH, LTC and BCH.
Community Work
The following tools receive regular updates:
Telegram Bot
Twitter Bot
Delphi Defi Dashboard
Upcoming Release for the 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
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
Multichain support in asgard.exchange and the desktop wallet, continue to stabilise the chain. Help the community transition to Midgard V2. Anticipating chaosnet in 4–6 weeks.
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