THORChain is a decentralised cross-chain liquidity protocol based on Tendermint & Cosmos-SDK and utilising Threshold Signature Schemes (TSS). It does not peg or wrap assets, it simply determines how to move them in response to user-actions.
THORChain observes incoming user deposits to vaults, executes business logic (swap, add/remove liquidity), and processes outbound transactions. THORChain is primarily a leaderless vault manager, ensuring that every stage of the process is byzantine-fault-tolerant.
THORChain's primary objective is to be resistant to centralisation and capture whilst facilitating cross-chain liquidity. THORChain only secures the assets in its vaults, and has economic guarantees that those assets are safe.
There are four key roles in the system:
Liquidity providers who add liquidity to pools and earn fees and rewards
Swappers who use the liquidity to swap assets ad-hoc, paying fees
Traders who monitor pools and rebalance continually, paying fees but with the intent to earn a profit.
Node Operators who provide a bond and are paid to secure the system
ASGARDEX is an interface that allows users to connect to wallets, read balances, query Midgard and broadcast transactions. ASGARDEX can be served from both the web and desktop environment. Anyone can build their own interface, and several wallet libraries have been built to help developers with this.
Midgard is run by every THORNode and provides a restful API & graphQL & websockets that any client can consume to display data. To connect to Midgard, the client (eg wallet) must first challenge a number of nodes to prevent being attacked or phished, since the security model of THORChain is strictly by-consensus.
THORChain itself is a ledger that both settles external state, as well as transactions of THOR.RUNE - the network asset. THORChain could be called an app-chain, where the application is a decentralised exchange.
Developers build products that integrate with THORChain, such as wallets, exchanges and other services. Developers simply need to connect to Midgard, they do not need to run a node.
The order of integration is as follows:
Add open-source NPM
asgardex packages to your project
asgardex-midgard to connect to THORChain via Midgard
Use data provided by Midgard to display in your product
xchain-crypto to manage keystores for your wallet
xchain-bitcoin to sign transactions and broadcast.
THORChain is a public project. Anyone can help contribute to the ecosystem. Start here to learn about the contribution process, as well as upgrading the chain:
Connecting to more chains
Adding more business logic to the chain (stablecoins, derivatives etc)
Upgrading the chain to be more robust