Introduction
Overview
THORChain is a decentralised cross-chain liquidity protocol that allows users to add liquidity or swap over that liquidity. It does not peg or wrap assets. Swaps are processed as easily as making a single on-chain transaction.
THORChain works by observing transactions to its vaults across all the chains it supports. When the majority of nodes observe funds flowing into the system, they agree on the user's intent (usually expressed through a memo within a transaction) and take the appropriate action.
For more information see Understanding THORChain Technology or Concepts.
For wallets/interfaces to interact with THORChain, they need to:
- Connect to THORChain to obtain information from one or more endpoints.
- Construct transactions with the correct memos.
- Send the transactions to THORChain Inbound Vaults.
Front-end guides have been developed for fast and simple implementation.
Front-end Development Guides
Native Swaps Guide
Frontend developers can use THORChain to access decentralised layer1 swaps between BTC, ETH, BNB, ATOM and more.
Native Savings Guide
THORChain offers a Savings product, which earns yield from Swap fees. Deposit Layer1 Assets to earn in-kind yield. No lockups, penalties, impermanent loss, minimums, maximums or KYC.
Aggregators
Aggregators can deploy contracts that use custom swapIn
and swapOut
cross-chain aggregation to perform swaps before and after THORChain.
Eg, swap from an asset on Sushiswap, then THORChain, then an asset on TraderJoe in one transaction.
Concepts
In-depth guides to understand THORChain's implementation have been created.
Libraries
Several libraries exist to allow for rapid integration. xchainjs
has seen the most development is recommended.
Eg, swap from layer 1 ETH to BTC and back.
Analytics
Analysts can build on Midgard or Flipside to access cross-chain metrics and analytics. See Connecting to THORChain for more information.
Connecting to THORChain
THORChain has several APIs with Swagger documentation.
- Midgard - https://midgard.ninerealms.com/v2/doc
- THORNode - https://thornode.ninerealms.com/thorchain/doc
- Cosmos RPC - https://v1.cosmos.network/rpc/v0.45.1, Example Link
See Connecting to THORChain for more information.
Support and Questions
Join the THORChain Dev Discord for any questions or assistance.