NEW!
ThorChain
Introducing Community Pros!
Delphi_Digital
@Delphi_Digital
mperklin
@mperklin
tannedoaksprout
@tannedoaksprout
CanGure91596181
@CanGure91596181
Jatinkkalra
@Jatinkkalra
TheRuneRanger
@TheRuneRanger

TSSNOLOGY.

TSS is kind of a big deal for THORChain.

The majority of nodes need to agree.

It Starts with One Way State Pegs

Nodes are connected to BNB, BTC, ETH (and other) chains via Bifröst modules.

Once nodes are done syncing, they begin watching vault addresses on each chain.

If they ever see an inbound transaction concerning a vault address they watch, they deserialise it and convert it into a witness transaction.

Once a super-majority of nodes agree on a particular transaction, it moves from a pending state to a finalized transaction. See the code snippets below for samples.

thorchain state machine
Sample witness transaction:

type Tx struct {
  ID           TxID     `json:”id”` 
  Chain        Chain    `json:”chain”` 
  FromAddress  Address  `json:”from_address”` 
  ToAddress    Address  `json:”to_address”` 
  Coins        Coins    `json:”coins”` 
  Gas          Gas      `json:”gas”` 
  Memo         tring    `json:”memo”` 
}
Sample finalized transaction:

type ObservedTx struct {
  Tx              common.Tx        `json:”tx”` 
  Status          status           `json:”status”` 
  OutHashes       common.TxIDs     `json:”out_hashes”` 
  BlockHeight     int64            `json:”block_height”` 
  Signers         []sdk.AccAddress `json:”signers”` 
  ObservedPubKey  common.PubKey    `json:”observed_pub_key”` 
}

But sir, how many chains can nodes observe at once?

As many as they wish. As long as it makes economic sense i.e. server operation costs vs. the value driven by the added chain. The more swaps, the better for nodes and LP’s.

thorchain node
thorchain state machine

Next, the state machine performs logic.

So That a txOut Gets Created

The state machine performs logic such as ordering transactions, computing state changes, and delegating them to a particular outbound vault. Finally, a txOut item is created and stored in the Key-Value store.

The txOut item details which chain it should be sent on, the destination address, the vault it should be sent from, and the maximum gas that should be spent. See the sample txOut below.

thorchain node

But sir, a vault?

ASGARD vault is a pubkey during a TSS key-signing ceremony. They have no private keys. It’s not custodial.

Sample txOut:

1 type TxOutItem struct {
2   Chain       common.Chain    `json:”chain”`
3   ToAddress   common.Address  `json:”to”`
4   VaultPubKey common.PubKey   `json:”vault_pubkey”`
5   Coin        common.Coin     `json:”coin”`
6   Memo        string          `json:”memo”`
7   MaxGas      common.Gas      `json:”max_gas”`
8   InHash      common.TxID     `json:”in_hash”`
9   OutHash     common.TxID     `json:”out_hash”`
10  }

Finally, nodes sign via a TSS ceremony.

So That the txOut Gets Broadcast

During the previous stage, the state machine selected the most ideal vault for the job i.e. ASGARD vs. YGGDRASIL vault. If the the latter, a single node can process the txOut, otherwise all the nodes need to come to a ceremony to coordinate key-signing so that the ASGARD vault sends the funds.

With 36 THORNodes operating, at least 24 of them (2/3) need to come together in a
TSS ceremony and sign the transaction. The final signed transaction is then broadcast to the respective chain.

thorchain state machine
thorchain node

But sir, what’s a YGGDRASIL vault and why wouldn’t a node operator just steal from it?

A YGGDRASIL is a “hot vault” where some small amount of funds are stored in THORNodes, which allows for faster transactions during swaps. A node operator wouldn’t steal assets from the vault because as an operator, they must bond a minimum amount of RUNE to secure the network. Today the lowest bond is 301,755 RUNE worth $3,470,765 USD. If they steal from their own vault, they’d get slashed from their bond 1.5X the amount stolen. They’d lose more than they gained. Makes zero economic sense.

frame
rewiring legacy
How are the servers operating the service?
Can it listen-for transaction on-chain?
Is all data open and public?
How many need to agree in a TSS ceremony?
Incentivizes users to be Liquidity Providers?
99+ Public & Anonymous
check
check
Two Thirds
Yes with Fee Rewards
not comparable
A bunch of centralized
check
check
What's TSS?
No
but compatible
thorchain node

But sir, how can CEXes earn with THORChain?

With affiliate fees supported by the network, they can convert their infrastructure to make use of THORChain’s Decentralized Liquidity Network while setting whichever fees they want. It’s a win-win.

Papers & Audits |

THORCHain has been studied by the industry’s brightest.
Read the various papers to come to your own conclusions ;)

But sir, I'm not technical enough to understand these ^

No worries, the community is quite active via various channels including Twitter, Telegram and Discord. It is suggested you join and ask away any questions you may have. Remember that educating yourself is a core component to gaining confidence in the network and ultimately becoming a Liquidity Provider.

thorchain node

$1B VOL IN 138 DAYS

THORChain processed an incredible transaction volume while in its infancy. This isn't smoke and mirrors, its utility is real.

*Fictional graph.

But sir, how can I benefit from this technology?

You can swap native assets from your hardware wallets. You can participate as a Liquidity Provider and earn fee rewards. You can arbitrage price inefficiencies. You can operate a THORNode. You can integrate with your wallet or exchange. You can do so much.

thorchain node