bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 19쪽 중 4쪽
rgency changes difficult. In critical cases the **Ragnarök protocol** is used:
1. Nodes begin to leave the system.
2. When fewer than 4 nodes remain, Ragnarök triggers.
3. All funds are automatically returned to users.
4. The network shuts down safely and can be restarted later.
Halt and pause steps are in [Emergency Procedures](/thornodes/emergency-procedures), and what a halt stops is in [Network Halts](https://dev.thorchain.org/concepts/network-halts.html).
## Governance Philosophy
THORChain’s governance is minimal by design:
* avoids coordination between nodes
* reduces attack and capture risk
* lets market forces drive asset and chain selection
* reduces human overhead and governance fatigue
* keeps the system self-regulating and secure
# Fees
THORChain uses multiple fee types (Inbound, Liquidity, Affiliate, and Outbound) to ensure fair value exchange and network sustainability.
Fees in THORChain serve three purposes:
* **Value capture:** Liquidity providers are compensated in proportion to the demand placed on pool liquidity. See the [Fees dev docs](https://dev.thorchain.org/concepts/fees.html) for full information.
* **Access control:** Slip-based fees naturally throttle demand for scarce liquidity. In practice, this effect is moderated by:
* [Streaming Swaps](https://dev.thorchain.org/swap-guide/streaming-swaps.html), which split large swaps into smaller chunks to reduce single-block pressure.
* [`L1SlipMinBps` (Mimir)](https://dev.thorchain.org/mimir.html#swapping), which enforces a minimum slip (bps) per swap.
* **Resource costs:** Outbound fees cover destination-chain gas and protocol overhead using a dynamic multiplier (OFM).
## Additional benefits
* Spam/dust resistance: minimums and slip floors make abuse economically costly.
* Stable UX expectations: users see predictable fee components rather than raw external gas volatility.
* Long-term sustainability: see [Incentive Pendulum](/technical-documentation/technical-deep-dive/economic-model#incentive-pendulum) for how fees distribution adjust to balance liquidity and security.
## Fee overview
| Fee Type | What it covers | Where it’s paid / taken |
| ------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| Inbound Fee | Source-chain L1 transaction fee for sending funds into THORChain | Paid directly by the user to the source chain’s miners/validators (wallet-controlled gas) |
| Liquidity Fee | Slip-based swap fee that compensates LPs, proportional to liquidity demand | Deducted by the protocol during the swap (from the output) |
| Affiliate Fee | Optional integrator fee (0–10,000 bps) tied to a THORName | Skimmed on swap (see dev docs for ordering with Streaming Swaps) |
| Outbound Fee | Destination-chain gas × dynamic multiplier (OFM \~1–3×), which also covers protocol overhead | Deducted from the swap output; includes the THORChain network component |
{% hint style="info" %}
Transactions on the THORChain chain itself (e.g., native RUNE, trade-asset and secured-asset transfers) incur the Native Transaction Fee of 0.02 RUNE. See [Fees dev docs](https://dev.thorchain.org/concepts/fees.html).
{% endhint %}
## Inbound Fee
When you initiate a swap, you broadcast a transaction on the source chain and pay that chain’s normal L1 fee (e.g., sats/byte on Bitcoin, gwei on Ethereum). Using a “fast” gas setting is recommended so the swap isn’t delayed or refunded due to stale pricing. See [Inbound Fee](https://dev.thorchain.org/concepts/fees.html#1-inbound-fee).
## Liquidity Fee
THORChain’s CLP model applies a slip-based fee that scales with the amount of liquidity your swap consumes relative to pool depth—this compensates LPs and naturally throttles demand. In practice, two protocol features shape this effect:
* [Streaming Swaps](https://dev.thorchain.org/swap-guide/streaming-swaps.html): large swaps are split over time to reduce single-block pressure and improve execution for patient swappers.
* [`L1SlipMinBps` (Mimir)](https://dev.thorchain.org/mimir.html#swapping): enforces a minimum fee in basis points per swap, ensuring a floor even when pools are very deep.
For the slip math and derivations, see the [Fees dev docs](https://dev.thorchain.org/concepts/fees.html) and [Continuous Liquidity Pools](/technical-documentation/thorchain-finance/continuous-liquidity-pools).
## Affiliate Fee
Interfaces can include an optional affiliate fee (in basis points) that’s collected via a registered THORName. See the [Affiliate Fee dev docs](https://dev.thorchain.org/concepts/fees.html#3-affiliate-fee) for information, and how to configure preferred payout assets.
## Outbound Fee
To deliver your final asset, THORChain pays gas on the destination chain and charges an Outbound Fee from your swap output. This fee:
* Covers actual L1 gas and protocol overhead.
* Uses a dynamic Outbound Fee Multiplier (OFM) that moves between \~1× and 3× based on network and protocol factors.
* Is published via THORNode endpoints so integrators can budget precisely.
For implementation details, see the [Outbound Fee dev docs](https://dev.thorchain.org/concepts/fees.html#4-outbound-fee).
## Gas observation & process
Mechanics for gas observation, estimation, solvency checks, and per-chain behaviors are handled by [Bifrost](https://dev.thorchain.org/bifrost/how-bifrost-works.html) and its [Chain Clients](https://dev.thorchain.org/chain-clients/index.html). Refer to those pages for internals and per-chain specifics.
# THORChain Name Service
How THORNames (TNS) work
Website: <https://thorname.thorchain.org/>
## Overview
THORNames allow anyone to register cross-chain wallet addresses to a 1-30 long string of hexadecimal characters which include special characters `-_+` This makes them compatible to represent emojis ⚡️. THORNames are case insensitive.
Users use a special memo and a THORChain `MsgDeposit` transaction to register their addresses. This then allows the system to lookup the name and retrieve the correct corresponding address for the specified chain.
A THORChain address can be assigned one (1) THORName to manage the other addresses associated. For example: the THORName chris can receive $BTC to the chris.btc address, chris.eth to receive $ETH and so forth. Wallet providers will easily be able to integrate to resolve cross-chain addresses for a user.
Example from <https://gateway.liquify.com/chain/thorchain_midgard/v2/thorname/lookup/td>
```json
{
"entries": [
{
"address": "0xee7ba2d9eca389928a628bf26ea87e65a5c27eca",
"chain": "AVAX"
},
{
"address": "qznskghhug46gxkx8ykxqxj4kmczge6zjg9trsgf5d",
"chain": "BCH"
},
{
"address": "0xee7ba2d9eca389928a628bf26ea87e65a5c27eca",
"chain": "BSC"
},
{
"address": "bc1qqtuq6td6enadcz8v7t2eafph0pq0cfjw2mzug9",
"chain": "BTC"
},
{
"address": "DBVz9bMNtDYrVLGqwhiFUzpYGcQu1B3PuR",
"chain": "DOGE"
},
{
"address": "0xe020c8934b23e5bcca1e7eecdb6f39674029fe47",
"chain": "ETH"
},
{
"address": "cosmos10w52zp06zccjq8zv9sh77p3n2c8sc559q5yl0z",
"chain": "GAIA"
},
{
"address": "thor1ymkrqd4klk2sjdqk7exufa4rlm89rp0h8n7hr2",
"chain": "THOR"
}
],
"expire": "23726750",
"owner": "thor1ymkrqd4klk2sjdqk7exufa4rlm89rp0h8n7hr2"
}
```
Currently, there are eleven (11) native L1 chains available on THORChain: Bitcoin, Ethereum, Litecoin, Binance Smart Chain, Bitcoin Cash, Doge, Cosmos, Avalanche, Base, TRON and XRP. THORNames are limited to 30 characters, including `^[a-zA-Z0-9+_-]+$`.
### Query a THORName
A THORName can be queried by going to `/thorname/{thorname}`
{% hint style="info" %}
<https://gateway.liquify.com/chain/thorchain_midgard/v2/thorname/lookup/orion>
{% endhint %}
A THORName can be checked using `/thorname/lookup/{thorname}`
{% hint style="info" %}
<https://gateway.liquify.com/chain/thorchain_midgard/v2/thorname/lookup/orion>
{% endhint %}
While there is no reverse on-chain reverse lookup, a reverse lookup is possible within THORChain via using a given THORName `/thorname/lookup/{address}.`
{% hint style="info" %}
Example using a THOR address: <https://gateway.liquify.com/chain/thorchain_midgard/v2/thorname/rlookup/thor15r77zzt7n6kyydw7ajkefdrrv6n0dpplvm83pd>
{% endhint %}
## Fees
There is a one-time registration fee of around 10 RUNE, with a 20 `tor` block fee, which works out to be around 1 RUNE annually. A user who pays 2 RUNE will then keep their name registered for 2 years. Fees are controlled by Constants/Mimir, the current settings are:
* `TNSRegisterFee`: 10 RUNE
* `TNSFeeOnSale`: 1000 Basis Points
* `TNSFeePerBlock`: 20 tor per block (roughly 1 RUNE per year)
Example: a 20 Rune registration registers the THORName for 10 years. (10 RUNE Registration Fee + 1 RUNE every year).
## Creating a THORName
THORNames are created by sending a memo in a MsgDeposit with [memo](https://dev.thorchain.org/affiliate-guide/thorname-guide.html) prefix: `name`, `n` or `~`
Memo template is: `~:name:chain:address:?owner:?preferredAsset:?expiry`
{% hint style="info" %}
Example: `~:ODIN:BTC:bc1Address:thorAddress:BTC.BTC:1231231`
{% endhint %}
Expiry is a block height that can be set in the past to unregister the THORName.
### **Technical Rationale**
Bitcoin has a memo length limitation of 80 bytes and Monero has an address length of 97 bytes. This means swapping from Bitcoin to Monero is not possible using addresses, THORNames solves this issue and can also be used when specifying the affiliate address.
{% hint style="info" %}
Swap example comparison using THORNames.
Without:
`=:BTC.BTC:bc1fx6fsev97atsm5j62kgecpslv6vx2nffv0qq2q:2117277:0500:bc1q6ptu8zayukjz3ag4d4pnjjhtxwd4jckh9gufwu`
`With:`
`=:BTC.BTC:ODIN:2117277:0500:ORION`
107 characters without THORNames, 33 characters with THORNames.
{% endhint %}
Interfaces like [AsgardEx Desktop](https://github.com/asgardex/asgardex-desktop/releases) allow you to create your own memo.
## More Information
THORChain launched THORNames in June 2021, read more here <https://medium.com/thorchain/thorchain-launches-thorname-service-abe42ba11df8>.
# THORChain Finance
THORChain Finance - A comprehensive overview of financial primitives and mechanisms within the THORChain ecosystem
THORChain Finance encompasses the core financial primitives that enable cross-chain liquidity and trading on the THORChain network. These mechanisms provide the foundation for decentralized finance (DeFi) operations while maintaining security and efficiency across multiple blockchain networks.
## Core Financial Primitives
### [Continuous Liquidity Pools](/technical-documentation/thorchain-finance/continuous-liquidity-pools)
The foundation of THORChain's AMM (Automated Market Maker) system, enabling permissionless liquidity provision and efficient asset swapping across chains without wrapped tokens.
### [Trade Assets](/technical-documentation/thorchain-finance/trade-assets)
A capital-efficient alternative to synthetic assets, offering 2x the efficiency for arbitrageurs with 6-second finality and no slippage redemption.
### [Secured Assets](/technical-documentation/thorchain-finance/secured-assets)
THORChain's approach to maintaining asset security through distributed key management and threshold signature schemes (TSS).
### [TOR](/technical-documentation/thorchain-finance/tor)
THORChain's native algorithmic stablecoin, designed to maintain price stability while integrating with the broader THORChain ecosystem.
### [RUNEPool](/technical-documentation/thorchain-finance/runepool)
Pooled liquidity provision mechanism that allows smaller RUNE holders to participate in liquidity provision with lower barriers to entry.
## Economic Model
THORChain's financial architecture is built around the **Incentive Pendulum**, which maintains a 2:1 bond-to-stake ratio ensuring network security. The native RUNE token serves four critical roles:
* **Settlement Asset**: All cross-chain swaps settle in RUNE
* **Security**: Node operators bond RUNE to participate in consensus
* **Liquidity**: Liquidity providers pair RUNE with external assets
* **Governance**: RUNE holders participate in network governance decisions
## Key Features
* **Cross-Chain Native**: Direct swaps between native assets across different blockchains
* **Permissionless**: No centralized authority controls access or operations
* **Capital Efficient**: Advanced mechanisms like Trade Assets maximize capital utilization
* **Secure**: Distributed key management protects user funds across all supported chains
* **Transparent**: All operations are verifiable on-chain
## Getting Started
Choose the primitive that best fits your needs:
* **New to DeFi**: Start with [Continuous Liquidity Pools](/technical-documentation/thorchain-finance/continuous-liquidity-pools)
* **Active Trader**: Explore [Trade Assets](/technical-documentation/thorchain-finance/trade-assets) for efficient arbitrage
* **Stability Seeker**: Learn about [TOR stablecoin](/technical-documentation/thorchain-finance/tor)
* **RUNE Holder**: Consider [RUNEPool](/technical-documentation/thorchain-finance/runepool) for passive liquidity provision
# Continuous Liquidity Pools
How THORChain facilitates continuous, incentivised liquidity.
Instead of limit-order books, THORChain utilises [continuous liquidity pools](#continuous-liquidity-pools) (CLP). The CLP is one of THORChain's most significant features, offering the following benefits:
* Provides “always-on” liquidity to all assets in its system.
* Allows users to trade assets at transparent, fair prices, without relying on centralised third-parties.
* Functions as source of trustless on-chain price feeds for internal and external use.
* Democratises arbitrage opportunities.
* Allows pools prices to converge to true market prices, since the fee asymptotes to zero.
* Collects fee revenue for liquidity providers in a fair way.
* Responds to fluctuating demands of liquidity.
## Benefits of the CLP Model
Assuming a working Swap Queue, the CLP Model has the following benefits:
* The fee paid asymptotes to zero as demand subsides, so price delta between the pool price and reference market price can also go to zero.
* Traders will compete for trade opportunities and pay maximally to liquidity providers.
* The fee paid for any trade is responsive to the demand for liquidity by market-takers.
* Prices inherit an "inertia" since large fast changes cause high fee revenue
* Arbitrage opportunities are democratised as there is a diminishing return to arbitrage as the price approaches parity with reference
* Traders are forced to consider the "time domain" (how impatient they want to be) for each trade.
The salient point is the last one - that a liquidity-sensitive fee penalises traders for being impatient, however traders have a [choice](#streaming-swaps-and-swap-optimisation). This is an important quality in markets, since it allows time for market-changing information to be propagated to all market participants, rather than a narrow few having an edge.
### Slip-based Fee Model (CLP)
The Slip-based Fee Model adds liquidity-sensitive fee compared to the [XYK](#clp-derivation)model. This ensures the fee paid is commensurate to the demand of the pool's liquidity, and is the one THORChain uses. The fee equation is shown below:
$$
fee = \frac{x^2Y}{(x+X)^2}
$$
### Streaming Swaps and Swap Optimisation
THORChain allows users to choose their preferred trade strategy:
1. Time-optimised: Get the trade done quickly, regardless of the cost.
2. Price-optimised: Get the best price possible, even if it takes longer.
The size of the swap and the desired timeframe are related. Impatient swappers who opt for a time-optimised swap will incur higher [slip fees](#benefits-of-the-clp-model). Patient swappers achieve better prices but need to wait.
Previously, swaps were always executed as soon as possible (time-optimised), without user control. Manual optimisation of prices required breaking up swaps into smaller ones, incurring L1 inbound and outbound fees for each swap, reducing cost savings.
Streaming Swaps gives users control over the timeframe, enabling better price optimisation. Large swaps can be divided into smaller ones over specific intervals without additional L1 fees.
Streaming Swaps (Price-Optimised) is similar to a Time Weighted Average Price (TWAP) trade, limited to a 24-hour period.
Two important parts are:
1. The **interval** allows arbitrageurs enough time to rebalance the pool within the swap, ensuring capital requirements are met throughout.
2. The **count** enables the swapper to reduce the size of sub-swaps, minimising slippage for each execution.
A price-optimised swap experiences less slippage compared to a time-optimised swap, without losing capital to on-chain L1 fees.
A fully price-optimised swap can achieve a swap fee as low as 5 basis points (excluding inbound and outbound fees).
Swappers can set a price limit (minimum output). If sub-swaps cannot achieve the specified price during the swap stream, the total or partial inbound amount will be refunded.
{% hint style="info" %}
Streaming Swaps are currently enabled for Swaps. Streaming Swaps were previously available for the deprecated Savers and Lending features.
{% endhint %}
## Continuous Liquidity Pools
### CLP Derivation
| Element | Description | Element | Description |
| ------- | ------------- | ------- | -------------- |
| x | input amount | X | Input Balance |
| y | output amount | Y | Output Balance |
Start with the fixed-product formula:
$$
Eqn 1: X\*Y = K
$$
Derive the raw "XYK" output:
$$
Eqn 2: \frac{y}{Y} = \frac{x}{x+X} \rightarrow y= \frac{xY}{x+X}
$$
Establish the basis of Value (the spot purchasing power of `x` in terms of `Y` ) and slip, the difference between the spot and the final realised `y`:
$$
Eqn 3: Value\_y = \frac{xY}{X}
$$
$$
Eqn 4: slip =\frac{Value\_y - y}{Value\_y} =\frac{( \frac{xY}{X})-y}{ \frac{xY}{X}} = \frac{x}{x+X}
$$
Derive the slip-based fee:
$$
Eqn 5: fee = slip \* output = \frac{x}{x+X} \* \frac{xY}{x+X} = \frac{x^2Y}{(x+X)^2}
$$
Deduct it from the output, to give the final CLP algorithm:
$$
Eqn 6: y = \frac{xY}{x+X} - \frac{x^2Y}{(x+X)^2} \rightarrow y= \frac{ xYX} {(x+X)^2 }
$$
Comparing the two equations (Equation 2 & 6), it can be seen that the Base XYK is simply being multiplied by the inverse of Slip (ie, if slip is 1%, then the output is being multiplied by 99%).
## Evolution of the CLP Model
### Pegged Model
The simplest method to exchange assets is the pegged model, (1:1) where one asset is exchanged one for another. If there is a liquidity pool, then it can go insolvent, and there is no ability to dynamically price the assets, and no ability to intrinsically charge fees:
$$
Eqn 8: y = x
$$
### Fixed Price Model
The fixed-sum model allows pricing to be built-in, but the pool can go insolvent (run out of money). The amount of assets exchanged is simply the spot price at any given time:
$$
Eqn 9: y = \frac{xY}{X}
$$
### Fixed Product Model
The fixed-product model (Base XYK above), instead bonds the tokens together which prevents the pool ever going insolvent, as well as allowing dynamic pricing. However, there is no intrinsic fee collection:
$$
Eqn 10: y= \frac{xY}{x+X}
$$
### Fixed-Rate Fee Model
The Fixed-Rate Fee Model adds a 30 Basis Point (0.003) (or less) fee to the model. This allows fee retention, but the fee is not liquidity-sensitive:
$$
Eqn 11: y= 0.997 \* \frac{xY}{x+X}
$$
### Slip-based Fee Model (CLP)
The Slip-based Fee Model adds liquidity-sensitive fee to the model. This ensures the fee paid is commensurate to the demand of the pool's liquidity, and is the one THORChain uses. The fee equation is shown separate (12b), but it is actually embedded in 12a, so is not computed separately.
$$
Eqn 12a: y= \frac{ xYX} {(x+X)^2 }
$$
$$
Eqn 12b: fee = \frac{x^2Y}{(x+X)^2}
$$
{% hint style="warning" %}
The sli프로젝트로 돌아가기