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

  • AI Big Model Empowers Cryptocurrency Market, BitradeX Leads Industry Transformation with Forward looking Layout

    The latest industry analysis from BitradeX points out that the explosion of AI big model technology is bringing revolutionary changes to the 24/7 uninterrupted operation of the cryptocurrency market. The all-weather trading characteristics and high market volatility provide unique advantages for AI enabled quantitative trading. BitradeX has been the first to launch an AI Bot product by deeply integrating cutting-edge big model technology with high concurrency quantization systems, achieving millisecond level market analysis and intelligent decision-making. The platform believes that the combination of AI and encryption will reshape the industry landscape, and in the future, the competition core of exchanges will shift from simple trading to intelligent investment services. BitradeX has taken the lead in laying out and leading this wave of change. Official website address: bitradex.com

  • DWF Labs Partners: Hold USD1 to get Falcon Finance closed beta test qualification

    On April 12th, DWF Labs managing partner Andrei Grachev posted on social media that as long as users have the stablecoin USD1 in their on-chain wallet, they can directly access the closed beta testing of the stablecoin protocol Falcon Finance and enjoy its profits earlier than others. Falcon Finance is a synthetic USD stablecoin protocol launched by DWF Labs. Today, DWF Labs has started adding USD1 liquidity on-chain.

  • DWF Labs has deployed USD1 liquidity on ETH and BSC, and USD1 will be officially launched

    according to @EmberCN monitoring, DWF Labs has begun deploying the USD1 liquidity of the DeFi project WLFI supported by the Trump family on the chain, marking that the stablecoin now supports on-chain circulation and trading. Data shows that in the past 8 days, the DWF Labs address has received 11 million USD1 tokens from WLFI on both the Ethereum and BSC chains.

  • 🚀NEXUS 2140 KOREA

    🌍AI· WEB3· ECOMGLOBAL EXPO📍 Goyang, South Korea📅 2025.6.21-22✅ Convergence of 🌟 top-level resources🇰🇷 Supported by the Korean government | 🤝 500 Global Enterprises 🌐 | 150 Investment Institutions 💰 | 3000 KOL 📢✅ Frontier field coverage 🚀AI 🤖 | Web3 🌐 | ECOM's 🛒 three tracks, detonating future business opportunities! 💥✅ High-spec exposure 📡100M media traffic 🎥 | 30K Social Buzz 💬 | The world's top media cooperation 🌎✅ Celebrity event blessing 🎉Summit Forum 💼 | Project Roadshow 🏆 | 15,000 people concert 🎤🌟 | Community dinner 🥂 for 1,000 peopleStrong support from the government, international recognition and praiseConvergence of cutting-edge fields|Industry elites gathered———————————————🚀 Infinite innovation, unlimited 🔥 business opportunities

  • EU Trade Commissioner proposes zero-to-zero tariffs on goods to US

    European Commission Trade Commissioner Dombrovskis: We propose zero tariffs on goods to the United States, and if no trade agreement is reached, we are also prepared to respond. If necessary, we are prepared to take retaliatory measures.

  • BTC breaks through $82,000

    market shows BTC breaking through $82,000, now reported at $82,025.05, with a 24-hour increase of 0.19%. The market fluctuates greatly, please be prepared for risk control.

  • The State Council Tariff Commission: Adjustment of tariffs on imported goods originating from the United States

    on April 10, 2025, the U.S. government announced that the tariff rate for Chinese goods imported into the U.S. will be further increased to 125%. The U.S. imposing excessively high tariffs on China seriously violates international economic and trade rules, as well as basic economic laws and common sense, and is completely unilateral bullying and coercion. In accordance with the "Customs Law of the People's Republic of China," the "Customs Law of the People's Republic of China," the "Foreign Trade Law of the People's Republic of China," and other laws and regulations, as well as basic principles of international law, with the approval of the State Council, the measures of imposing tariffs on imported goods originating in the U.S. will be adjusted starting from April 12, 2025. The relevant matters are as follows:

  • Plastic Labs Completes $5.35 Million Pre-Seed Funding and Launches AI Identity Platform Honcho

    Plastic Labs has completed a $5.35 million Pre-Seed round of financing, led by Variant, White Star Capital, and Betaworks, with participation from Mozilla Ventures, Seed Club Ventures, Greycroft, and Differential Ventures. Angel investors include Scott Moore, NiMA Asghari, and Thomas Howell. At the same time, its personalized AI identity platform "Honcho" is now open for early access.

  • Trump: There will be problems during the transition, but it will ultimately be an incredible thing

    President Trump of the United States: There will be problems in the transition phase, but in the end it will be an incredible thing.

  • A whale transferred 2,300 ETH that he had held for two years to Kraken

    according to The Data Nerd's monitoring, a whale address that has held ETH for two years just transferred 2300 ETH (about $3.58 million) to Kraken.