The Blessing and Curse of Automated Market Makers

Automated Market Makers (AMMs) have powered decentralized finance, but they also have several challenges to overcome. Here is how they are resolved.

Photo by Roman Melnychuk on Unsplash

There is no doubt about it. Decentralized finance (DeFi) has surged since 2021, from just over $20 billion to nearly $160 billion in March 2022, against an increase in the total cryptocurrency market from $433 billion to $2.5 trillion over the same period.

We are in a crypto winter now. But it’s unlikely to last forever.

There is still optimism in the crypto community and market value will largely return for major crypto assets in the months and years to come.

Automated Market Makers (AMMs) have driven the rise of DeFi. While centralized exchanges behave like a custodian of their clients’ funds and function as a matchmaker for demand and supply, decentralized exchanges (DEX) do not have a custodian.

Peer-to-peer trading is facilitated by a traditional AMM mechanism which states that the product of two assets must always equal a constant. If Bitcoin and Ether holders put $100 into a pool, the product of the two assets must always equal $100. If, however, a holder buys more Bitcoin, then the price of Bitcoin increases, and the other side supplies more Bitcoin so that the equation balances out. The hope is that the pool has many liquidity providers so that there is never a situation where the price of an asset rises so quickly that there is not enough liquidity to facilitate a trade at a reasonable price.

Market makers and liquidity

There is no doubt: MAs have played a vital role in creating liquidity in the global market. The latest searches by Gordon Liao, Head of Research at Uniswap Labs, and Dan Robinson, Head of Research at Paradigm, show that “Uniswap v3 has approximately 2x greater market depth on average for spot ETH-Dollar pairs”, compared to its centralized counterparts.

Liquidity – sometimes measured by market depth – refers to the amount an asset can be exchanged for another asset at a given price level. One of the reasons for greater market depth is that MAs can unlock a more diverse set of passive capital and institutional investors who have different risk profiles.

Other AMM designs have emerged since Uniswap, recognizing that the product of two tokens, X and Y, always equaling a constant, K, is not always the most efficient trading strategy – i.e. x *y=K – as Haseeb Qureshi, managing partner at Dragonfly Capital, pointed out in 2020.

When a buyer buys large amounts of X, they may experience slippage, which is when buying a token drives the price up before the order finishes executing it (or selling it lowers the price). Slippage can be costly, especially during periods of heavy trading.

But here’s a catch.

DEXs began offering extreme incentives for people to stake tokens in exchange for governance rights (and often a slice of protocol revenue), leading to “curve wars,” which is a label. for the current race to offer better exchange conditions. The race to offer better terms may have unintended consequences for the creation of mercenary capital, but there are also advantages: the requirement to stake tokens in exchange for governance rights has also created a lot of good.

At the forefront

Although there are many Comparative advantages that DEXs hold over centralized exchanges, including greater security and opportunities for community building among token holders, AMMs are flawed.

One of the main limitations of AMMs is the phenomenon of “front running”, which occurs when another user places a similar transaction as a potential buyer, but resells it immediately afterwards. Since the transactions are public and the buyer has to wait until they can be added to the blockchain, others can see them and possibly make offers.

Front runners do not attempt to execute the trade; instead, they simply identify transactions and bid on them to drive up the price so they can resell and make a profit.

By “sandwiching” a buyer’s initial offer with a new offer, the speculator has the effect of extracting value from the transaction. In practice, miners are often the catalysts for front running, leading to the term “miner’s extractable value” (MEV), referring to the rents that a third party can extract from the initial transaction. These sandwich attacks were largely automated and implemented by bots, representing the bulk of the MEV.

Unfortunately, these attacks are driven by an inherent incentive problem with second-generation blockchains. “Validators may not have strong enough incentives to monitor private pools because it lowers their MEV, so the execution risk for users joining these private pools increases,” Agostino Capponi, associate professor of engineering, remarked. industrial and operations research at Columbia University, explains to Magazine.

Capponi, in collaboration with co-authors, develops this in a recent working paper this shows how private pools do not solve this leading risk or reduce transaction costs – other solutions are needed.

Capponi continues, “High profile attacks not only cause financial loss for traders in the DeFi ecosystem, but also congest the network and diminish the overall value of blockchain stakeholders.”

Front running can also affect the supply of cash. Price oracles – or mechanisms that provide price information – play a vital role in ensuring adequate liquidity in the market.

If the latest prices are not reflected “on-chain”, then users could face the price with trades and make a profit. Suppose the last price of ETH is not reflected on an exchange, which has it lower. Then, a user could buy ETH at its real price but potentially resell it for more, making a profit.

Demanding business models

AMMs were a revolutionary quantitative mechanism enabling peer-to-peer trading, as they instantly settle transactions after they are confirmed and included in the blockchain, and they allow any user to contribute liquidity and any buyer to trade tokens.

However, MAs have largely relied on future growth expectations to determine their valuations; transaction fee income is not only low, but also fundamentally tied to liquidity providers – not the exchange. In other words, while Uniswap might consider fees as revenue, the way smart contracts are written is such that revenue goes directly to liquidity providers.

Since trading fee APRs can be low, especially in new AMMs, DEXs rely on their governance token offering for incentives, which requires high price valuation to integrate and hold trades. liquidity providers. These providers are often “mercenary capital” – going where the short-term return is greatest.

The reality of Uniswap’s business model is not an indictment; it creates incredible value, as evidenced by recent estimates of its daily trading volume of around $131 million. On the contrary, the fact that it does not generate revenue is a function of its business model and actually makes Uniswap more of a public good for members of the DeFi community than anything else.

Just because AMMs are an integral part of DeFi doesn’t mean there aren’t financial viability issues…

“[AMMs] offer full service but do not adequately capture the value they provide through their token… current models simply do not allow for the transition from speculation before revenue to sustainability after money,” according to Eric Waisanen and Ethan Wood, co-founders of Hydro Finance, in their April white paper.

Front-running is a problem largely because pending transactions are usually visible, so a bot can detect it, pay higher gas fees, and so the miner processes the transaction first and impacts market prices.

One way to avoid this is to hide transactions. The use of zero-knowledge proofs and other privacy-preserving solutions is becoming increasingly popular as it is designed to minimize forward travel and MEV attacks by hiding the size and time of transactions that are submitted and verified.

Hydro Finance is a relatively new project being built on the Secret Network, a privacy-preserving blockchain with “smart contracts containing encrypted inputs, outputs, and state….an encrypted mempool,” according to the Network. They are working to resolve these issues with MAs.

How?

Hydro tries to decouple itself from ongoing reliance on external liquidity providers by developing its own Protocol Owned Liquidity treasury, and it also codifies buying pressure through inflation of the assets it backs. Instead of giving all trading fees to the liquidity providers, the DAO controls the revenue and the liquidity providers receive the DRO token.

“AMMs, in their current form, are impractical but necessary services on which the growth of DeFi is based. It is imperative that we evolve them beyond their initial shortcomings for the ethos of freedom and decentralization of finance to mature,” said co-founder Waisanen.

New business models may be required to support the community in the future. Curve wars that have been seen in 2021 are not sustainable in the long run as there is not enough demand for different tokens.

Ultimately, the value of a token comes down to the value of the community, which requires a core team to lead and drive traffic. Time will tell how the current challenges to the issues plaguing AMMs, but one lesson is clear: the DeFi community will need to apply enterprise best practices to make sustainable and scalable organizations successful.

This article was written by Christos A. MakridisChief Technology Officer and Head of Research at Living Opera. He is also a Research Affiliate with the Digital Economy Lab at Stanford University and the Chazen Institute at Columbia Business School, and holds a dual doctorate in economics and management science and engineering from Stanford University. Follow us on @living_opera!

Comments are closed.