THORChain is a cross-chain decentralized exchange built on an independent blockchain using the Cosmos SDK.
The foundations of THORChain were laid in 2018, as part of a Binance Hackathon, by a team that keeps itself anonymous. The first product launched by the team was BepSwap, in July 2019, with the aim of allowing swaps of BEP2 assets, so from Binance Chain.
BepSwap and the Technology Behind a Cross-Chain DEX
BepSwap was designed as a test frame for the multichain Chaosnet that was released in April this year.
It’s important to note that THORChain doesn’t allow swaps of wrapped coins, so you can’t use this protocol to utilize a Bitcoin for example within Ethereum via a wBTC or any other variant of wrapped Bitcoin.
THORChain allows users to exchange Bitcoin, Ether, Litecoin, Sushi, USDC, and other currencies in their native state. So it’s a huge difference. Through this protocol, we can directly swap BNB of BEP2 or BEP20 types for Ether which is an ERC20 type.
Architecture and Chaos Network
THORChain uses the Tendermint BFT consensus mechanism. The multi-chain Chaos Network currently has 48 nodes of which 22 are active and 26 are on standby.
There is a system by which each node receives a chance to validate transactions that works as follows: every 3 days, or 50,000 blocks, a rotation takes place and some of the active nodes are replaced by nodes in the standby area.
To be able to run a node in the THORChain network, it takes a minimum of 1 million RUNE, the native token, which would currently translate into about 9 million dollars. It is important to note that these nodes can also sign transactions, not just validate them.
The team mentioned that the maximum number of nodes is 360 and all nodes are anonymous, being recognized only by IP and public key.
At the security level, when it comes to the node network, we have the slashing mechanism. Slashing means that if a node steals funds from the protocol, 150% of the value of the funds will be removed from the amount of staked RUNE.
The team did not opt for the delegation mechanism, which refers to attracting funds from outside for staking.
This could be risky because nodes that can run huge marketing campaigns to raise funds would accumulate too large amounts of RUNE, so it would jeopardize the decentralization aspect of the network.
How Do Cross-Chain Swaps Happen?
First of all, THORChain works similarly to Uniswap, if we take the cross-chain part out of the equation, which most AMMs don’t have, so it works based on trades made directly with liquidity pools.
What’s different is that all the liquidity pools on THORChain use RUNE, in addition to another currency. The team did this most likely because this way, fewer liquidity pools are needed than is the case with Uni, for example, where liquidity pools can be created between any 2 tokens.
For this reason, liquidity, in general, is and will be more concentrated. If, let’s say, we want to swap BNB for Ether, the mechanism behind the transaction is very interesting.
The user initiates a standard transaction on the Binance Chain from where they will send the desired amount of BNB to an InBound Vault, or a BNB address on the THORChain network, which is controlled and monitored by the network of nodes.
For any transaction of this type on THORChain, the consensus of two-thirds of the active nodes on the network is required. The next step is that, from an Outbound Ether Vault, the required amount will be sent to the ERC20 address, set by the user.
In the middle of these transactions stands Bifröst, the protocol that acts as a layer that connects the THORChain network with other blockchains. That would be the process, in a simplified way, by which swaps work.
Bifröst Protocol for THORChain
First, the name is inspired by Norse mythology and is the name given by the Vikings to the bridge (consisting of a rainbow) that connects Earth (Midgard) with the realm of the gods (Asgard).
Bifröst isn’t the first protocol to try to solve the problem of cross-chain swaps, but it brings innovations and improvements compared to others, such as Liquid Sidechain and POA Network Bridge.
The main problem with cross-chain technologies is that they partially sacrifice the security element for interoperability, that is, through the delegation system that would form a sort of “federation.”
In this case, the members of this federation would be kind of accountants, which would lead to centralization and increase the risk of compromising the network caused by selfish actions.
To solve this, THORChain creates bridges between blockchains, which require signatures from different validator nodes. Once the bridge is formed, the Bifröst protocol randomly chooses the nodes to sign the transaction, thus not giving them time or the possibility for coordination.
These bridges are customizable in the sense that participants can choose between a very fast one but with a low level of security that requires 3-4 signatures or a very secure but slower one that requires 20-21 signatures.
So the very interesting part here is that THORChain offers the user the possibility to choose the security level. This is just one of the systems by which the Bifröst protocol discourages malicious users from trying to profit from the network.
The Vaults in THORChain
There are two types of vaults within the THORChain ecosystem:
- Asgard TSS Vaults – the inbound vaults, consisting of a “committee” of several nodes;
- Yggdrasil Vaults – the outbound vaults, consisting of a single node.
This division was made to store large quantities of assets in the high-security vault (Asgard) and trading assets through the Yggdrasil ones. It’s important to note that each node runs an outbound vault.
RUNE has a maximum supply of 500 million tokens, with 223 million in circulation. The initial maximum supply was 1 billion, but, in 2019, the team decided to burn 50% of the coins.
RUNE was created on Binance Chain, so it was a BEP2 token, but it was later moved to its own blockchain. The token is used for taxes within the ecosystem, to participate in liquidity tools, and for governance.
To take part in liquidity pools, a huge amount of RUNE tokens is required to be staked by the validator nodes. RUNE is also used to pay rewards to nodes for validating and signing transactions.
After burning 50% of the coins, all the remaining tokens were distributed as follows:
- 220 million for rewards given to nodes or liquidity providers;
- 65 million for operational reserves;
- 60 million for RUNE vaults or community reserves;
- 50 million for team & advisers;
- 30 million for seed investors;
- 70 million for pre-sale investors;
- 20 million for IDO (Initial DEX Offering).
It’s worth mentioning that the rewards for nodes and liquidity providers span 10 years and that the vesting period for the team, advisers, and investors ends in January 2022.
So, if we refer strictly to the token, the distribution seems to be an excellent one for long-term investments. The next big milestone is the launch of the mainnet that’s scheduled for the third quarter of this year.
THORChain is a noteworthy project in terms of what it does and what it’s going to do in the area of DeFi interoperability.
Given this use case, the way RUNE is integrated into the ecosystem, the fact that the mainnet is to be launched, the community behind it, and the need for a secure platform for decentralized cross-chain swaps, this project is worth keeping an eye on. However, always bear in mind that you should never invest money that you can’t afford to lose.