Under the Hood: Asset Prices and Pool Ratios

THORChain University
3 min readAug 9, 2022

--

One of THORChain’s core design tenets is to avoid external dependencies, one example being the circumvention-by-design using of external price oracles (e.g. Chainlink). Zooming in on this one type of independence — that of pricing assets — how then does THORChain “know” the prices of each of its swappable asset?

THORChain achieves this asset price knowledge by being self-contained in its native cross-chain liquidity pools. Every pool is independently arbitraged to keep the value of the assets in line with external markets. Anyone can try to arbitrage and most of this arbitraging is likely done by external parties running bots. They are an essential aspect to the smooth running of THORChain.

For example, the price of BTC relative to RUNE is directly reflected by the quantity of BTC vs the quantity of RUNE in the pool. If BTC is externally priced at 10000x the price of RUNE, then for every BTC in the pool, there will be 10000 RUNE. If the pool ratios are different, arbitrageurs will buy/sell accordingly and pocket the profit by reselling into external markets (e.g. centralized or other decentralized exchanges). This applies to all the other pools.

However, most users do not think in terms of “RUNE per BTC, or BTC per RUNE”; instead using USD value as the common denominator. Therefore, most THORChain interfaces use the deepest stablecoin pool to reflect the “USD price” of RUNE; and all other assets can be correspondingly priced in USD based on their respective pool ratios.

For example, assuming BUSD is the deepest stablecoin pool, and the current pool ratios are as below, it is then calculated that RUNE is priced at USD 6 and BTC is priced at USD 60000.

This does not mean THORChain “needs” a stablecoin pool. Calculating/displaying the USD value is just for users’ convenience. If all the stablecoin pools are discontinued for any reason, THORChain will continue to chug along, reflecting the value of all the other assets based on their respective pool ratios.

The pool ratios are also used for swaps (asset to RUNE or vice versa) or double-swaps (asset to another asset, with RUNE as the settlement layer). For example, a double swap from BTC to ETH with the below pool ratios will give 13.33 ETH for each BTC (neglecting slippage and fees). The USD prices here are irrelevant (although if the BUSD pool is as per previous example, ETH would be priced at USD 4500).

Reference: https://docs.thorchain.org/how-it-works/prices

Feel free to hop into the TC University Discord to chat about this, or any other THORChain questions that you may have.

Explore THORChain: Website, X, Telegram, Developer Discord.

Explore Maya Protocol, the first friendly fork of THORChain: Website, X, Discord, Telegram.

Decentralized, permissionless, non-custodial, trust-minimized, open-sourced, economic-secured, non-wrapped, native-to-native cross-chain swaps, savings and soon, lending!

--

--

THORChain University
THORChain University

Written by THORChain University

THORChain University aims to educate communtiy users on how to optimally engage with the @THORChain Network

No responses yet