BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

How does AMM's "Infinite Liquidity" work? Interpretation of BlackHoleSwap stable currency swap design

Winkrypto
特邀专栏作者
This article is about 4542 words, reading the full article takes about 7 minutes
The biggest feature of BlackHoleSwap is that it allows the system to have a negative amount of inventory. By integrating the decentralized lending protocol, the currency with a large amount of collateral can be loaned out with insufficient currency, and
AI Summary
Expand
The biggest feature of BlackHoleSwap is that it allows the system to have a negative amount of inventory. By integrating the decentralized lending protocol, the currency with a large amount of collateral can be loaned out with insufficient currency, and

Editor's Note: This article comes fromChain News ChainNews (ID: chainnewscom), Author: Brother Xiao Mao, published with authorization.

Editor's Note: This article comes from

Chain News ChainNews (ID: chainnewscom)

, Author: Brother Xiao Mao, published with authorization.

The DeFi ecosystem is developing rapidly. In addition to the continuous expansion of funds entering the DeFi field, the infrastructure in the DeFi ecosystem is also iterating towards better performance and easier use by users. At present, the troika in the DeFi DEX field - Uniswap, Curve, and Balancer have become the most widely used infrastructure in the DeFi field, but the obstacles encountered by users during use, such as high slippage and high loss, also show that such products are not currently available. to the final version. BlackHoleSwap is one of the recently launched projects that try to make improvements in the DEX field. By combining and interacting with the lending and DEX modules in "DeFi Lego", a stable currency trading experience with almost "unlimited liquidity" can be achieved.

BlackHoleSwap, which is positioned as a "decentralized stablecoin flash swap tool", was launched by the Hakka Finance team. The project launched the Alpha test version of the product on August 6. According to the BlackHoleSwap website, the platform already supports the swap function of DAI and USDC two stablecoins, and will launch a liquidity mining mechanism in the future.

So, what is the implementation principle of BlackHoleSwap? Is there a chance to become a new generation of stable currency DEX? Who is this hot and rare oriental-faced team in the recent DeFi field, and what DeFi "cool things" have they developed?

What is BlackHoleSwap?

BlackHoleSwap is a decentralized stablecoin flash exchange tool designed for stablecoins and based on an automated market maker (AMM). The biggest feature of BlackHoleSwap is that it allows the system to have a negative amount of inventory. By integrating the decentralized lending protocol, the currency with a large amount of collateral can be loaned out with insufficient currency, and it can handle transactions far exceeding its own reserves.

Compared with other DEXs with AMM mechanisms, BlackHoleSwap said that the platform has ultra-low slippage, can provide almost unlimited liquidity, and maximize the characteristics of capital utilization. The specific process is that BlackHoleSwap deposits the reserve currency on the lending platform. When the inventory of one currency in the trading pair is exhausted and there is still demand in the market, BlackHoleSwap will use another currency as collateral to borrow from the lending platform. Currency is required to complete transactions.

BlackHoleSwap also stated that it currently only supports a limited number of stablecoins. When Compound Finance or other lending protocols support more stablecoins as collateral, BlackHoleSwap will list more stablecoin trading pairs.

secondary title

  • What is the design logic of BlackHoleSwap?

  • The current classic automated market maker (AMM) mechanism DEX, such as Uniswap, provides quotations for two asset swaps in a "fixed product" manner, and its price is sensitive to inventory changes. Although it can be widely used in various Automated market making between assets, but for transactions between stablecoins, Uniswap's fixed product algorithm is not efficient enough due to reasonably predictable price differences.

For the swap of stable coins, Curve uses a special formula between a constant total amount (the exchange rate is always 1:1) and a constant product (Uniswap). Under the same amount of funds and the same price difference, Curve can provide dozens of times the liquidity of Uniswap, and at the same time, it also has the characteristics of Uniswap that can always be traded, which is equivalent to a "Uniswap with leverage".

When the unilateral stable currency reserve is close to exhaustion, Curve will still experience a huge slippage;

When the price of a stable currency is relatively deviated, the liquidity will shrink rapidly, and Curve's performance is even inferior to Uniswap;

BlackHoleSwap stated that the platform aims to break through AMM transactions that are only limited by its own capital reserves. By integrating decentralized lending agreements including Compound and dYdX, BlackHoleSwap deposits the reserve currency on the lending platform. When the transaction is one of When the currency inventory is exhausted and the market still has demand, BlackHoleSwap will use another currency as collateral to lend the required currency from the lending platform to complete the transaction.

Therefore, BlackHoleSwap stated that the platform aims to realize that it will not be limited by its own inventory, and there will be no problem like Curve's "big turn" when the inventory is close to zero, and it will provide "exceeding its own reserves, Ultra-low slippage, nearly unlimited liquidity.

secondary title

What is the implementation principle of BlackHoleSwap?

The implementation principle of BlackHoleSwap AMM can be deduced through complex mathematical algorithms, but if one sentence summarizes the AMM model principle of the project, it is: allowing the exchange fund pool to have negative deposits, and integrating DeFi lending agreements to add virtual liquidity.

Take the example of a simple stablecoin exchange of 100 DAI and 100 USDC inventory, if the user tries to exchange 100 USDC with 100 DAI, which is double the inventory, in Uniswap, it is limited by the "fixed product" AMM mechanism, and can only exchange 50 USDC; and if you consider the "virtual inventory" available at BlackHoleSwap, you can theoretically redeem 98.01 USDC.

According to the white paper of BlackHoleSwap, from the perspective of the mathematical model, BlackHoleSwap can be regarded as a linear change to the Uniswap algorithm, projecting the original curve into a new coordinate system.

Although BlackHoleSwap stated that the platform will have better liquidity than existing DEXs. But according to mathematical theory, after all, in fact, any DEX including BlackHoleSwap will never have real "infinite liquidity".

For example, BlackHoleSwap will eventually be limited by the total inventory of the DeFi lending platform. When Compound's DAI is borrowed, the transaction will still fail. Regarding the lending mechanism, the team stated that after the evaluation, they decided to adopt the method of setting the debt ratio, and currently set the debt ceiling parameter to 62%.

BlackHoleSwap and the risks of AMMs

BlackHoleSwap also stated that any market maker will bear certain risks, and usually a market maker with lower slippage and handling fees will have a higher probability and degree of loss due to price fluctuations. BlackHoleSwap admitted frankly that while Curve’s capital utilization rate is higher than that of Uniswap, it also bears higher risks. BlackHoleSwap also bears price risk, and because of the portfolio lending mechanism, it also bears the risk of position liquidation.

How to avoid or reduce the risk?

BlackHoleSwap stated that the risk of system liquidation can be avoided by setting a liability ceiling check and avoiding potential Flashloan (flash loan) attacks. At the same time, systemic risks can also be budgeted for insurance to mitigate losses. However, price changes are the most unavoidable risk, and it is also a risk that a liquidity provider wants to bear.

secondary title

BlackHoleSwap's future plans
More types of stablecoin swaps will be supported
Apply the "black hole" mechanism to other AMM models

BlackHoleSwap said that the project is essentially a linear transformation of the Uniswap model. because

Therefore, after careful analysis, a similar linear conversion mechanism should also be applied to other automatic market-making models, generating

secondary title

The Hakka.finance team behind BlackHoleSwap

Hakka Finance is called "Hakka Finance" in Chinese. It is a multi-product decentralized financial (DeFi) ecological platform. The founder is Chen Pin, a developer of Ethereum. Chen Pin was founded by Pelith, a developer of smart contracts and decentralized applications in Ethereum. He is also active in the Taipei Ethereum organization and blockchain popularization education all year round. Chen Pin told Lianwen that Hakka means "Hakka", which symbolizes the "Hakka spirit of reducing all unnecessary expenses" currently needed in the DeFi field.

image description

Chen Pin, founder of Hakka Finance

It is worth mentioning that from Chen Pin’s Twitter, it can be seen that he is also very well-known in the English-language blockchain technology community. Not only has he been followed by Vitalik Buterin, but also Andre Cronje, the founder of Yearn.finance and a famous developer. Be stingy with his appreciation. Andre Cronje once reposted Chen Pin's views on DeFi on Twitter and said, "I am a super fan of Chen Pin, he always has amazing views, they (referring to Chen Pin's team) are not aware of any of us in DeFi. The development of products in the DeFi field has already begun before the concept of ”

  • secondary title3F MutualHAKKA, the token of Hakka Finance

  • Fulcrum Emergency EjectionHAKKA, the token of Hakka Finance, is the governance token of this ecology. Users who hold Hakka can perform community governance on the chain and vote on all changes to the protocol. At the same time, HAKKA is not only a governance token, but also a rare protocol And the platform itself has ownership, using "ecological tokens" that "one token captures the value of multiple ecological products".

  • Tokenizing CDPBlackHoleSwap introduced in this article will be the first ecological DeFi project to officially apply HAKKA tokens. In addition, the products currently developed by Hakka Finance and the products to be launched in the future will give governance and other rights to HAKKA tokens. According to the official website of Hakka.Finance, the DeFi products currently launched by Hakka Finance include:

  • DeFi Handbook: A DeFi insurance product aimed at MakerDAO's systemic risk, using the "rainy day fund" to hedge against the black swan event of emergency shutdown. Hakka Finance said that in contrast, the existing DeFi insurance agreement only hedges against price fluctuations and stable currency de-anchoring, while Nexus Mutual is an industry mutual aid association with a wider range of attributes, and everyone shares an insurance pool.

(Fulcrum emergency escape device): This product can provide depositors with one-key redemption of iToken (mainly iETH) service during the liquidity crisis after bZx was attacked.

: The low-liquidity version of the investment agreement, the investment target is low-liquidity digital assets, providing higher interest rates to investors who are willing to accept a longer redemption period, and increasing the stability of the DeFi ecosystem.

(DeFi Handbook): It aims to become a Wikipedia, operation manual, and textbook for the DeFi world, providing DeFi developers with quick access to all commonly used DeFi protocols, interfaces, and usage.

DeFi
投资
稳定币
Welcome to Join Odaily Official Community