Skip to main content

Introduction

THORSwap is a multi-chain DEX aggregator built on THORChain's cross-chain liquidity protocol and the #1 interface for all THORChain services such as THORNames and Synthetic Assets. This documentation explores the features THORSwap exposes to third party dApps and developers. In our belief that the future is multi-chain, THORSwap developed a secure solution to remove technical barriers for trading any assets accross chains, without relying on wrapped assets or bridges. It is recommended that you have a basic understanding of THORChain protocol to make better use of our APIs & smart contracts.

Objectives

THORChain's economics are not designed to be capital efficient to support a plethora of long-tail assets. THORSwap developed a clever way to extend the reach of swaps between native coins like Bitcoin and long-tail assets on Ethereum, adding more chains in the future. A pathfinder API leverages THORChain to bring native Bitcoin, and other native assets to the broader market. THORChain's code base is fairly complex, objectively large and still iterating at a fast pace. On top of that, it integrates with multiple chains that are radically different from one another, making any integration a serious endeavour. THORSwap strives to build a developer-friendly layer that also extends past THORChain's core features.

Meet THORSwap Aggregator, a single-signature experience allowing trades from/to any assets.

By sourcing multiple liquidity procotols, we ensure users get the best possible rate, accounting for slippage and chain gas fees. The pathfinder resolves the most efficient paths for asset swaps, able to split between different protocols and even different market depths in the shortest possible time.

Architecture & Components

The following list of components is centered around the architecture of THORSwap Aggregator, excluding external dependencies from the THORChain ecosystem.

  • Pathfinder API
  • Token List Service
  • Ethereum Aggregator Contracts
  • Cross-Chain SDK: help with using the API and services like the Token List Service
  • Aggregator SDK: facilitate interactions with smart contracts

Roadmap & Providers

  • Swap from ETH long-tail assets into native assets (swapIn)
  • Swap from native assets to long-tail assets (swapOut)
  • Support ERC20-ERC20 swaps
  • Launch features on THORSwap interface [we are here]
  • Osmosis integration (ATOM chain)
  • Open API and SDKs to third parties

Current liquidity providers

Thorchain: BTC, ETH, DOGE, BNB, LTC, BCH, ATOM and some ERC20 tokens
Ethereum: 1inch, 0x, UniswapV2, UniswapV3, SushiSwap

Lexicon

  • Short-tail Asset: coin usually at the core of a blockchain (e.g. BTC, ETH, DOGE)
  • Long-tail Asset: tokens living on a coin's blockchain (e.g. ERC20 tokens like Uniswap token, BEP2 token on Binance Chain)
  • SwapIn: perform a swap from an asset not supported by THORChain, to an asset supported by THORChain
  • SwapOut: opposite direction.

Quick start

In order to quickly understand how to make an exchange using the protocol, we suggest you take a quick course: Quick start