THORChain 백서

THORChain

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 19쪽 중 3쪽

/t.me/thorchain_org) - Telegram Server [**THORChain Dev Discord**](https://discord.gg/u6wMSKHpD4) - Discord Server [**Asgardex**](https://discord.gg/W9hGFBmCGp) - Discord Server [**ShapeShift**](https://discord.gg/shapeshift) - Discord Server [**THORSwap**](https://discord.gg/thorswap) - Discord Server [**THORWallet DEX**](https://discord.gg/gzs8skbaR3) - Discord Server [**Vultisig**](https://discord.gg/rzKjMMwjwU) - Discord Server ### Regional Socials Russian: <https://t.me/ThorchainRussian> Chinese: <https://t.me/thorchain_chinese> Italian: <https://t.me/THORChain_Italy> Portuguese: <https://t.me/thorchainportuguese> French: <https://t.me/THORChainFr> Spanish: <http://t.me/THORChain_es> Dutch: <https://t.me/nl_be_thorchain_rune> German: <https://t.me/ThorChainGermany> Vietnamese: <https://t.me/Thorchain_Rune_Vietnam> Indian: <https://t.me/thorchainIndia> # Technical Deep Dive Technical deep dive into THORChain's design and core mechanics This section explains the core technical concepts behind THORChain. It is aimed at readers who want to go beyond the user-facing features and understand how the protocol is designed. Each topic links to a dedicated page with more detail. ## Topics ### [Protocol Innovations](/technical-documentation/technical-deep-dive/protocol-innovations) The main design choices that make THORChain unique, including validator selection, churning, upgrades, the Bifrost protocol, Incentive Pendulum, liquidity pools, and the swap queue. ### [Economic Model](/technical-documentation/technical-deep-dive/economic-model) How RUNE supply, the Incentive Pendulum, the emission schedule, and the Reserve work together to align incentives and secure the network. ### [Security](/technical-documentation/technical-deep-dive/security) THORChain’s multi-layered security approach, including bonded capital, validator rotation, solvency checks, and operational processes. ### [Governance](/technical-documentation/technical-deep-dive/governance) How THORChain handles minimal governance, including asset and chain listings, protocol upgrades, the Mimir system, and ADRs. ### [Fees](/technical-documentation/technical-deep-dive/fees) Overview of THORChain’s fee structures: swap fees, outbound fees, and network fees, and how they protect the network while rewarding participants. ### [THORChain Name Service](/technical-documentation/technical-deep-dive/thorchain-name-service) The system for human-readable cross-chain addresses, simplifying transactions without needing long cryptographic strings. ## Related Sections * [Technology Overview](/technical-documentation/technology) – high-level explanation of how THORChain works * [THORNodes](https://github.com/thorchain/docs/tree/master/thornodes/README.md) – running validator nodes and infrastructure details * [THORChain Finance](/technical-documentation/thorchain-finance) – financial mechanisms and protocol products * [Understanding THORChain](/technical-documentation/understanding-thorchain) – user-focused introductions # Protocol Innovations The core innovations that make THORChain unique in cross-chain DeFi THORChain was built with the principles of decentralisation, resistance to capture, and sustainability. It introduced several firsts in cross-chain DeFi that allow secure liquidity without wrapped tokens or trusted intermediaries. ## Key Innovations ### Capped Proof of Bond Validators must bond RUNE to join the network. Bond amounts are capped so no single validator can dominate, keeping the set geographically and operationally distributed. There is no delegation — each validator must run their own node infrastructure. ### Validator Churning Validators rotate every few days. The oldest or lowest-bonded validators are replaced by new entrants. Each churn proves that funds remain spendable, prevents stagnation, and ensures the network is always refreshed. ### Asynchronous Upgrades When a new version of the protocol is released, validators upgrade at their own pace. Once a supermajority is running the new version, it becomes the active consensus. This avoids forks, downtime, or the need for coordinated hard-fork events. ### Bifrost Protocol Bifrost is THORChain’s chain-agnostic client framework. It connects THORChain to different types of blockchains through a common interface: * **UTXO chains** (Bitcoin, Litecoin, Dogecoin, Bitcoin Cash) * **EVM chains** (Ethereum, Avalanche, BSC) * **BFT chains** (Cosmos SDK)\ This standardisation allows THORChain to add support for very different chains without changing its core logic. ### Incentive Pendulum Rewards are split between validators and liquidity providers. The Incentive Pendulum automatically adjusts this split to maintain the target **2:1 bond-to-stake ratio**. If liquidity grows faster than security, more rewards flow to validators, and vice versa. ### Continuous Liquidity Pools Pools never close and allow single-sided deposits. Fees are slip-based: larger trades pay proportionally higher fees. This ensures efficient pricing, keeps pools balanced, and prevents large trades from manipulating prices. ### Swap Queue Swaps are ordered by price impact in each block. This stops front-running and sandwich attacks (common forms of MEV), ensuring fair execution for all users. ## Network Goals THORChain contributors continue to work towards three goals: * **Security**: Functional tools like the Solvency Checker and Node Pause; procedural safeguards such as Stagenet testing and peer reviews; and economic security through bonded RUNE. * **Liquidity**: Grow liquidity depth so users can swap large amounts across chains with low slippage. * **Volume**: Increase network usage through wallet integrations, developer tools, and improved swap UX. # Economic Model THORChain's economic model including the Incentive Pendulum and emission schedule THORChain’s economic model is designed to maintain network security, ensure liquidity efficiency, and sustain long-term protocol viability. It does this through a combination of the Incentive Pendulum, an emission schedule from the Reserve, and defined inflows and outflows. ## Incentive Pendulum The Incentive Pendulum automatically adjusts reward distribution between node operators and liquidity providers to maintain the correct balance between security and liquidity. The system monitors the ratio of bonded RUNE (from node operators) to pooled assets: * If there is too much liquidity relative to bonded security, the network is unsafe, so rewards shift toward nodes. * If there is too much bonded capital relative to liquidity, the network is inefficient, so rewards shift toward liquidity providers. This creates a self-balancing system that maintains the target **2:1 bond-to-stake ratio**, which is central to THORChain's security model. <img src="https://3337783180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfvaTNxU33ciP7UstKtwU%2Fuploads%2Fgit-blob-60a7c94c1933dad372eaa94f503bc5da3614b7ff%2Fincentive-pendulum.png?alt=media" alt="Incentive Pendulum diagram showing the balance between bonded RUNE and pooled assets" width="500"> {% hint style="success" %} Detailed documentation on the Incentive Pendulum can be found in the [developer documentation](https://dev.thorchain.org/concepts/incentive-pendulum.html). {% endhint %} ## Emission Schedule ### Token Distribution There are a maximum of **\~360M RUNE** (reduced from 500M per [ADR-023](https://dev.thorchain.org/architecture/adr-023-rune-supply-restructure.html)). Exact max and circulating supply change with burns — use [rune.tools/supply](https://rune.tools/supply) for live figures, or the [Economic Model](https://dev.thorchain.org/concepts/economic-model.html) for protocol detail. All supply was created at genesis and originally distributed as follows: * 5% (SEED) and 16% (IDO) sold for capital to start the network and give it value. * 10% allocated to early developers who worked since 2018. * 24% given to users who participated in network bootstrapping. * 44% placed in the Protocol Reserve to pay out to nodes and LPs for the next 10+ years. {% hint style="success" %} All vesting has been completed. ADR-023 later burned most of the Reserve and capped max supply near total supply. {% endhint %} The [Reserve module](https://runescan.io/address/thor1dheycdevq39qlkxs2a6wuuzyn4aqxhve4qxtxt) and [other modules](https://runescan.io/addresses) can be viewed on RuneScan. ### Block Rewards Block rewards are calculated as: $$ blockReward = \frac{ \frac{reserve}{emissionCurve}}{blocksPerYear} $$ {% hint style="info" %} The [emission curve](https://dev.thorchain.org/mimir.html#economics) is currently set to 100,000, so block rewards are minimal (on the order of hundreds of RUNE per year). Live values: [Mimir](https://gateway.liquify.com/chain/thorchain_api/thorchain/mimir). {% endhint %} # Security Describes the different security elements within THORChain THORChain has several layers of security within the code base to ensure solvency of the network, stability of the protocol and minimise the impact of any exploit. These measures are in addition to human security efforts, see more information [here](https://medium.com/thorchain/thorchains-layers-of-security-e308d537acf1). ## Confirmation Counting To protect against double-spend attacks and re-orgs (non-instant finality chains), THORChain uses Confirmation Counting for specific chains when receiving incoming value. [Bifrost](/technical-documentation/technology/bifrost-tss-and-vaults#the-bifrost-protocol) informs THORChain when to process the incoming value. How many confirmations are required is dependent on the size of the incoming value. See more full details [here](https://dev.thorchain.org/bifrost/how-bifrost-works.html#finality--pre-confirmation). ## Outbound Transaction Throttling To prevent large amounts of funds from leaving the network in an instant, large outbound transactions are throttled from immediately leaving the network. Each block has an outbound value limit (currently 1000 RUNE worth) and each outbound transaction has a maximum time limit that it can be processed. This has three effects: * Each outbound transaction to compete for the next outbound block, else, it will be processed in the following block, effectively throttling the total outbound capacity of the network. This is independent of [conf-counting](#confirmation-counting). * Large outbounds to spread across multiple blocks, up to 720 blocks (approx one hour). * Ensures one large outbound request of $1,000,000 is handled the same as one million $1 outbound requests. This feature is controlled by several [Mimir](https://dev.thorchain.org/mimir.html#outbound-transactions) values that can be changed by Node Operators as required. This serves as a defensive layer buying time and allowing a vigilant node operator to pause trading or automatically halt checks to engage before the large malicious outbound transaction is irreversibly executed and funds are lost. While the feature negatively impacts the user experience of THORChain, it is necessary in ensuring the protection of liquidity provider and protocol funds. The feature is designed to grow as the network grows and is controlled by several Mimir values that can be changed by Node Operators as required. Additionally, the feature is designed to promote bug disclosure instead of directly attacking the network as a bug disclosure is likely more profitable. Delayed outbound transfers can be viewed on the [THORChain Tracker](https://track.thorchain.org/). ## Granular Halting Controls via Node Mimir THORChain has different levels of halt controls within the network which are controlled by Mimir values or by nodes, depending on the type and level. The votes needed to set a halt are in [Mimir Types](/technical-documentation/technical-deep-dive/governance#mimir-types). The halts that can affect an individual chain are: 1. Halt Signing - outbounds queue and are not signed 2. Halt LP - add/remove stopped, swapping allowed. 3. Halt Trading - no trading allowed 4. Halt Chain - nodes stop observing that chain All halt controls, and what each one stops, are listed in [Network Halts](https://dev.thorchain.org/concepts/network-halts.html). ## Automatic Solvency Checker The solvency checker of the network’s Asgard vault was introduced to catch issues early. Detected issues can trigger an automatic [trading halt](https://dev.thorchain.org/concepts/network-halts.html#halt-pause-management) on a specific chain. THORChain’s Asgard vault is made up of several [physical vaults](/technical-documentation/technology/bifrost-tss-and-vaults#two-layer-vault-design), each with its own address on every connected chain. For each physical vault, each node compares the balance THORChain has recorded with the balance actually held at that vault’s address. If the recorded balance is more than the on-chain balance by over [$500](https://dev.thorchain.org/mimir.html#solvency-checker) (controlled by `PermittedSolvencyGapUSD`) for any asset, the node reports that vault as insolvent for that chain. ### Automatic Trading Halting If at least 1/3 of the active nodes, rounded up (`signers >= ceil(N/3)`), report the same vault as insolvent on a chain, that chain is automatically halted (`SolvencyHalt{Chain}Chain`). Swaps and adding or removing liquidity stop, outbounds are held until the halt lifts, and the affected vault is no longer used for new deposits. The halt is recorded on-chain as a Mimir change, which monitoring alerts on. The halt lifts automatically once the vault is solvent again. ### Why is a difference allowed? THORChain builds an awareness of balances purely by adding the incoming funds, then subtracting the outgoings. Thus the recorded balance is the aggregate of the ins and outs. Divergences can occur when actual on-chain balances start to diverge, for example while outbounds are in flight or when the gas paid differs from the estimate. The allowance is a fixed amount per asset rather than a percentage, and only a shortfall counts, so extra funds at a vault address never triggers a halt. ### Node Operator Triggered Halts Node Operators have the ability to halt trading within THORChain if they detect malicious activity. This is in addition to automatic chain-specific halting functionality. The ability has been made with the potential for abuse in mind. A single node can [pause trading](/thornodes/emergency-procedures#network-halts) (`HaltTrading`) for up to an hour (720 blocks). Any additional node that calls for a halt will add 720 blocks to the halt timer. Any node that calls for the resumption of trading removes 720 blocks from the timer. The halt functions can only be called once by each active node per [churn cycle](https://dev.thorchain.org/mimir.html) (3 days). This gives the network the ability to respond to a malicious threat without giving any node unilateral control. ### Unauthorized Transaction Detection This blanket protection will automatically pause THORChain on a specific chain (`HaltSigning{Chain}` and `Halt{Chain}Trading`) if an unauthorised transaction is detected. The nodes in that vault are slashed by more than the amount taken, and the pool is made whole. This will emit an on-chain security event, which monitoring alerts on. The halt will allow Node Operators, THORSec, and the development team to investigate and react immediately following an unauthorised transaction and issue a fix and restore service as quickly as possible. ## Automatic Security Flagging Security events have been added within the code which automatically emits events when certain conditions are met such as node slashing for unauthorized transactions, attempted double-spending, or very large withdrawals. Emitted events are sent to a THORSec Discord monitoring channel for immediate review. These emitted on-chain events can also be seen on Midgard. # Governance THORChain's minimal governance system and parameter management through Mimir THORChain aims to have as little governance baked into the system as possible. This prevents nodes from coordinating or learning who one another are, which improves security by making collusion difficult. THORChain governance decides: * which assets are listed or delisted * which chains are listed or delisted * when the protocol is upgraded ## Asset Listing ![New Assets](https://3337783180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfvaTNxU33ciP7UstKtwU%2Fuploads%2Fgit-blob-778d5019efbc75ef00acd600c90c19fb8dfb67f3%2FListing%20New%20Assets.jpg?alt=media) Users signal which assets they want on the network by staking into a new pool. THORChain will recognise it as a new asset and create a pool in *bootstrap mode* (swapping disabled). Every few days the network checks all bootstrap pools and lists the one with the most value. ### Asset Delisting Assets are delisted automatically when their liquidity falls too low: 1. New bootstrap pools are compared to the smallest active pools. 2. If a bootstrap pool is deeper, the smallest active pool is returned to bootstrap mode and replaced. 3. Assets can later be re-listed if liquidity returns. ## Chain Listing and Delisting To add a new chain: 1. Community developers write a new Bifröst module and propose it via a [THORChain Improvement Proposal (TIP)](https://dev.thorchain.org/architecture/). 2. The developer community reviews and decides whether to accept it. 3. If accepted, code is tested and added to THORNode. 4. Nodes upgrade as they churn in and out. 5. When 67% of nodes run the new software, the chain connects. To delist a chain, nodes stop watching it. Once 67% of nodes are no longer watching, the chain is removed and assets are returned to users. ## Mimir - Network Settings THORChain operates with a set of constants that define fees, limits and security thresholds. Constants are set within the network however some can be overridden through Mimir. Some other Network settings are Mimir only. Live values: * [Network Constants](https://gateway.liquify.com/chain/thorchain_api/thorchain/constants) * [Mimir Settings](https://gateway.liquify.com/chain/thorchain_api/thorchain/mimir) See [Constants and Mimir](https://dev.thorchain.org/mimir.html) within the developer documentation for a description of each one. ### Mimir Types Mimir values can be changed by Node operators voting and the amount of votes required to change a Mimir value depends on its type. Operational Mimirs are the network controls a few active nodes can change without a supermajority. Examples are [halts](https://dev.thorchain.org/concepts/network-halts.html) and the 'REVSHARE' Mimirs. The value with more votes than any other wins, and only with at least `OperationalVotesMin` votes. A tie, or votes below `OperationalVotesMin`, leaves the stored value as it is. The node vote is still recorded. `OperationalVotesMin` is a network constant set to 3 but see the live values for the latest values. Changing it takes the economic vote. Economic Mimirs are network controls that have a significant impact on the network or its economics. They generally are fees, economic management, node management, and limits. A change needs a 2/3 supermajority of the active nodes on the same value, rounded up (`signers >= ceil(2N/3)`), e.g. 66 of 99 or 67 of 100 nodes. Economic Mimirs generally override network constants set in the code. How a node votes is in [Node Voting](/thornodes/overview#node-voting). ## Change Management Protocol-level changes use **Architecture Decision Records (ADRs)**. An ADR should describe: * context and goals * the proposed change * pros and cons * references * changelog Process and status can be found here: * [ADR Process](https://dev.thorchain.org/architecture/PROCESS.html) * [Current ADRs](https://dev.thorchain.org/architecture/index.html) ## Emergency Changes Nodes cannot directly coordinate, which makes eme
프로젝트로 돌아가기