Forward-Looking Research: ahr999-AMM Smart Fund Pool

The purpose of this article is to share our research findings with our peers and to build an ambitious blueprint for AMM together with you.

Author: Bytom Research

Abstract: Exploring a new type of AMM with the nature of an (index) fund, with both alpha returns (AMM fee returns) and beta returns (passive market following bull and bear returns).

Recently, the market has rapidly turned from bull to bear with alarming speed and intensity, delivering a rare shock to not only the cryptocurrency investment market led by BTC, but also to the DeFi business which is in its teenage years, and the enthusiasm, patience and capital to participate is not what it used to be. Even so, as researchers, it is still our duty to help everyone and the industry, especially in the current wave, to continue to keep the essence of research, so that the truly valuable things can be discovered again, and these things will surely be the leaders and mainstays of the next rise.

As early as a year ago, we publicly issued the assertion that “AMM will become the third largest blockchain invention after Bitcoin and Ether” [1], and we have been conducting cutting-edge research, exploring and practicing around “trading” during this year. We still believe that “AMM is still the most valuable invention in the crypto industry in this wave of DeFi flood”. The successful launch of Uniswap V3 is a testament to our insistence. Based on this, we are still concerned about the project and development of the AMM concept sector in this wave of the plunge, and believe that the opportunities hidden in the crisis will reappear in the near future. Here, we also present you and your peers a new way of thinking about the future shape of AMM, which will integrate many well-known projects and models today, hoping that we can work together and help each other, so that we can survive the short dark moment together, or move forward together.

AMM and Index Funds

Not long ago we published our thoughts and knowledge on DeFi index funds – “On Rebalancing: The Right Way to Implement Index Funds in DeFi” [2], in which we proposed a more complex AMM strategy control. We believe that the idea of implementing index funds based on AMM is worth a try and is an innovative feature that today’s head AMM projects are likely to integrate in the future, since AMM and index funds share the same essential form of existence. Inspired by this idea, we have chosen ahr999, the “god index” that many big players in the cryptocurrency investment field have taken as a guideline, and combined it with the basic form of AMM to form an intelligent automatic fund pool.

Let’s take a brief look at the ahr999 index. In the figure below, the whole area is divided into three color zones: the plunge zone (below the red line), the sell zone (above the green horizontal line) and the fixing zone (in between). The blue line is the ahr999 index line, which is based on the actual BTC price represented by the green line and calculated by the formula in the chart. Cryptocurrency investors who believe in ahr999 keep an eye on the areas where the blue line reaches, for example, on March 12, 2020, the big drop on that day directly caused the ahr999 blue line to shift from the fixing zone to the bottoming zone, signaling a “massive bottom”; in the following year, the In the following year, the ahr999 blue line went up and up, breaking through the bottoming zone and the fixed investment zone until the bull market formed at the end of last year, and releasing the “start selling” signal; now the ahr999 blue line has started to approach the fixed investment zone, warning investors that they need to be cautious at this time, and not to give a strong “bottoming” or “selling” signal. “bottoming out” or “selling” signal.

The choice of ahr999 does not mean that we agree with or strongly believe in the correctness of its investment guidance, but that the unique consensus group and guidance developed by ahr999 is still relatively leading in the crypto industry today, and therefore we have chosen to use ahr999 as our preferred index reference for practicing our theory. With the guidance of this index, fund managers can get direct instructions on where to cash out at high levels, bottom out at low levels, and even go for fixed income. And the investors who choose such funds are themselves more likely to agree with the historical correctness of ahr999. So let’s go back to AMM’s perspective, AMM itself is not a kind of fund that passively follows the market to change positions, only its strategy is very single and more “clumsy” – although it can indeed sell BTC during the bull market until the bull market The traditional AMM strategy is simple from the fund’s point of view and relies heavily on the timing correctness of the average investor (called LP in AMM). So is it possible to evolve a plain vanilla AMM into a fund format? Of course it can. The design we propose today recognizes the limitations of traditional AMM returns growth and is inspired by the strategies of traditional financial market index fund managers, replacing traditional fund managers with a more proven ahr999 chain index to automate and guide the AMM system to set up intelligent buying and selling strategies and mathematical models, instead of just following a constant product formula throughout.

Semi-Automated Solution

We call this form of AMM the “ahr999-AMM Intelligent Fund Pool”. So essentially it is still an AMM-based trading platform where LPs can join and exit freely, enjoy normal annualized returns on fees, and operate with the same experience as a normal AMM product for the average user. However, when LPs can go through a bull and bear cycle, or even a longer cycle, they can find that their wealth increases far more than the traditional AMM’s fee income, and the one who silently makes this contribution behind the scenes is the intelligent fund strategy model based on the ahr999 index prediction. We will give two solutions to achieve this, the simplest and most flexible of which is the semi-automatic one.

Both solutions rely on a model for solving the invariant loss, which is mentioned in detail in our “Five Categories of Invariant Loss Solutions” [3] published earlier this year – a constant weighted geometric mean function with dynamic weights, or “dynamic weighting solution”, or It can be classified as a large class of “prophecy machine solutions”, as we will also mention several other models available later. A brief review of the principles of this model for solving invariant losses is in order.

The dynamic weighting model is essentially the same as Uniswap’s constant product and Balancer’s constant weighted geometric average with weights, except that it turns the weight terms w1 and w2 in the Balancer formula as follows into a real-time dynamic change, which is driven by the introduction of a price prognostic machine that continuously feeds transactions to the AMM system against the real-time market rate. AMM can adjust w1 and w2 without changing the number of assets in the pool, so that the AMM quotation formula P is always in line with the market rate, and the exchange formula will be re-provided with the new weights. This prognostic machine-driven weighting scheme avoids changes in the pool asset positions and ideally allows the number of assets to always remain consistent with the initialization, thus avoiding the introduction of impermanent losses. From a geometric intuition, this dynamic weighting is really a rotational movement of the ordinary constant product curve around a fixed point (initialized asset position) in order to make the tangent slope of that point (the floor rate) consistent with the market rate value at all times.

Forward-Looking Research: ahr999-AMM Smart Fund Pool
Forward-Looking Research: ahr999-AMM Smart Fund Pool
Forward-Looking Research: ahr999-AMM Smart Fund Pool

This model was first proposed by Balancer, and then Bancor V2 designed and tested it in more detail. Although it has the support of two major project parties, it has not yet entered the real-world environment and has not been tested, so there will be “potholes” in the end. Therefore, we also recommend several alternative solutions, such as DODO, which is also classified as a “prophecy machine”. constructs a hybrid curve to do the demand curve, which can be understood as a simple hybrid function between a straight line formula and a constant product formula, as follows –

Forward-Looking Research: ahr999-AMM Smart Fund Pool
Forward-Looking Research: ahr999-AMM Smart Fund Pool

For example, when k=1, the formula will be all in favor of constant product formula, when k=0, it will be all in favor of straight line formula, when k is between 0 and 1, it will be the dark black mixed form in the figure, the curvature of the curve can be adjusted by adjusting the size of k, for example, the closer k is to 0, the smaller the curvature of the curve, the more suitable to provide stable coin type exchange service.

So in conclusion, although the implementation of DODO is essentially a re-optimization of the orderbook model, it also has the AMM exchange form, and the real-world experience of DODO is also beneficial for the promotion of this model. Again, we only describe several solutions objectively, without any subjective bias, and any solution to the invariant loss through a prediction machine could theoretically work for the ahr999-AMM smart fund pool we are talking about today.

The reason for describing much about this invariant loss solution is that the most central mathematical part of our semi-automatic solution is just that. The constant loss solution, represented by the dynamic weighting model, is essentially an “automatic position control” tool that keeps positions essentially constant.

Enter the semi-automated solution of the ahr999-AMM smart fund pool

We start the fund pool at time T1 (imagine we go back to the summer of 2020) and the ahr999 index prediction machine tells the AMM system that the market is in a “fixed investment zone” and that it is not advisable to adopt a drastic position change strategy, and that the AMM system will operate with a dynamic weighting model to provide normal redemption services and capture fee returns for LPs, who are also free from erratic losses due to the adoption of this position-invariant model.

At T2 (the start of the bull market at the end of 2020), the ahr999 predictive machine triggers a “sell” signal to the system. At this point, the manual quantitative team starts to intervene in the position management of the fund pool, acting as the ahr999 fund manager, which needs to make initial predictions for the future market trend and price range at this point, and formulate the position changes for each range, and finally disclose the fund selling strategy for the subsequent bull market range to all LPs, and strictly follow this disclosed strategy. An example is as follows.

(1) The ahr999 predictive machine signals to the system that the market is entering a sell period.

(2) The quantitative market maker starts to intervene and makes a “phased sell btc” position plan based on the current market price and prediction of the future bull market (as shown in the table above), which is made public to LP investors to show transparency.

(3) As the rising market hits the first position, the quantitative market maker will automatically get the right to control part of the BTC position split by the AMM system, for example, when it breaks through $20,000, the system pool will automatically divide 10 btc into the market maker pool, and the quantitative market maker will ask to sell BTC for USDT at an average price greater than or equal to $20,000 and inject USDT into the system pool. inject USDT into the system pool.

(4) In order to complete the quantitative operations smoothly, we will follow the model of traditional funds and set up an “open fund operation day”, i.e., when the market situation triggers a position transfer, the time period left for quantitative market makers to complete a series of quantitative operations is an “open fund operation day”, which can be 10 hours or 24 hours. At the end of the operation day, the quantitative market maker needs to be able to return the exchanged USDT back to the system pool. (3) Complete a round of fund operations and make the process transparent to LPs.

(5) The AMM system needs to be able to continue to provide exchange services to regular users without interruption while the QM changes positions in the system pool. If the system pool will be reduced by 10 btc before the start of the “Open Fund Operation Day” and transferred to the quantitative pool, in order to seamlessly provide secure exchange services, the weight of the formula needs to be adjusted immediately while the number of positions changes, so that the quotes and exchanges of the AMM formula will not be affected.

Forward-Looking Research: ahr999-AMM Smart Fund Pool

Similarly, when a quantitative market maker returns USDT to the system pool at the end of the “Open Fund Operating Day”, a change in weighting needs to be made immediately along with the system position change, keeping the system quote unchanged.

Forward-Looking Research: ahr999-AMM Smart Fund Pool

Time enters T3 (in order to simulate a complete bull-bear cycle, we assume that the future trend is basically the same as 2019-2020), ahr999 transmits the “fixing” signal, and the market enters a calm period, so we can let the dynamic weighting model keep acting AMM system and keep the position unchanged.

When the time enters T4, the “bottoming” signal appears, the system starts the “quantitative position adjustment + dynamic weighting” combination model again, and the quantitative market maker formulates a phased bottoming strategy to accumulate a large amount of cheap BTC for LPs at the bottom of the market to be sold in a new round of bull market, the specific practice is similar to that of T2, and will not be repeated. The specific practice is similar to that of T2, and will not be repeated.

To sum up, the semi-automated solution is actually very simple and uncomplicated.

During the quiet “fixed investment period”, the system degenerates into an AMM system with dynamic weighting model, which only generates fee income for LPs and avoids the risk of unpredictable losses.

At the beginning of the bull market, professional artificial quantitative market makers start to cash out BTC for LPs at higher levels according to the publicly formulated position strategy, while the AMM system still provides exchange services for users without interruption under the dictates of the dynamic weighting model, without being affected.

At the bottom of a bear market, quantitative market makers are able to continuously buy cheap BTC to sell on the upside. This cycle provides LPs with a far greater increase in revenue than the fees.

Points to note.

(1) After the bull market signal appears, the quantitative market maker can make a reasonable interval selling strategy, not too aggressive to avoid early liquidation of BTC, and can change the strategy table in time according to the subsequent market development. All the formulation and changes need to be open to LPs and the community to achieve transparency of fund operations.

(2) The AMM system should be able to smoothly and automatically complete the position division and adjustment before and after the “open fund operation day”, and make timely adjustment of the weighting to avoid interruption of the exchange service; quantitative market makers have more autonomy during the “open fund operation day” and can freely decide the trading market and the average exchange price, but all processes should be open and transparent to the LPs.

(3) LPs are free to join and exit the system, but are not allowed to join or exit during the “open fund operation days”.

(4) Since quantitative market makers adopt the “sell-on-ramp” approach, LPs who join at the top of the bull market will not be sold at a price lower than the market rate at the time they join, thus avoiding losses for these LPs.

(5) From the whole simulation, LPs’ wealth gains come from a bull/bear traverse, so we suggest that any LP needs to be patient enough to go through a full bull/bear cycle to gain multiples of wealth gains.

Fully Automated Solution

Semi-automated solutions are simple and straightforward, allowing for flexible position adjustments based on market dynamics and less security concerns throughout the system, but they rely on manual quantitative market maker adjustments and require a high level of information and operational transparency, introducing a “human” element to the DeFi system. Is there a fully automated, purely mathematically driven solution to implement the ahr999-AMM smart fund pool? We also give here an exploration for discussion.

Dynamic weights.

Forward-Looking Research: ahr999-AMM Smart Fund Pool

At T1, the fund pool is activated and the AMM system is driven by a “dynamic weighting model”, as in the semi-automatic scenario.

At T2, ahr999 triggers a “sell” signal, the AMM system formula stops the “dynamic change of weights” and degenerates to the Balancer formula, and as the market rises, the Balancer formula can drive BTC positions continue to shrink, USDT positions continue to increase, to achieve the effect of automatic intelligent selling BTC.

In the bull market up period, it is not just up and not down, for example, there is a normal high frequency of a small decline (case A), there is a certain time interval of the phase retracement (case B), there is a bull market high turned down sharply the beginning of the bear market (case C). The complexity of the fully automated scheme lies in the need to introduce a monitoring mechanism that can always record every high and maximum retracement that occurs in an upward market, and use it to determine whether to make a formula switch. For example, the small box in the middle of the above chart represents a sharp pullback in January 2021, at that time, whether this is a phase pullback or a bear market turn, if we still let the Balancer formula work, the BTC originally cashed at the high level will be bought back, unable to hold on to the high wealth for LPs, deviating from the fund idea, so we need to Therefore, we need to introduce a “maximum retracement detection mechanism” for the system: the price prediction opportunity will communicate the real-time market changes to our AMM system, and when capturing a market decline of more than 5-10%, the system will automatically switch from the Balancer formula to the “dynamic weighting model”, relying on the dynamic adjustment of the weights to avoid further changes in the number of assets. The system will then be governed by the dynamic weighting model until –

(1) if the market confirms that this is a phase pullback, then wait for the price to break through the previous “high”, the system from the dynamic weighting model to switch back to the Balancer formula, and the system’s formula weights and the number of assets at this time exactly match the Balancer formula, in the subsequent new round of rising market, by the Balancer formula to continue to sell BTC.

(2) If the market after the market no longer appear to break new highs, confirming that this high point is the highest point of the bull market, because the system has been governed by the dynamic weighting model, so will not change the system pool position in the process of falling, hold the high point of cashing out of wealth.

At T3 (if the future follows the historical trend), the dynamic weighting model dominates the system throughout the entire descent from the bull market high and into the “fixing zone” as predicted by ahr999.

Until T4, the end of the bear market, when ahr999 triggers the “bottoming” signal, the system formula switches to the Balancer formula and implements the “buy the more you fall” strategy, the whole process is similar to the bull market operation indicated by T2.

Overall, the fully automated program is also designed in line with the principle of simplicity, the entire system operates with no more than two mathematical formulas, the only complex factor introduced is the highest point and maximum retracement can always be recorded (bear markets correspond to the lowest point and the highest rise) of the judgment mechanism, to make the basis for intelligent switching.

Finally, we do a simple data simulation, here we only simulate the flow of the LP from the fixed investment zone to the selling zone, corresponding to the time point from the second half of 2020 to today (May 2021), and calculate the number of assets that can be withdrawn by the LP by today according to the model of the scenario described earlier, and compare the total net wealth, both from the data and intuitive point of view, both scenarios are ahead of the traditional constant product model in terms of net wealth increase.


In our design, there are no complex mathematical models introduced, but basically we reorganize and innovate on top of the existing programs and models. In the most essential innovation concept, we are exploring the real essence of AMM – the smart fund form. The Uniswap V3 [4], which is in full swing, from another point of view, is not also a professional quantitative market maker who constantly anticipates the market and adjusts positions in order to maximize the increase in returns. If an average user is interested in a market maker strategy, he can choose to join the camp and have a professional quantitative market maker continuously change his position to eliminate market friction and loss and obtain the maximum return on fees and passive market following.

(Note: This paper is a research paper, and is intended to share our research findings with our peers and build an ambitious blueprint for AMM together with you.


[1] “AMM will be the third largest blockchain invention after Bitcoin and Ether”,

[2] “On Rebalancing: The Right Way to Achieve Index Funds with DeFi”,

【3】《AMM Ultimate Notes – Five Categories of Unconventional Loss Solutions》,

[4] “The Mathematics of Uni V3”,

Posted by:CoinYuppie,Reprinted with attribution to:
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (1)
Donate Buy me a coffee Buy me a coffee
Previous 2021-05-25 11:56
Next 2021-05-26 02:29

Related articles