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

  • The U.S. Department of Government Efficiency needs “revolutionaries with super high IQs who are committed to small government reform”

    the newly established Department of Government Efficiency (DOGE) in the United States has released an official statement via their X account, thanking thousands of Americans for their interest in joining the department. However, they have made it clear that they do not need "part-time creative contributors," but rather "revolutionaries with super high intelligence who are committed to small government reform." Applicants are required to work more than 80 hours per week and focus on plain and simple cost reduction. Applicants who meet the requirements can submit their resumes via private message, and the top 1% of outstanding applicants will be personally reviewed by Elon Musk and Vivek Ramaswami.

  • SEC Chairman Gary Gensler Makes Final Lobbying Call for US Crypto Regulation

    according to institutional reports, US Securities and Exchange Commission (SEC) Chairman, Clayton, is making a final push to allow the agency to regulate the cryptocurrency market before the Trump administration's term ends and its enthusiasm for digital assets wanes. In a speech prepared for a legal conference in New York on Thursday, Clayton reiterated that the agency should focus on "road rules" applicable to cryptocurrency sales and intermediaries such as brokers and exchanges to support proper disclosure. Clayton stated that the experience of the Great Depression made decision-makers aware of the "importance of disclosure terms, as information about securities creates a public product". (Jinshi Data APP)

  • U.S. money market fund assets exceed $7 trillion for the first time

    according to data provided by Crane Data, which has long been researching the currency market fund field, as of the week of November 13th, the management assets of US currency market funds increased by about $91 billion, and the total scale exceeded $7 trillion for the first time, which is a milestone for the industry. Due to the high and reliable yield, the popularity of this industry among investors has risen sharply. Before reaching the $7 trillion mark, the scale of US currency market assets hit a historic high for several consecutive months, which refuted doubts about whether the industry could continue to be popular as Federal Reserve officials lowered interest rates from their highest level in 20 years. After US policy makers cut interest rates by 50 basis points in September and another 25 basis points this month, investors continued to pour into currency market funds, mainly because the yield of these funds is higher than other tools, especially bank deposits. Compared with banks, the speed at which these funds transmit the impact of low interest rates is often slower.

  • Franklin Templeton Expands $410 Million Money Market Fund to Ethereum Blockchain

    Franklin Templeton expanded its $410 million money market fund to the Ethereum blockchain.

  • U.S. PPI rose 2.4% year-on-year in October, higher than expected

     US October PPI rose 2.4% year-on-year, estimated at 2.3%, with a previous value of 1.8%; the US October PPI rose 0.2% month-on-month, estimated at 0.2%, with a previous value of 0%.

  • The country's first digital RMB-based intellectual property securitization product was successfully issued

    "Yongxing-Guofu-Ningbo Intellectual Property Asset Support Special Plan (Specialization and Innovation)" with Yongzheng Asset Management as the manager and Yongxing Securities as the sales organization held a listing ceremony on the Shanghai Stock Exchange. The first issue size was 138 million yuan, with a term of 1 year and a coupon rate of 2.2%. The product's priority bond rating was AAA, and it was the first knowledge-based securities product to be invested in digital RMB form nationwide, and also a breakthrough in the Ningbo knowledge-based securities project.

  • Crypto venture capital Portal Ventures completes approximately $90 million in oversubscribed fundraising

    early blockchain venture capital firm Portal Ventures is close to completing the final fundraising for its second fund, which has a size of $75 million. Founder and general partner Evan Fisher said that the fund has been oversubscribed, with subscriptions reaching $90 million. According to documents submitted to the US Securities and Exchange Commission (SEC) in August, the initial target for the fund was $70 million, but Portal later decided to raise the ceiling by $5 million.

  • BIT Mining Invests in Prosper's Native Tokens to Support New Focus on Bitcoin Mining

    ChainwireProsper, a decentralized protocol focused on bridging institutional-grade Bitcoin mining power on-chain, has announced a new investment in its native project token PROS by BIT Mining Limited. This investment aligns with Prosper's new strategic focus on Bitcoin mining and the broader Bitcoin ecosystem, which has been well-received by the community. Prosper partners with industry players to obtain various services and products to deliver institutional-grade execution in managing its mining hashrate. BIT Mining's investment represents another significant validation of Prosper's thesis by institutional backers and supports its new vision.

  • From the US election to November 13, DOGE rose by 128%, outperforming Tesla and Bitcoin

    According to market data, from November 5th to November 13th, Dogecoin had the most eye-catching increase, surpassing the more focused Tesla and Bitcoin. On November 14th, Dogecoin and Bitcoin continued to rise. As of November 13th, Dogecoin increased by 128%, Coinbase increased by 47%, Tesla increased by 31%, Bitcoin increased by 29%, the banking sector increased by 10%, small-cap stocks increased by 4.9%, the S&P 500 increased by 3.6%, and the US dollar index increased by 3.1%. In addition, long-term US bonds, crude oil, gold, and Trump media all experienced a decline.

  • Binance Labs transferred the tokens of 4 invested projects to Gate Exchange 1 hour ago

    On November 14th, according to on-chain analyst Yu Jin, Binance Labs may be preparing to sell tokens from some of its investment projects. One hour ago, Binance Labs transferred tokens from four of its invested projects (with a total value of approximately $2.79 million) to the Gate exchange. These tokens include: