Synthetic Assets: Overview & Implementation

THORChain University
3 min readMar 8, 2022

--

Overview

THORChain synths are fully-secured, fully-backed synthetic assets that can be sent anywhere in the Cosmos IBC ecosystem, as well as being primitives for both higher-order THORChain financial features. They will always retain the guarantee they can be redeemed for the underlying asset.

In simpler terms, THORChain synthetics are derivatives of cryptocurrencies which always keep the same price as the denominated coin.

THORChain activated on-chain synthetic assets for several reasons. Just like every THORChain feature, the architectural design of TC synths is both unique and multi-faceted in its function. TC synths are backed 50% by the denominated asset, while the other 50% is backed by $RUNE (achieved by using pool ownership to collateralize the synth, which ensure always-on liquidity and pricing). The 50% Rune collateralization of TC synths ensures and buttresses the economic security of the network, so that the (otherwise economically precarious) existence of collateralized assets on a given network provide no feasible threat to THORChain.

Additionally, that these synthetic assets carry only half of the swap fees, these synths’ swaps are way cheaper and faster, and come with lower gas fees. In turn, this means that even at high volumes, a THORChain synth swap can occur at lightning speed. This also means that TC synths can be utilized to adjust pool depths much more quickly and affordably, making arbitrage opportunities vastly more efficient. This helps pool prices (and therefore the whole of the network) match competitive market demands much more efficiently.

Furthermore, while these synth minters are adding capital to the pool from which they are minting their synths, they are knowingly foregoing any of their would-be ownership of the pool — instead, these rewards are divided among the LPs.

Implementation

Mint

➜ User mints Synth by adding RUNE to the pool (or swapping from an asset into RUNE, then adding that).
➜ synthUnits are issued to cover the new liquidity, but held by the protocol (not owned by anyone).

- P = poolUnits
- A = assetDepth, R = runeDepth, r = runeAmount
- pool.runeDepth += r
- synthUnits += (P r)/(2 (r + R))
- synthAmount = (r * R * A)/(r + R)²
- synthSupply += synthAmount
- transfer(recipient, synth, synthAmount)

PoolUnits are the sum of liquidityUnits + synthUnits.

Redeem

User redeems synth by getting it swapped out to RUNE:

1. Burn the synth
2. Delete a pro-rata share of the liquidity units held for synths.
3. Swap to RUNE and remove from the pool

- s = synthToRedeem, T = totalSynthSupply
- S = synthUnits
- A = assetDepth, R = runeDepth
- synthUnits -= GetShare(s, T, S)
- synthSupply -= s
- runeAmount = (s * A * R)/(a + A)²
- pool.runeDepth -= runeAmount
- transfer(recipient, rune, runeAmount)

Synth Swaps

Synth Swaps can be done as follows:

➜ L1 to Synth: L1 in → RUNE moved over to the pool → synth MINTED
➜ Synth to L1: Synth REDEEMED → RUNE moved to next pool → L1 swapped out
➜ Synth to Synth: Synth REDEEMED → RUNE moved over to the pool → synth MINTED

To specify the destination asset is synth, simply provide a THOR address. If it is aLayer 1, then provide a Layer 1 address.

Minting from own pool

If a user wishes to mint from the same Layer 1 asset, the process is simply a Layer 1 swap to Synth, but the RUNE is not moved anywhere. EG:

- pool.assetDepth += assetAmount
- intermediaryRuneAmount = (a * A * R)/(a + A)²

- P = poolUnits
- A = assetDepth, R = runeDepth, r = intermediaryRuneAmount
- synthUnits += (P r)/(2 R) * (1 — (r/(r + R)))
- synthAmount = (r * R * A)/(r + R)²
- synthSupply += synthAmount
- transfer(recipient, synth, synthAmount)

Staged Pools

If there is an active pool which minted synths become staged, then swaps are disabled. However, synth holders can always redeem for RUNE or the underlying asset by specifying which on the way out.

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