Chainflip is a native cross-chain exchange protocol built on the Substrate framework of Polkadot, with the goal of creating a method for exchanging digital assets without the need for centralized exchanges.
Authored by: Shawn, E2M Research
Currently, with the popularity of various Bitcoin script protocols, more and more users are using Bitcoin chain wallets for transactions. Since Bitcoin itself does not support smart contracts, it is not possible to exchange tokens like on Ethereum using smart contracts. This has created a demand for native Bitcoin cross-chain exchanges, such as exchanges between native BTC and ETH. The advantage of this exchange method is that users can complete transactions directly between their own wallets without transferring assets to an exchange. Although this market is still in its early stages, it is expected to experience significant growth in the coming years with technological advancements and increased adoption.
Projects currently focusing on native cross-chain exchanges include Thorchain, Maya Protocol, and Chainflip. Maya Protocol is a forked version of Thorchain, both built on the Cosmos SDK. Chainflip, on the other hand, is built on the Substrate framework of Polkadot, and this article primarily introduces the Chainflip protocol.
Introduction
Chainflip is a native cross-chain exchange protocol with the goal of creating a method for exchanging digital assets without the need for centralized exchanges. By using Chainflip, users can directly exchange assets on their respective blockchain networks without the need for intermediaries or trusted third parties. This method enhances transaction security and efficiency while reducing transaction costs.
The core idea of Chainflip is to use MPC (multi-party computation), particularly TSS (threshold signature scheme), to create an aggregate key held by a permissionless network of 150 validators.
These validators simultaneously control smart contracts/wallets on multiple blockchains (referred to as Vaults), forming a fully decentralized "settlement layer." This pairs with the "accounting layer," which uses a Substrate-based application chain (referred to as the Chainflip state chain) to track balances, process events, and execute instructions. These systems result in a fully decentralized universal cross-chain exchange protocol.
Its structure is illustrated in the following diagram:
The advantages of native cross-chain value conversion include:
- Value conversion independent of chains and wallets, allowing users to use regular wallets for value conversion on any chain.
- Value conversion without involving any wrapped assets, synthetic assets, or other assets, with users only needing to submit a regular transaction for the exchange, and facing no additional asset risks after the exchange.
- Chainflip does not require additional deployment or execution of other protocols on specific chains, providing higher compatibility and universality, and minimizing the computational process off-chain to reduce user gas consumption.
Features
Decentralization
A notable feature of Chainflip is its decentralized nature, primarily reflected in the design of its validation nodes. The Chainflip protocol consists of 150 validators who collectively control and protect critical information within the protocol. In a decentralized design, this number of nodes not only significantly enhances system security but also reduces the risks associated with single points of failure. Its main features include:
- Up to 150 validators can simultaneously participate in the protocol's permission set. They collectively operate almost all functions of the protocol and jointly control all funds in the system.
- All validator slots are completely permissionless, and any operator with sufficient $FLIP can become a member of the permission set after outbidding others in an auction.
- Each individual validator has its own set of private keys for participating in the consensus of the state chain and generating secrets for TSS key generation and signing.
- Each validator also monitors all supported external chains for witnessing, functionally acting as its own decentralized inbound oracle.
- Using TSS protocol in collaboration with other validators and external blockchains, validators also broadcast transactions to send funds outside the protocol. Similarly, the network acts as its own decentralized relayer.
JIT (Just In Time Liquidity) AMM
Uniswap v3 introduced the concept of range orders to the AMM world, bringing many improvements in capital efficiency and user experience. As a cross-chain product, Chainflip does not have the same execution environment assumptions as typical AMMs, requiring additional functionality to prevent front-running from negatively impacting users. Unlike in a single-chain environment, Chainflip must address the following issues:
- Due to the risk of chain reorganization outside of Chainflip, the protocol must wait for several blocks to confirm external chain deposits. As a decentralized and programmatic system, if this occurs, transactions cannot be manually reordered, requiring multiple block confirmations for safe operation. Given the delay in confirming incoming Swap deposits and their location on public chains, all market participants will know the trades to be executed before the Swap occurs, making the protocol susceptible to various forms of front-running.
- Additionally, confirmation times lead to significant delays in pricing and arbitrage, resulting in long-term price discrepancies compared to market index prices.
- Finally, new features proposed by AMMs have largely gone untested, as existing AMM designs were not built with custom execution environments in mind, leaving few protocol examples with similar attributes for study.
As a result, Chainflip introduces the JIT AMM protocol, with two core functionalities:
- Faster range order updates than Swap trades - range orders can be updated before known Swap execution, allowing market makers to actively respond to incoming trade flows.
- Swap batching - Swaps are grouped together and executed regularly, eliminating significant slippage and making front-running unprofitable.
Its main working principles are:
Each liquidity pool has a fixed liquidity fee (most pools range from 5 to 30 basis points), and market makers obtain these liquidity fees by adjusting their liquidity positions to market prices. Market prices are determined by immediate liquidity availability on independent primary and secondary markets (including centralized exchanges, derivative markets, and any other liquidity sources) before the swap is executed. By opening hedge positions or obtaining existing liquidity in other markets, market makers can fully obtain liquidity fees if they bear more price risk than all other liquidity providers. After executing a Swap, market makers can update their range orders again to rebalance their positions for the next batch of Swaps.
As long as a few market makers compete with each other for Delta, this protocol design ensures that users executing Swaps always receive market pricing or better than market pricing, with reliable fees and minimal slippage. Depending on the level of competition among market makers, capital efficiency in this protocol should surpass all other existing AMM designs.
A typical example is as follows:
Assuming a user exchanges USDC (ERC20) for DOT (Native), market makers A, B, and C compete to win liquidity fees from the trade. The pool has a 25 basis point liquidity fee.
- The user (DOT buyer) generates a quote and creates a unique deposit address associated with their target address. The user initiates the exchange by depositing 10,000 USDC into their quote address.
- The Ethereum blockchain includes the USDC deposit in the next block. Market makers observe the deposit has occurred and track other upcoming USDC deposits. There are also DOT sellers making deposits on the Polkadot chain. Although it takes multiple Ethereum and Polkadot blocks to identify transactions on the Chainflip state chain, market makers can simultaneously monitor the Polkadot and Ethereum chains to calculate the overall direction of the next batch of Chainflip transactions before execution.
- Chainflip requires 6 Ethereum blocks to consider the deposit transactions as "final." It also processes exchanges in batches of 6 Ethereum blocks (or approximately 18 Polkadot blocks), resulting in a delay of at least 6 blocks on the Ethereum blockchain between the exchange deposits and the execution on Chainflip. This means market makers have approximately 90 seconds to precisely know what the Swap is, obtain liquidity, calculate risks in other markets, and adjust their range orders through state chain transactions.
- In this scenario, users are waiting for 6 to 12 Ethereum blocks to execute the batch. In this example, the batch consists of 10 transactions with a total volume of $280,000, but only $90,000 worth of DOT is being purchased in this volume. Therefore, to ensure completion of each person's transaction in the batch, a total of approximately $170,000 worth of DOT needs to be sold in the batch. To charge up to 25 basis points on the total transaction volume of $280,000 (approximately $700), market makers now need to provide the best possible price for $170,000 worth of DOT within a 6-block delay window. This is where the name "Just In Time (JIT)" comes from, as they need to obtain liquidity sources and push some "just in time" liquidity purchases to win.
- Market makers can use risk model calculations to determine the best trading price by having additional capital float in other CEX. Based on the calculations, they update range orders and move the USDC in the USDC-DOT pool to that price. For example, market maker A adjusts its USDC range order to concentrate $170,000 of USDC liquidity at $23.45 per DOT, while market maker B adjusts its $170,000 of USDC to concentrate at $23.47 per DOT.
- The Chainflip network executes the batch. Even users who are buying will not suffer unnecessary slippage, as market makers obtain liquidity from external sources, naturally bringing the pool price close to the market index price. Market maker B receives 100% of the liquidity fee, assuming their quote is ahead of all other market makers. Market makers who did not execute trades will not be charged any fees, nor will there be any impermanent loss.
- Market maker B knows they have won the liquidity fee and just purchased how much DOT, so they continue to sell $170,000 worth of DOT at $23.47 or higher on other markets. If managed properly, market makers can earn $700 or more in profit in a batch of trades, with only 6 seconds of price risk. These opportunities arise with each batch execution, occurring every few minutes for each pool.
- The Chainflip validator network now sends the funds to the user, who will receive native DOT at a fair exchange rate.
- Market maker B may now withdraw or deposit their LP position to rebalance their portfolio and prepare for future batch opportunities, while market makers A and C prepare to seize batch opportunities in the near future.
JIT AMM has the following advantages and disadvantages:
Batch processing makes front-running meaningless, as all traders in the batch receive the same price. However, this also brings the issue that the protocol cannot allow users to determine the final result of their exchange in advance.
Capital efficiency will be higher than that of general AMM protocols, but for large amounts of single transactions that exceed or deplete the available liquidity in the pool, market makers may collude instead of compete. One solution is to split large single transactions into multiple smaller transactions, similar to ThorChain's stream exchange.
Data
The Chainflip mainnet went live on November 16, 2023. It currently only supports exchanges between ETH, USDC, FLIP tokens on Ethereum and native BTC, native DOT tokens, and will gradually support access to more chains in the future.
Due to the short time since the mainnet launch and low liquidity, the limit for a single exchange is currently around 10,000U. As shown in the following image, a quote to exchange 4 ETH for BTC yields approximately 0.2366 BTC. At the same time, the exchange ratio for the ETH/BTC trading pair on Binance is 0.05935, yielding approximately 0.2374 BTC. The prices are very close, and
Comparatively, at the same time, Thorswap may offer even better prices.
The protocol's TVL and trading volume are currently low, with deployed liquidity of approximately $239,000, and the largest liquidity in the BTC/USDC pool is around $100,000. The 7-day trading volume is approximately $300,000, capturing a total of $362 in trading fees over 7 days.
In comparison, Thorchain is still in its very early stages during the same period, with a daily trading volume of approximately $100-200 million and a total liquidity of $293 million (excluding RUNE).
Funding and Token Information
Chainflip has undergone multiple rounds of funding, with a total funding amount of $23.3 million. Detailed information on all funding rounds is as follows.
The funding amount from the end of 2020 to February 2021 was $3.81 million, with an estimated valuation of approximately $15 million. This round of funding was led by Blockchain Capital, with other notable institutions including Mechanism Capital, Apollo Capital, CMS Holdings, DACM, and others.
Shortly thereafter, a main round of financing was conducted and concluded in August 2021, raising $5.8 million at a valuation of $45 million. Notable companies leading this round of financing include Framework, Coinbase Ventures, Hypesphere, Delphi, Morningstar Ventures, EdenBlock, MetaCartel, Lemniscap, and Defi Alliance.
The most recent round of financing was a $10 million equity financing in May 2022. Pantera Capital, Framework Ventures, and Blockchain Capital invested in this round.
Finally, Coinlist users purchased tokens worth $3.78 million in the public sales in August and September 2023.
$FLIP is Chainflip's ERC-20 native token with an initial supply of 90 million, following a dynamic token supply model. Currently, Chainflip is expected to have an annualized 8% token inflation used to incentivize validation nodes, including authoritative validation nodes (7%) and backup validation nodes (1%).
In addition, Chainflip charges a one-thousandth transaction fee for each transaction, which is used to repurchase and burn $FLIP, potentially leading to a deflationary state. $FLIP also serves as the gas fee for the state chain, a portion of which will be directly destroyed, although the share is expected to be relatively small unless network activity is very high.
The token empowerment of $FLIP is mainly used for staking validation and protocol value capture. According to Coingecko data, the current total circulating market value of FLIP is $96 million, with a fully diluted valuation of $456 million. This valuation is very high compared to on-chain TVL and real trading volume, mainly due to the relatively small number of players in the field and high market expectations for Chainflip's future growth.
In comparison, Thorchain's circulating market value is $1.257 billion, 13 times that of FLIP. However, TVL and real trading volume are much higher than Chainflip.
Summary
Comparing the trading market data of BTC spot in CEX and DEX, the total trading volume in the past 24 hours is approximately $88.8 billion.
In contrast, the native BTC DEX trading volume is concentrated in Thorchain, with a 24-hour trading volume of only around $48.8 million, accounting for only 0.55% of the total market.
The DEX trading market share is approximately 5.6%:
Therefore, both in terms of DEX market share and BTC trading volume, there is still a lot of room for growth in the native BTC cross-chain exchange market.
At the same time, Thorchain has a strong first-mover advantage, has undergone long-term market tests, and is well-optimized for large transactions. From this perspective, it is difficult for Chainflip to surpass Thorchain in the short term. The best strategy at the moment is not to see Thorchain as a competitor, but to work together to expand the entire native cross-chain exchange market, optimize the experience for large transactions, and integrate with more wallets and DeFi protocols. Access chains that Thorchain has not yet integrated, such as Solana, Tron, etc., to capture more trading volume. It is necessary to continue monitoring various indicators of Chainflip, especially trading volume data, as only sufficient trading volume can capture a large amount of trading fees, thereby promoting the rise in the price of the $FLIP token.
Reference Articles
https://blog.chainflip.io/just-in-time-jit/
https://www.panewslab.com/en/articledetails/ph4354siz6kv.html
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。