Weekly Dev Update #98
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 hacker discovered a bug in the THORChain ETH router that allowed this individual to extract erc777 assets (like xrune). As of now, xrune is the only erc777 token in the network.
The whitehat has returned the funds (minus a bounty) to the thorstarter team. Once the exploit is patched, the THORChain and thorstarter team will work together to restore 100% of the xrune back to the THORChain smart contract and to the LPs.
To avoid any loss of funds, the network has been halted to stop the community from swapping to/from xrune, as well as providing more xrune to the network (or adding a new erc777 asset).
All other assets/funds are safe. The network will need to upgrade the Router before it can be restored.
The Router Upgrade is still in work-in-progress. A Post-Mortem will be out soon, including the original bug.
UPDATE 0.57.6
- [BUG] Binance Signer , if account doesn’t exist , it will fail to check memo flag and block all outbound. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1795
UPDATE 0.58.1
1) [BUG] imp loss protection calculation. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1796
2) [ADD] Refund dropped asset , MKR & LINK. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1796
3) [ADD] Set “XX is self transaction” log in bifrost to debug level. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1788
4) [BUG] Synth Maximum supply validation didn’t apply correctly. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1786
5) [BUG] Fix Multichain testnet active vault is insolvent due to ropsten fork. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1784
6) [BUG] Reset thorchain seqNum on error 32. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1781
7) [ADD] Update ETH scanner to ignore malformed tx. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1779
8) [ADD] THORNAMES. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1693
9) [ADD] Extend keygen timeout to 5 minutes , also keysign to 1 minute PartyTimeout to 45 seconds. PR: https://gitlab.com/thorchain/thornode/-/merge_requests/1801
release: https://gitlab.com/thorchain/thornode/-/tags/v0.58.0 https://gitlab.com/thorchain/thornode/-/tags/v0.58.1
Community Work
GrassRoots Crypto Update
— upcoming videos THORFI Synths Part 4 — iRune A Liquidity Pool Example looking at Asym vs Sym, IL and ILP — Part 1 Overview with Graphics — Part 2 Deep dive with Spreadsheet How to access THORFI Synths — THORSwap — Brokkr Finance
TRX1’s Weekly Dev Report (28/06–04/07)
THORChain Monitoring bot — Impermanent loss protection calculation added to LP cards — IL protection added to final numbers — Auto-detection of THOR address connected to ASSET address — Inline mode for the bot: a user types “@bot ADDRESS POOL” and gets an LP card picture in any chat or group. — Improvements in notifications (nodes, trading halt, etc.) — Circulating Rune source has been changed (Delphi API -> Coingecko). It affects the calculation of the fair price — Refactoring, removed the old version on LP calculator, getting rid of “stake” work — Bug fix These updates will be deployed in a couple of days.
aiothornode (v.0.0.17) — Added API for Vaults (needed for solvency checks)
THORBelt Weekly Dev Report (June 28 to July 6)
— Started working on support for Ledger wallets — Still working on a fix to make deposit transactions with synth assets work in xchainjs/xdefi
RuneYield’s Weekly Dev Report (28/06–04/07)
— Fixed missing transactions for XRUNE pool. — Started working on improving pool data aggregation processing speed.
— Week 6 — THORWallet Update —
App & Blockchain — Apple accepting First Testflight Beta Version with the following features: — Onboarding finalized with async storage and keychain — Creating new wallet — Importing existing wallet — See funds of main and testnet — See funds balance in USD (calculated with THORChain pool price -> Midgard integrated) — Receive funds with copy address or displaying QR code — Tested “Send funds” functionality on main and testnet — Switching from testnet to mainnet — See transactions of all funds — Refresh controls for blockchain assets — Drawer with social links and app version / build number — Apple App Store listing process partially completed — Performance improvements in general and when loading assets — Debugging and pull request to XChainjs
Business / Legal — Open official THORWallet channel on telegram: https://t.me/THORWalletOfficial — Launch THORWallet website: https://thorwallet.org/ — Legal and funding activities
What’s next — First improvements from feedback round — sending by scanning QR code — show ERC20 transactions correctly — pending transactions handling — fee estimation — show price history in dashboard
ASGARDEX Weekly Update (6/28–7/4)
— validation to guard against interacting with non “available” pools — explorer fixed bugs to handle synth assets — explorer added Constants tab to network, to display constants and MIMIR values — ongoing synth support work
Ledger
ledger-thorchain npm published https://www.npmjs.com/package/@thorchain/ledger-thorchain
SKIPexchange Weekly Update (6/28–7/4):
— UX designs for desktop and mobile are finished — add Midgard guard for disabling swap/deposit/withdraw when Midgard is not responding — added Midgard health check — tx queue guard for deposit/withdraw
Xchain.net Weekly Update (6/28–7/4):
— project init — Xchain.net.Thorchain started — Xchain.net.Thorchain models , xchain.net.cosmos models , Xchain.net.Client Base Object and models added — added Xchain.net.Crypto — publicKey , PrivateKey objects , Secp256k1 , RIPEMD160 algos added — Address , AccAddress models added — bech32 , BIP39 Management added — Some of Xchain.net.Client , Xhcain.net.Thorchain Functions Implemented(Balances , URLs , Validations , …)
Bridges
How to bridge to THORChain? This is a serious undertaking, a dev should be sponsored for 6–12 months:
- Read https://gitlab.com/thorchain/thornode/-/blob/develop/docs/newchain.md and https://docs.thorchain.org/chain-clients/overview
- Implement the Chain Client https://gitlab.com/thorchain/thornode/-/tree/develop/bifrost/pkg/chainclients
- Add to Node Launcher https://gitlab.com/thorchain/devops/node-launcher
- Add to XChainJs https://github.com/xchainjs/xchainjs-lib
- Launch on Mocknet — demo to community
- Launch on Testnet, stabilise. Must be run successfully for a few weeks with no issues.
- Launch on Mainnet, stabilise
- Maintain the chain client, be on deck for hard forks, client updates and more.
Complete
- Bitcoin: Deployed to chaosnet
- Ethereum: Deployed to chaosnet
- BitcoinCash: Deployed to chaosnet
- Litecoin: Deployed to chaosnet
UTXO Chains
- Dogecoin: Complete, will be activated after MCCN
- ZCash: Scoped, rain-checked
- Decred — Ongoing
- Dash — Ongoing
Cryptonote
- Haven: [paused due XHV bandwidth]
- Monero: Pending Haven implementation
Custom
- Cardano — Scoping
- Polkadot: [depends on THORNode ED25519]
- Avalanche: Scoped, WIP with team to investigate options
- Zilliqa: Scoped, rain-checked
- Solana: [depends on THORNode ED25519]
EVM Chains
- Binance Smart Chain: Likely after MCCN
- Ethereum Classic: Rain-checked
- Rootstock: Rain-checked
- Arbitrum: Rain-checked
IBC
A development partner has been found and will begin building IBC bridges.
Pending IBC integration — Cosmos, Terra, Kava, Secret Network, Injective Protocol, Sifchain, Akash Network .
Next Milestones
- RAISETHECAPS
- ACTIVATETHESYNTHS
- THORChain Name Service
- DOGECoin
- BSC
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
- Gitlab (primary): https://gitlab.com/thorchain
- Github (secondary): https://github.com/thorchain
- Medium: https://medium.com/thorchain