Cointime

Download App
iOS & Android

Negative Price AMM ±⟨DiracAMM⟩

Repost from Ethresearch By v-for-vasya: “Negative Price AMM ±⟨DiracAMM⟩” The full report and all related findings are available on the official website of Ethresearch.

We discover that negative liquidity is possible and construct an AMM to access the negative domain by allowing the price to go negative. The invariant for a negative price happens to be the formula for a circle and the liquidity distribution happens to have a power law tail. You can interact with and compare it to an RMM here. Most interesting points are outlined below with link to paper at the end.

Figure 1:Two negatively priced assets can be exchanged between each other for a positive price. An impossible task in tradfi, requiring a fiat numeraire to act as an intermediary.

Summary:

Swapping and liquidity provision transactions of a Concentrated Circular Market Maker (CCMM) are obfuscated using Fully Homomorphic Encryption (FHE) to mitigate MEV in the public mempool by combining game theory with the Kelly criterion. Liquidity of the CCMM is adjusted using a scale parameter and can be modified with a hook in Uniswap v4. We show how it is possible to enter the negative liquidity domain with the CCMM.

Negative Liquidity

If we look at a Constant Product Market Maker (CPMM) such as Uniswap, we can see that it happens to provide liquidity in the negative domain. Take the Uniswap Invariant with liquidity L

It’s just difficult to access this negative liquidity in Uniswap due to the invariant being a hyperbola. By pressing the invariant against the axes, concentrating liquidity, and folding it on itself we can travel to the negative domain. A liquidity provider may become a liquidity taker with the following invariant where z is a scale parameter

We like to call it the DiracAMM (Paul Dirac discovered anti-matter with a similar trick by seeing that energy √E2 could have a negative value in the energy-momentum relation). One can program the invariant to not provide liquidity after touching the axes though, in which case its liquidity distribution L happens to be the Student’s-t distribution with degree of freedom df=2, a special case of a power law tail where the law of large numbers has no predictive capacity on the variance.

LP Payoffs

If price, following a power law, is allowed to flow into the negative, as is empirically observed with various assets, then the LP payoff function happens to resemble a collection of non-linear payoffs.

But it’s not necessary though for the underlying price to be negative for this AMM to be useful. Rather, one suggestion is to use the price of $0 as an offset from the current underlying price of, let’s say $100 . A negative 1 price indicates a decline of the underlying from $100 to $99. If the CCMM has one asset that can not go negative, such as a stablecoin, then it can only have LP payoffs 2A2 and 2B2, but by borrowing the LP position through a lending protocol one could mimic the payoffs of 2D2 and 2C2 respectively.

MEV approach with Kelly Criterion and FHE

Since a gain and a loss can be defined as an offset with a CCMM, we can combine it with the game theory behind rational MEV decision makers who follow the Kelly criterion, a strategy that ensures long-term optimal geometric growth

where f∗ represents a MEV extractor’s portfolio allocation in a MEV attack with the probability of success p and betting odds b. By targeting Kelly-neutrality we set a MEV extractor’s Kelly betting amount f=0 at an increased gas cost by rearranging for the following equality to hold

We do so by introducing two encrypted boolean values (ebool) for swapping Bswap=[0,1] and providing liquidity BLP=[0,1] going into the mempool. Where the boolean value can mean 1 for swap x for y and 0 for swap y for x (or remove and re-add liquidity for BLP). We can also encrypt the swap quantity dx (or dy) as euints, thereby making it unclear what the betting odds b (gain and loss relationship) are.

Setting the expected value of a MEV extractor’s Kelly bet E⟨f∗⟩ = 0. Targeting Kelly-neutrality could be a useful mechanism for MEV. We noticed that with FHE we can selectively target just the variables we want to obfuscate enough without having to encrypt everything and think that this approach could be useful to others looking into MEV.

Further work

An approach to avoid negative prices for the underlying could be to construct a passive wall of liquidity, a liquidity fingerprint that asymmetrically increases non-linearly as price approaches zero, denting price impact. The super-heavy tailed distributions like the Log-Cauchy distribution with concentration parameter c come to mind with liquidity fingerprint in price space being

This is a very interesting liquidity fingerprint because it captures what we see in crypto where some tokens stay where they are, the majority approach the zero bound, and a select few fly towards the right tail. One of the mathematical challenges here being that liquidity spikes to infinity at 0 though.

Comments

All Comments

Recommended for you

  • Tether CEO posts job openings, sparking speculation that a mobile encrypted wallet is on the horizon.

    Tether CEO Paolo Ardoino posted on the X platform stating that Tether has started recruiting a senior software engineer who will be responsible for Tether's mobile crypto wallet-related products, which will be supported by artificial intelligence, Wallet Development Kit (WDK), and QVAC technology. Later, Paolo Ardoino also posted a suspected wallet product screenshot in another tweet, which shows "Own your Money".

  • Bloomberg analysts: Among the top 25 US equity ETFs with the highest annual inflows, BlackRock IBIT is the only ETF with negative returns.

    Eric Balchunas, a senior ETF analyst at Bloomberg, posted the annual top 25 U.S. stock ETFs by fund inflows on the X platform. Among them, BlackRock's Bitcoin exchange-traded fund IBIT is the only ETF with a negative return, with an annual return rate of -9.59%. It is worth noting that despite the negative return, IBIT's annual fund inflow still ranks sixth, even surpassing the GLD ETF with a 64% return. In the long run, this is a very good sign, as it received over $25 billion in fund inflows during the bear market phase, indicating greater potential once the market turns bullish.

  • Hassett's chances of becoming the next Federal Reserve Chairman have once again surged significantly.

    Golden Finance reports that the increased, rising to 54% on Polymarket and 51% on Kalshi, with the probabilities of Walsh and Waller being nominated by Trump ranking second and third respectively.

  • China Merchants Bank: The yen carry trade may undergo a sustained reversal, exerting long-term downward pressure on global asset liquidity.

    China Merchants Bank released a research report stating that on December 19, the Bank of Japan raised interest rates by 25 basis points, raising the policy rate to 0.75%. Although the Bank of Japan is highly likely to remain very cautious in its pace of rate hikes, the reversal of yen liquidity and the Japanese bond market will continue to suppress global financial conditions.

  • A new address withdrew $2.5 million worth of LINK from Binance.

    according to on-chain analyst Ai Yi's monitoring, the new address "0xf44…b1CC43" withdrew 199,517 LINK from Binance hours ago, worth 2.5 million USD.

  • ETH breaks $3,000

     the market shows ETH breaking through $3000, currently at $3002.51, with a 24-hour increase of 2.19%. The market is highly volatile, please manage your risk accordingly.

  • BTC breaks through $89,000

    the market shows BTC breaking through $89,000, currently at $89,017.66, with a 24-hour increase of 1.03%. The market is highly volatile, please manage your risk accordingly.

  • BTC breaks through $88,500

     the market shows BTC breaking through $88,500, currently at $88,549.08, with a 24-hour increase of 0.69%. The market is highly volatile, please manage your risks accordingly.

  • Nasdaq-listed Mangoceuticals plans to launch a $100 million SOL digital asset treasury.

     Nasdaq-listed company Mangoceuticals announced it will cooperate with Cube Group to establish a subsidiary, Mango DAT, to advance the strategy of building a $100 million SOL digital asset treasury (DAT). The related funds will be raised through an ATM financing plan and the sale of common stock. It is reported that the company has also submitted a "MULTI-DAT" trademark application to the United States Patent and Trademark Office to promote a series of strategic digital asset and DeFi plans.

  • BTC breaks through $88,000

    the market shows BTC breaking through $88,000, currently at $88,016.61, with a 24-hour increase of 1.59%. The market is highly volatile, please manage your risk accordingly.