Cool stuff: introducing volatility into AMM, CoFiX says it will bring institutional market makers into DeFi

Cool stuff: introducing volatility into AMM, CoFiX says it will bring institutional market makers into DeFi

Loading

Demystifying a cool thing that only small circles currently know: the innovative AMM project CoFiX said that it wants to make the transaction risk calculable and to allow institutional market makers to enter DeFi. Is this feasible?

Written by: Pan Zhixiong, Research Director of Lianwen

The income farming game of DeFi farmers has experienced the joy of harvest from spring to autumn, but it is clear that it has now entered an embarrassing period of mixed fish and fish. The good news is, the elapsed time and market-tested products have come to the fore, like AMM (automatic market makers) such products have become the mainstream class trading platform to the center of – all kinds of AMM occupied the decentralized market share of 90 % Above.

The concept of AMM (Automatic Market Maker ) has been completely detonated under the catalysis of Uniswap , and has become the brightest star in the DeFi boom. Start-up teams have launched a full range and multi-angle exploration for their pain points, such as those from China The team DODO proposed the ” Active Market Maker Algorithm “, which was recognized by Framework Ventures , a star DeFi investment institution, and became the first Chinese DeFi project led by Framework Ventures, which focuses on investment in the DeFi field.

There are more teams working hard, and there are many treasures worth exploring. Recently, in the small circles of some large cryptocurrency market makers and leading crypto venture capitalists , a white paper on a new type of automatic market maker protocol called ” CoFiX ” has circulated, which has attracted our attention.

Cool stuff: introducing volatility into AMM, CoFiX says it will bring institutional market makers into DeFicofix.io

In simple terms, CoFiX hopes to become the first chain to introduce the concept of computable financial AMM, so that not only can accurately develop the most efficient and equitable trading spreads, while also reducing the risk of market makers can be arbitrage – in accordance with its White Paper It is said that by designing a new type of automated market-making agreement, the product can make ” risk can be calculated and algorithmically managed “, so that traders and market makers can participate extremely efficiently while accurately pricing risks. DeFi market. This is expected to really attract institutional-level market makers and traders to enter the DeFi market.

This vision sounds quite ambitious, but how to realize it? Let the chain smell take readers to find out.

Looking for the perfect “trading machine”

Let’s look from the AMM of common pain points: AMM looks like a “transaction machine”, but so far, these machines are not perfect, there are system losses.

For market makers, an important participant in the AMM trading machine, the risk of market makers should be relatively neutral. It can provide liquidity for the market and promote efficient price discovery, but the original AMM protocol represented by Uniswap , due to the extremely simplified market-making algorithms, in fact, it is the market maker adds a layer of risk. Especially in the case of large fluctuations in the stock market, it is easy for market makers to generate losses, while the market arbitrageurs, can earn as part of this income with little risk.

Effectively reducing the impermanence loss of market makers is the direction that many AMM products strive to improve. Two other decentralized transaction or agreement DODO Bancor 2.0, the latest attempt to introduce the fair market price of the chain by oracle, added to the AMM algorithm to reduce the likelihood of market makers directly arbitrage. After all, for mainstream crypto assets, the liquidity and price discovery mechanism and efficiency of centralized exchanges are more advantageous, that is, they have pricing power.

Cool stuff: introducing volatility into AMM, CoFiX says it will bring institutional market makers into DeFiDODO tried to introduce off-chain prices through the oracle, and added the AMM algorithm, which was recognized by first-line venture capital

Another problem brought Uniswap minimalist algorithm is spread by the time of the transaction price shocks greater impact on local small amount of money when the cell body, especially in. Because this algorithm does not introduce more parameters, it did not consider the differences between the different assets, in general, it wants a fixed price curve to simulate the actual price discovery process. This is where some other AMM products try to improve. For example, Curve , another stable currency transaction protocol with the AMM concept, is more suitable for dealing with transactions between assets with less price fluctuations.

CoFiX is designed to solve these problems. This is a chain made up the center of the oracle price-driven market making a new generation of automatic transaction protocol optimized first generation AMM will be continued arbitrage (impermanence loss) situation and want to provide the best spread traders.

This is a team sponsored by an anonymous transaction agreement to the center, according to public information display Github, encryption currency wallet AlphaWallet team of developers may be involved in the development of CoFiX.

The name “CoFi” in CoFiX comes from ” Computable Finance ” (Computable Finance). This is a new concept – CoFiX team believes that the current DeFi simply removed the credit risk in financial products (financial protocol to run automatically according to intelligence contracts) and liquidity risk (high interoperability between intelligent contracts ), but did not do for volatility risk effectively computing, “when the risk can be effectively calculated, based on the algorithm pricing and management of risk, such as the financial system will achieve true non-managed and automated operation, this is the generations The ideal of financial practitioners. CoFi is a truly practical closed-loop application in the blockchain field. It will push the financial industry into a new era.”

And the team designed and developed for CoFi field first product is the “CoFiX” This is a design based on NEST oracle of decentralized transaction agreement (CoFi + DEX = CoFiX), contains the oracle module, market-making module And transaction module .

The soul of the “new machine”

Since it is part of “computable financial” (Computable Finance) products under this new concept, CoFiX proposed to “math” to achieve the transaction risk effectively and accurately calculate the risk-based pricing, in order to achieve and allow traders Market makers participate in the DeFi market extremely efficiently while accurately pricing risks. In order to achieve this goal, the designers of CoFiX believe that it is necessary to introduce a ” market price ” at which the risk can be calculated, and to introduce it without additional counterparty risk.

Or in other words, if the CoFiX this product AMM seen as an automatic transaction machine, it must have a suitable price oracle to feed the price of this machine.

CoFiX’s white paper pointed out that among the various oracle products currently on the market, the NEST oracle is the only choice for decentralized exchanges. In contrast, similar projects DODO and Bancor 2.0 both use Chainlink’s oracles.

CoFiX said, “NEST is based on decentralized price oracle financial arbitrage designed to achieve an effective verification prices through innovative two-way option, the price of chains and beta coefficient, making the deviation price and real-time market equilibrium price NEST oracles within a reasonable range of computable, making the market equilibrium price to the price in the form of financial protocol on chain-free arbitrage opportunities. ”

On principles and mechanisms of decentralized oracle agreement NEST Protocol, you can see the chain before the news reports for more information:

Although Chainlink should be a more secure solution-as the most well-known and professional decentralized oracle solution in the industry, Chainlink has cooperated with countless public chains or DeFi projects in the cryptocurrency industry. In terms of the number of partners, the number of nodes, and the abundance of data, Chainlink has significant advantages.

The CoFiX the White Paper, even as Chainlink such well-known oracle project, the center of the risk node model can not be eliminated, “currently on the market only to verify reuse of decentralized oracle project NEST, its structure in line with region block chain and to the center of the spirit, the whole mechanism cleverly designed, more in line with the nature of things, the current density far exceeding its offer various types of oracles. ”

This requires Speaking from oracle model with Chainlink of NEST.

For the price of assets in terms of data encryption, Chainlink will get the latest prices from some specific node then make the appropriate treatment, then the contract or intelligent call push data to the chain. Especially for pricing in asset prices, the exchange of the data center, this whole process is like a price transmission process, the data is transmitted to the outer chain link by the node. There is also a mechanism of the entire logical pledge or reputation systems to minimize the possibility of evil node.

And the prices for NEST like is generated in the chain. Anyone can make a quotation in the NEST system, as long as a certain amount and corresponding proportion of assets are submitted to the smart contract on the chain, such as 30 ETH and 10,000 USDT. If at a certain time we think the price is fair market price (the price has not provided any arbitrage opportunities within a certain period of time), then this property will return the user to the offer, the offer will simultaneously generate this behavior is NEST oracle Specific price data; if someone thinks that the price is not a fair price, they can directly trade with the asset, using 10,000 USDT for 30 ETH or 30 ETH for 10,000 USDT.

From the perspective of specific oracle performance, CoFiX’s white paper quoted a research article on NEST, saying, “According to the research of NEST oracle, the theoretical spread of NEST is about 0.3% under normal circumstances, and the actual data is also very close to this. , About 0.4%.”

The magic of mathematics: update the AMM algorithm and add an accurate pricing algorithm for risk

In addition to introducing a new type of price oracle, CoFiX has also updated the AMM algorithm in its design. Uniswap’s trading algorithm is simple enough, but CoFiX’s algorithm is more intuitive by comparison.

Uniswap’s automatic market maker (AMM) algorithm is a ” constant product market maker “. The product of the two types of assets in a single fund pool is a constant value (X*Y=K). Put the quantity of one asset into the formula to calculate the exchange quantity of another asset.

The AMM and CoFiX exchange algorithms are mainly three parameters, namely P oracle price and additional fees coefficients θ. When users are trading, the exchange price between the two assets can be calculated by the formula P*(1+K)/(1- θ) or P*(1-K)*(1-θ). So it can be put parameters K and θ analogy for trading spreads.

Exchange price = oracle price * (1 ± compensation coefficient) (* or /) (1- handling fee coefficient)

For example, the current price of NEST oracle machine is 400 ETH/USDT. If K is 1% and θ is 0, then the user can exchange 1 ETH for 400 (1-1%) = 396 USDT. In turn, the user needs to use 400 (1 +1%)=404 USDT can be exchanged for 1 ETH. Interestingly, CoFiX algorithms exchange has nothing to do with the ratio of trading volume, so regardless of the user or redeem 1 ETH 1000 ETH, are trading at the same price.

In addition, the compensation coefficient K is a parameter related to volatility, delay variable and system return rate. K value is a nonlinear system, formulas and calculations related to process more complex and can not use a formula shows, but then we will help you understand how it works.

Rule 1: K increases with increasing volatility

NEST oracle also collects price volatility while capturing price data, when the larger historical volatility represents a greater asset price fluctuations over time. This means that if CoFiX provided at a fixed conversion price of the transaction, will be at greater risk, such as arbitrage can find arbitrage opportunities between the center of exchanges and CoFiX during market volatility. Therefore, as the volatility increases, the value of K also increases.

Rule 2: K increases as the price delay increases

When the block where the price of the transaction NEST block and user oracle in the latest entry into force is likely there is a certain time lag (ie block poor, the smallest unit of time is on the block chain block), with the increase in the difference between this time , The price uncertainty will increase. Therefore, as the difference between the block when the user trades and the last price effective block increases, the value of K will increase.

Rule 3: It has nothing to do with the size of the fund pool and the number of transactions

DEX CoFiX other except that the amount or number of transactions body pools K-value and independent of (partial price no shock), the user can perform a large number of large transactions through CoFiX or simultaneously, may be maintained at a relatively constant Price.

Guess: The coefficient and the ratio of transaction fee income will be adjusted through governance

CoFiX said that some of the above parameters by regression coefficient is extrapolated globally, as well as additional transaction fee is a proportion θ agreement. Therefore, as the agreement changes, it is likely that the above data will be adjusted through governance, and even the entire calculation formula of K can be adjusted.

AMM concept DEX horizontal comparison

DEX from the point of view, there is the role of traders and market makers two different needs. Traders demand is less slippage (packaged by the delayed impact of the transaction), the price of lower spreads and fair, and the market maker is based on a smaller risk of acquiring relatively stable earnings, in particular, to solve the first generation AMM The risk of being arbitrage.

From the perspective of traders, the number of transactions, plus transaction package of speed, volume and volatility of capital pools are the main factors affecting the cost per transaction (spread + slip point). Different CoFiX and other DEX is, spread the risk of each transaction size is accurate calculation of market makers to bear out, almost nothing to do with the amount of money the cell body and the number of transactions based.

Cool stuff: introducing volatility into AMM, CoFiX says it will bring institutional market makers into DeFi

For transaction rates, the current most of DEX are maintained at a relatively similar level, except Curve because transactions between the price difference is smaller asset, so the transaction can only lower rates.

In addition, from the perspective of market makers (liquidity providers), the size of impermanent losses and whether unilateral assets can be invested are also major considerations.

Cool stuff: introducing volatility into AMM, CoFiX says it will bring institutional market makers into DeFi

Although both CoFiX and DODO are using oracles to reduce the possibility of arbitrage, the actual effect will be verified after a period of online operation. Of which there are not only differences oracle selection, there are differences between trading algorithms.

Uniswap finally been verified as being a respected at this year’s innovative decentralized financial (DeFi) protocol, not only gave birth to the concept for the first time tokens issued by AMM, also provides a basis for the same period a large number of forked projects, various ” ” Swap ” not only borrows its smart contract, but even the front-end web page pays tribute to it.

But AMM is still in the very early stages of research, and many other projects also saw Uniswap not yet meet the needs of various market makers, so the invention of various new market-making algorithms, market makers and traders to meet more needs, CoFiX is just one attempt.

Even Uniswap itself is working hard to develop the next generation of DEX, claiming to be able to solve the above mentioned problems in the V3 version, but the confidentiality work is done well and there are no details that can be disclosed. Obviously Uniswap itself knows very well that in this industry, if you do not destroy your life, other competitors will soon catch up or surpass you.