bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 19쪽 중 8쪽
NE pool has 100 BTC and 2.5 million RUNE. A user swaps 1 BTC into the pool. Calculate how much RUNE is output:
$$
\frac {1 \* 2500000 \* 100 } {(1 + 100)^2} = 24,507.40
$$
This user swaps 1 BTC for 24,507.40 RUNE.
### Costs
The cost of a swap is made up of two parts:
1. Outbound Fee
2. Price Slippage
All swaps are charged a network fee. The network fee is dynamic – it's calculated by averaging a set of recent gas prices. Learn more about [Network Fees](/technical-documentation/technical-deep-dive).
Note that users who force their swaps through quickly cause large slips and pay larger fees to liquidity providers.
{% hint style="info" %}
For technical details on transaction memo formats, swap parameters, and integration guides, see the [THORChain Developer Documentation](https://dev.thorchain.org/).
{% endhint %}
# Arbitrageurs
Balancing pools to exploit price deltas between markets.
Prices on THORChain are maintained by profit-seeking traders. Traders find assets that are mispriced between markets. They buy assets on markets with low prices and sell them on markets with high prices. This earns them a profit.
Traders compare the exchange rates on THORChain with the rates on external markets. If they find the price is lower on THORChain they can buy there and sell on an external market. If they find the price is lower on external markets they can buy there and sell on THORChain. This process is repeated at high-frequency. Over time, price information propagates and THORChain settles with external markets.
This is how THORChain avoids the need for oracles and how prices are set.
## How it Works
### Process
A swap takes place in the BTC/RUNE pool. This leaves the pool unbalanced. The ratio on THORChain is 20:1 BTC:RUNE, but is 16:1 on external markets. This means that RUNE is undervalued on THORChain.
Traders can now buy cheap RUNE on THORChain and sell it for a profit on external markets. To do so, they swap BTC into the pool and get RUNE out. They sell this RUNE on external markets and make a profit.
The economics of the [swap formula](/technical-documentation/understanding-thorchain/roles/swapping#calculating-swap-output) mean that traders should aim to restore balance to the pool in a single trade. Rebalancing should be done incrementally. If larger rebalancing trades are attempted, arbitrage may not be profitable for traders.
Specifically, each rebalancing trade should be 40–50% the imbalance size. So if the imbalance starts at $100 in value, the first rebalancing trade should be between $40–50. This will leave the imbalance at $50–60. The next rebalance should be $25–30. This process repeats until a satisfactory balance is restored.
{% hint style="info" %}
This hierarchical cascade of rebalancing trades will create arbitrage opportunities for traders big and small.
{% endhint %}
### Impact of Liquidity
Trading profits are impacted by liquidity on THORChain and on external markets. As an example, if the price of the asset in a THORChain pool is $1.20, but the same asset on an external market is $1.00, then someone can buy off that external market and sell into the THORChain pool for profit.
#### Infinitely Deep Liquidity
If both markets are infinitely deep, then the following will occur:
* Buy on External Market for $1.00, no price slip.
* Sell on THORChain for $1.20, no price slip.
* **Total Profit: 20%**
The trader can then continue to arbitrage for a profit of 20% continuously.
#### Finite, but Uneven Liquidity
If both markets have finite liquidity, but one is much deeper than the other, then the one of the markets will slip in price after the trade. However, the trader will experience a price that is roughly the average of the price before and after the trade:
* Buy on External Market for $1.00, no price slip.
* Sell on THORChain for $1.20, realised price of $1.10, price slip to $1.00.
* **Total Profit: 10%**
After the trade, there is no more price differential, but the trader made 10% in profit. The trader has made the pool price equal to the secondary market. They have transferred price information from one market to another.
#### Low Liquidity
If both markets have low liquidity, then the trader is attempting to make trades that slip each market towards each other:
* Buy on External Market for $1.00, realised price of $1.05, price slip to $1.10.
* Sell on THORChain for $1.20, realised price of $1.15, price slip to $1.10.
* **Total Profit: >10%**
The market now has no more price differential. The trader has made each market equal to each other.
## Compensation, Requirements, Costs & Penalties
THORChain does not offer explicit incentives to traders – it does not reward or punish them. Trading profits are determined by the capacity of traders to seek out and capitalise on price differentials between THORChain and external markets.
The majority of arbitrage opportunities will be exercised by software bots. These are under development by 3rd party entities and will be released in due time. They will be open-source and available for anybody to run.
# Node Operators
Node Operators
## THORNodes Overview
THORNodes support the THORChain network. While the initial design target is 100 nodes, the network can scale to over 250+. The design goal of THORChain is such that anyone can join the network with the required funds (permissionless) and be anonymous, yet still be secure. THORChain takes this a step further by having a high churn schedule, kicking out nodes continuously. This high-churn network ensures that it is censorship-resistant, evades capture and resists centralisation.
Each THORNode is comprised of several independent servers in a cluster, which run full-nodes for each connected chain. All THORNodes communicate and operate in cooperation to create a cross-chain swapping network.
{% content-ref url="/pages/dEWfRV1s1uGW4F4cVgvI" %}
[THORNode Overview](/thornodes/overview)
{% endcontent-ref %}
### Rewards
Node Operators earn 67% of the system income when it is stable. You can read more here:
{% content-ref url="/pages/dEWfRV1s1uGW4F4cVgvI" %}
[THORNode Overview](/thornodes/overview)
{% endcontent-ref %}
{% content-ref url="/pages/FikFnYfwSpOPqmdgid4H" %}
[Economic Model](/technical-documentation/technical-deep-dive/economic-model)
{% endcontent-ref %}
### Set up Instructions
Follow these setup up instructions
{% content-ref url="/pages/KOVyvL9C028BNKA5rxlw" %}
[Cluster Launcher](/thornodes/kubernetes)
{% endcontent-ref %}
### Anonymity
Node Operators should stay anonymous and never socially signal that they are running a node.
### Tools
There are a variety of tools available in the ecosystem for Node Operators, such as the Telegram Alerts bot:
{% content-ref url="/pages/wvd06RYPS3FBZgi6b7nY" %}
[Alerting](/thornodes/alerting)
{% endcontent-ref %}
### Security
The most important aspect is that Nodes must pay for their Bond, since this is a core assumption to the security of the network. If a node pays $1m for their bond, then they will never try to steal assets unless if they can access more than $1m of funds. If they can, then they will make a profit.
If delegation was permitted, a Node Operator that paid $100k in RUNE, can possibly receive $900k in delegated funds to qualify and meet the $1m bond requirement. They will now contemplate stealing assets the moment they get access to more than $100k in capital, which is likely.
{% hint style="danger" %}
Nodes must pay for their bond to ensure the economic assumptions of the network are upheld.
{% endhint %}
### Private Delegation
THORChain makes private delegation possible, because it does not erode towards the issues discussed above.
Private Delegation requires Node Operators to know and whitelist in their bonders, and there can only be up to 100 per node. This assumes the bonders are in trust circles with their operators and have their own recourse to ensure operators act in accordance to their obligations. From the point of view of THORChain, a solo node is no different to a delegated node. The network will operate identically.
In addition, there is no discretion as to fee commissions per operator. This means bonders will prioritise on engaging with operators based purely on their trust circles, not fees.
# RUNE
An overview of the asset and its four key roles.
## What is RUNE?
THORChain's native token is called [RUNE](/technical-documentation/understanding-thorchain/rune), and it is carries a fundamental utility within each facet of THORChain's operational infrastructure, as well as the larger ecosystem. Specifically, it fills three key roles:
## Overview
RUNE is the asset which powers the THORChain ecosystem and provides the economic incentives required to secure the network. RUNE has four key roles which are described below.
1. Liquidity (as a settlement asset)
2. Security (as a sybil-resistant mechanism, and a means for driving economic behaviour)
3. Governance (signalling priority on-chain)
4. Incentives (paying out rewards, charging fees, subsidising gas)
### Governance
**RUNE as a Settlement Asset**
RUNE is the settlement asset for all liquidity pools, meaning that when a user pools their liquidity, a 1:1 ratio of RUNE:ASSET is required. This means the value of each native asset pool holds within it an equal value of RUNE. For example, a pool with $100,000 in BTC will necessarily hold $100,000 worth of RUNE.
**RUNE for Network Security**
Node Operators must always have bonded twice as many RUNE as there is RUNE pooled. This ensures the protocol will remain solvent in perpetuity. In bonding this much capital, node operators are economically incentivised to work within the [network’s best interest](/thornodes/overview#risk-of-running-a-node). Thus it through economic security that network security is achieved.
**RUNE for Governance**
By symmetrically adding liquidity to a staged pool, users vote for the pools they want to become active. The deepest pools (i.e. with the most liquidity) become active.
{% hint style="info" %}
An introduction to RUNE and its roles is [here](/technical-documentation/understanding-thorchain#what-is-rune).
{% endhint %}
## 1. Liquidity
### **Transmitting Purchasing Power**
Since RUNE is pooled 50:50 alongside external assets in its pools, when the value of those assets increase/decrease, the RUNE pooled will also increase/decrease by being arbed out or in. The RUNE unit value may not change, but the quantity of RUNE in the pool does. This means the system is always aware of the value of the assets it is trying to secure - it's simply the quantity of RUNE in all its pools.
Once it is aware of the value of the assets it is securing, it can use incentives to ensure security of those assets.
{% hint style="info" %}
*A rule of thumb is for every $1m in multi-chain assets pooled in liquidity pools, $1m of RUNE is required to be pooled along side. Due to a mechanism called the Incentive Pendulum, $2m in RUNE will be driven to be bonded. Thus, $1m in main-chain assets will cause the total value of RUNE to be $3m in an equilibrium. Thus liquidity pools have a positive effect on the monetary base of RUNE.*
{% endhint %}
### **Providing Liquidity Incentives**
Since RUNE is the pooled asset, incentives can be paid directly into each pool. This extra capital is owned by the liquidity providers, and over time, slowly "purchases" the paired asset via arbitrage. Thus RUNE liquidity incentives can drive real yield to LPs.
### **Solving O(n^2) Problem**
Without a native settlement currency, each asset would need to be pooled with every other asset, which would eventually result in hundreds of new pools to be created for just one new asset, diluting liquidity. Having RUNE as the base pair allows any asset to be guaranteed to swap between any other asset.
| | | |
| ----------------------------------------- | ------------------------------------------- | -------------------------------------- |
| <p>No. of Assets</p><p>(eg. BTC, ETH)</p> | <p>No. of Pools</p><p>(Arbitrary Pairs)</p> | <p>No. of Pools</p><p>(RUNE Pairs)</p> |
| *n* | *pools = (n\*(n-1))/2* | *pools = n* |
| 12 | 66 | 12 |
| 24 | 276 | 24 |
| 100 | 4950 | 100 |
## 2. Security
### **Sybil-resistance**
Sybil-resistance refers to the ability to prevent someone masquerading as many identities in order to overcome a network. Bitcoin uses Proof-of-Work (one-cpu-one-vote) to prevent a network take-over. Ethereum 2.0 will use Proof-of-Stake (32-eth-one-vote) to prevent a network take-over.
THORChain is a **Proof of Bond** network instead. THORNodes commit a bond in order to be churned in. However, this bond isn't just used to identify a node (give them a voting slot), it is used to underwrite the assets in the pools. If the node attempts to steal assets, then their bond is deducted to the amount of the assets they stole (1.5x), and the pools are made whole. Additionally, if nodes misbehave their bond is slashed, ensuring reliable service.
### **Underwriting Assets**
The Incentive Pendulum ensures that Nodes are incentivised to maintain optimal bond levels to secure the network's assets. The bond is extremely liquid since RUNE is the settlement asset in all pools. See the [Economic Model](/technical-documentation/technical-deep-dive/economic-model) for detailed mechanics and calculations.
## 3. Governance
### **LPS: Signalling Priority for Assets**
While THORChain strives to be governance-minimal, there are some parts of the protocol that use committed capital to signal priority. This is the case for the asset listing process, where every few days a new asset can be listed as a pool. In a queue of standby assets, the one with the deepest commitment of RUNE is the one that is listed first.
### **LPs: Signalling Priority for Chains**
Additionally, if a connected chain is no longer economically valuable, then all liquidity providers in that chain can leave. If a pool is empty, it will be delisted, and this will cause the network to immediately sever ties with that chain in a process call a "ragnarok".
### **One-Node-One-Vote**
THORNodes each occupy one of the 120 slots in the system can can vote on changing network parameters using a mechanism called `node-mimir`.
## 4. Incentives
### **Fees**
RUNE is the native currency of THORChain and is consumed as transaction fees on the network. All swaps are charged both a fixed network fee, as well as a dynamic slip-based fee. This prevents various attack paths such as denial-of-service attacks, as well as sandwich attacks on a pool. Learn more about fees here:
{% content-ref url="/pages/K9qI3quGrONhi97sUDWI" %}
[Technical Deep Dive](/technical-documentation/technical-deep-dive)
{% endcontent-ref %}
### **Subsidising Gas**
The network continually consumes gas as it makes outgoing transactions (as well as internal transactions). Gas on networks such as Bitcoin and Ethereum becomes complicated fast, so THORChain doesn't make much of an effort to track every minutia of gas consumed. Instead, nodes are free to use at-will the base assets `BSC.BNB`, `ETH.ETH`, `BTC.BTC`, etc in order to pay for gas. These assets are used directly from the vaults. THORChain then observes outgoing transactions, reports on the gas used, and then pays back the liquidity providers in those pools to the value of twice the amount of gas used (in RUNE).
### **Paying out Emissions**
After fees are charged and gas is subsidised, then THORChain computes the block reward, divides it based on the Incentive Pendulum algorithm, and then pays out to Bonders and Liquidity providers.
This drives Nodes to bond the optimal amount, and pays Liquidity providers for their contribution of liquidity.
Learn about the Incentive Pendulum here:
{% content-ref url="/pages/FikFnYfwSpOPqmdgid4H" %}
[Economic Model](/technical-documentation/technical-deep-dive/economic-model)
{% endcontent-ref %}
## Deterministic Value of RUNE
RUNE's price has two factors: a deterministic value based on the liquidity within the network and a speculative premium. The economic security model creates a minimum value floor for RUNE based on the assets it secures. For detailed calculations and economic mechanics, see the [Economic Model](/technical-documentation/technical-deep-dive/economic-model).
## For more information on RUNE see
* [THORChain Tokenomics Article](https://medium.com/thorchain/thorchain-tokenomics-what-is-rune-52d339633260)
* [Under the Hood: Rune Supply](https://thorchain-community.medium.com/under-the-hood-rune-supply-d30772fdfbaf)
* [Current Supply Data](https://dashboards.thorchain.org/)
* [THORChain Tokenomics Dashboard](https://flipsidecrypto.xyz/BlockTracker/thorchain-tokenomics-g7ZOP_)
# Technology Overview
An overview of the technologies that make up THORChain
There are multiple modules and protocols that makes up THORChain. The tech stack can be broken down in the following key pieces:
* [Bifrost, TSS and Vaults](/technical-documentation/technology/bifrost-tss-and-vaults): THORChain is a leaderless vault manager with several components:
* 1-Way State Pegs: Syncs state from external chains to THORChain using the Bifröst Protocol.
* THORChain State Machine (TSS) protocol: Coordinates asset exchange logic, delegates transactions and enables distributed threshold key-signing.
* Bifröst Chain Client: Processes chain-specific transactions.
* [Midgard](/technical-documentation/technology/midgard): Midgard is a layer 2 REST API that provides front-end consumers with semi real-time rolled up data and analytics of the THORChain network.
* [Cosmos SDK](/technical-documentation/technology/cosmos-sdk): The Cosmos SDK is an open-source toolkit for building multi-asset public Proof-of-Stake (PoS) blockchains. There are multiple benefits from building an application-specific blockchain using the Cosmos SDK: Flexibility, Performance, Security and Sovereignty
* [CosmWasm](/technical-documentation/technology/cosmwasm): CosmWasm is a smart contracting platform built for blockchains that uses the Cosmos SDK, Simply put, it's the Cosmos (Cosm) way of using WebAssembly (Wasm) hence the name. With CosmWasm, teams can deploy smart contracts on THORChain directly
## Developer Resources
For technical implementation details including:
* Transaction memo formats and syntax
* API integration guides (THORNode, Midgard)
* Chain-specific integration requirements
* Smart contract deployment and aggregator contracts
* Affiliate fee implementation
* RPC and WebSocket endpoints
* Testing on stagenet
See the [THORChain Developer Documentation](https://dev.thorchain.org/)
# Bifrost, TSS and Vaults
An overview of THORChain's cross-chain bridge protocol, vault system, and threshold signature scheme.
## Overview
THORChain is a decentralized exchange (DEX) enabling native cross-chain swaps across different blockchains without wrapped assets or bridges. At its core, THORChain operates as a distributed vault manager using three key technologies:
1. **Bifrost Protocol** - Cross-chain bridge for observing and processing external chain transactions
2. **Vault System** - Two-layer architecture for secure asset custody
3. **Threshold Signature Scheme (TSS)** - Distributed key management for vault control
%20\(1\).png?alt=media)
## The Bifrost Protocol
Bifrost is THORChain's cross-chain bridge module that enables the protocol to interact with external blockchains. Each THORNode runs a Bifrost service that:
* Observes external blockchain transactions involving THORChain vaults
* Validates transactions through consensus (requires 67% agreement)
* Processes both instant-finality and delayed-finality chains
* Signs outbound transactions using TSS
When nodes observe an inbound transaction, they convert it into a standardi프로젝트로 돌아가기