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

  • David Sacks: The U.S. government’s premature sale of Bitcoin has cost U.S. taxpayers more than $17 billion

    White House AI and cryptocurrency chief David Sacks posted on social media, "The early sale of Bitcoin by the US government has cost American taxpayers over $17 billion. Now, the federal government will develop a strategy to maximize the value of its Bitcoin holdings."

  • David Sacks: The U.S. government will not acquire other crypto assets for strategic reserves except for confiscated assets

    White House AI and cryptocurrency chief David Sacks posted on social media that President Trump's executive order also established the U.S. Digital Asset Reserve, which includes digital assets other than Bitcoin confiscated in criminal or civil litigation. In addition to assets obtained through confiscation procedures, the government will not acquire other assets for the reserve assets. The purpose of the reserve is to manage government digital assets under the leadership of the Treasury Department.

  • Forbes reporter: Trump's executive order will establish two types of digital asset storage mechanisms

    Forbes reporter Eleanor Terrett wrote on X platform that Trump's executive order will establish two different digital asset storage mechanisms: Bitcoin Strategic Reserve and Digital Asset Reserve. The Bitcoin Strategic Reserve will contain approximately 200,000 BTC obtained through criminal and civil forfeitures, with the government authorized to explore ways to acquire more bitcoin without increasing the taxpayer burden. The Digital Asset Reserve will include other digital assets such as XRP, ADA, ETH, and SOL, but the government will not actively seek to purchase these assets. The executive order also requires a comprehensive audit of all digital assets held by the government. According to David Sacks, the purpose of the reserves is "responsible management of government digital assets by the U.S. Treasury Department."

  • In the past hour, the entire network has liquidated 152 million US dollars, mainly long orders

    Data shows that in the past 1 hour, the entire network has liquidated $152 million, with long positions liquidated $119 million and short positions liquidated $33.3292 million, with the main liquidation being long positions. Among them, ETH liquidated $12.5215 million and BTC liquidated $88.1221 million.

  • August Completes $10 Million Financing, Led by Dragonfly Ventures

    On March 7th, it was reported that the cryptocurrency broker August completed a $10 million financing round, led by Dragonfly Ventures, with participation from Foresight Ventures, Standard Chartered Bank, and 6th Man Ventures. The funds raised will be used to develop marketing strategies, hire more employees, and continue to develop new technologies. August is a brokerage company focused on cryptocurrencies, aiming to connect customers with lending cryptocurrencies and providing derivatives and token trading on the DeFi network, including Aave, Morpho, and Uniswap.

  • Hong Kong SAR Legislative Council Member Wu Jiezhuang: Hong Kong does not have an official currency

    Hong Kong Legislative Councilor Wu Jiezhuang said that Hong Kong does not have an official currency. Some citizens and Web3 practitioners have asked me about someone impersonating the Chief Executive to post on the X platform that they will launch the Hong Kong Coin on the Solana chain (launch of the National Hong Kong Coin). The government has sternly clarified that the information is absolutely false and intentionally deceptive. Please remember to be careful and not to mislead and fall victim to fraud.

  • Trump family’s WLFI project purchased $25 million in WBTC, ETH and MOVE tokens

    According to Arkham monitoring data, the wallet of the Trump family's project World Liberty Fi (WLFI) has just transferred 25 million USDC to an independent contract. The contract then purchased $10 million worth of ETH, $10 million worth of WBTC, and $1.5 million worth of MOVE tokens. After the purchase was completed, these assets were transferred back to WLFI's main wallet. This move is seen as a signal that the Trump project is further entering the cryptocurrency market, although its specific strategic intent is not yet clear.

  • Circle mints another 250 million USDC on Solana

    According to OnchainLens monitoring, Circle has minted an additional 250 million USDC on Solana. As of now, they have minted a total of 9.25 billion USDC on Solana by 2025.

  • US spot Bitcoin ETFs saw a net inflow of $21.7 million yesterday

    According to TraderT monitoring, the net inflow of the US spot Bitcoin ETF was 21.7 million US dollars yesterday.

  • US media: TSMC invests another $100 billion in the US; Trump still considers imposing tariffs on Taiwanese chips

    Golden Finance reported that TSMC is investing another billion US dollars in the United States, but the US "Wired" magazine reported on the 4th that an informed source said that this move did not stop the Trump administration from considering imposing potential tariffs of up to 100% on TSMC and other Taiwanese chip factories. The source said that one plan is that the tax objects will not only be Taiwanese chips themselves, but also electronic products such as iPhones equipped with Taiwanese chips. According to Wired magazine, the White House and the US Department of Commerce did not immediately comment, and TSMC declined to comment. (Jinshi)