The Growing Pool of Automated Market Makers

By Daniel Dal Bello, Director.
May 9, 2021–13 min read

Hillrise Group
Hillrise Research

--

Automated Market Makers (‘AMM’) have become a focal point in the current discussion of the exchange business. With giants like Coinbase listing on the Nasdaq, the discussion about AMMs taking the spotlight from these incumbents has become increasingly relevant.

When you think of AMMs, Uniswap (v2) typically comes to mind. Their model follows the classic x * y = k constant product formula that most initiated in DeFi are familiar with. Other popular AMMs like Sushiswap or Pancakeswap use the same constant product model, but innovate more in platform features.

We won’t be discussing that in detail here as we’ve written about these concepts before in our DeFi Primer. If video is more your style, watch this Defi Weekly video where Kerman wonderfully distills the concept of AMMs.

Constant Product Model by Vitalik Buterin.

The simplicity of the constant product model brought about tremendous adoption, yet is not without limitations. For instance, slippage can be extremely high for large trades relative to the trading pairs liquidity, at increasing rates. Liquidity provided has also been argued to be non-optimal from a capital efficiency perspective due to the bonding curve. As such, a variety of innovations have appeared, some looking to replace the constant product model, others looking to co-exist by serving a niche segment.

In the following sections, we’ll go through some of the other AMM models that we have come across, some old and some new. For this article, a sufficient understanding of Uniswap and how it functions is assumed.

Curve Finance

Curve.fi Homepage

Curve Finance is a specialised DEX that has a focus on stable-swapping assets that should have the same price. Some examples of these are swapping between USDT and USDC or WBTC and renBTC. The idea is that within their pairs, the value of both assets should be at parity. This remains true as long as these tokens are fundamentally sound — any price deviations are arbitraged by the market.

Curve’s AMM model vs Uniswap’s taken from TheDefiant

While Uniswap can also keep stable pairs at parity via the constant product model, Curve uses a variant with a “flattened” region in the middle of the bonding curve that ensures a greater range of stable prices when moving between 2 quantities of tokens. This effectively reduces the price slippage down to less than 1% (often 0.01–0.05%) for the majority of trades that occur within the stable range. This is often not possible in Uniswap when trading large size relative to available liquidity.

An additional aspect of Curve is the extremely low fees at ~0.04% that is significantly lower than Uniswap’s 0.3% fees.

Here’s a hypothetical instance of tokens falling off-peg: WBTC may begin to trade at a discount to renBTC if users begin to discover that their WBTC can no longer be redeemed 1:1 for its underlying native BTC. The market is likely to sell off as much WBTC for renBTC (and other BTC forms) as possible, with few attempting to arbitrage it back to parity. Once it’s out of the stable range, prices will change very quickly.

Why would users want to use Curve.fi?

  • Bring usefulness to passive, stable assets without wanting to take any price risk, earning transaction fees
  • Earn CRV and veCRV rewards
  • Converting between parity assets such as USD or BTC derivatives with low slippage and fees.
  • Supporting the price stability for synthetic assets using Curve as a stabilisation mechanism e.g ArcX’s experimental LINK-USD stablecoin using a curve pool to bring it closer to dollar parity.

You can read more about Curve’s AMM model here.

Balancer

Balancer Exchange Pools

To a large degree, Balancer is similar to Uniswap in that it uses the same constant product model and fees are paid to each liquidity pool for relevant trades. However, key differentiating factors are that each pool can consist of up to 8 different tokens and the creator can pre-determine the fixed proportion of each token in a public or shared pool. Private pools differentiate themselves by having freely changeable parameters, limited only by pool creators being able to add liquidity.

“Smart Pools” are an advancement to public or shared pools by allowing users to dynamically change the features of the pool such as the respective asset weights or pool fees. They are a good middle to public and private pools, allowing for very advanced use-cases.

One of the more commonly used ones is for launching new tokens via a Liquidity Bootstrapping Pool (“LBP”). LBPs for new launches typically have a decreasing price function when demand slows by increasing the weight of DAI or decreasing the weight of the token sold. LBPs are also run over a couple of weeks or months to facilitate this mechanism. Thus, FOMO-induced buying is reduced and a greater demographic of users may be able to participate by waiting for a better price.

Why would users want to use Balancer?

  • Automated portfolio rebalancing.
  • Put idle assets to use and accrue fees on liquidity provided with lower levels of impermanent loss.
  • Trading with lower slippage and fees (for some pools e.g ETH/DAI @ 0.15%).
  • Launching/purchasing token launches via LBPs.
  • Creating Index Funds, KYC and really anything innovative you can dream up.

You can read in more detail about Balancer’s AMM model in their FAQ.

Dodo Exchange

Dodo Exchange Homepage

Officially launching in August 2020, DODO’s Proactive Market Maker (‘PMM’) model is a relatively new innovation to AMMs. Instead of the x * y = k constant product model, PMM uses the formula Pmargin = iR, where i represents the current market price and R is the risk factor. The constituents of R are key to the PMM model and you can read more about the intricacies of the formula here.

Dodo’s PMM vs Uniswap’s Constant Product Model

Overall, DODO provides a fairly similar trading experience to Uniswap but aims to provide better liquidity and price stability via its PMM model. At its core, it simply adjusts parameters in anticipation of changes in market conditions.

Some levers include changing asset ratios or the slope of the curve. In the GIF above, you can see how the price curve shifts proactively with the market’s upwards direction.

Why would users want to use DODO?

  • Traders may enjoy lower slippage on volatile assets as compared to Uniswap, assuming similar liquidity conditions.
  • Put idle assets to use and accrue fees on liquidity provided with lower levels of impermanent loss.
  • Providing single-sided liquidity, earning fees while enjoying full price exposure to their supplied asset.
  • Create highly customisable pools for various purposes including the launching of new tokens.

You can read more about DODO’s PMM model here.

Bancor

Bancor’s Homepage

Bancor is one of the oldest DEXs having launched in the middle of 2017, near the peak of the last bull market. While the platform was relatively unloved in its early years, it has recently managed to attain product-market fit by solving the classic AMM issue of impermanent loss (‘IL’). It achieved this via its IL-protection scheme that launched with Bancor v2.1.

The DEX follows the same constant product model as Uniswap with its own twist. The native BNT token is the opposing side for all liquidity pairs. For example, ETH/BNT and WBTC/BNT. A trade from ETH to WBTC will be conducted “inter-pool” simultaneously, rather than “intra-pool” which is what we’re familiar with. This is in contrast to other platforms where any two tokens can be paired up.

By having all tokens paired up with BNT, v2.1 enables users to enjoy IL-protection and single-sided staking. IL-protection works by compensating Liquidity Providers (‘LP’) for any IL with BNT tokens. This catch is that coverage only grows at a rate of 1% per day and LPs can only enjoy 100% coverage after being an LP for 100 days.

Another key feature over Uniswap is the ability to add single-sided liquidity. For example, only adding WBTC to enjoy full price exposure to this asset. The protocol achieves this by having dynamic caps to each side. If too much WBTC is added without a corresponding rise in BNT supplied then new WBTC can only be added after more BNT is supplied.

Trading fees vary from 0.1% to 5% depending on the pool, with most within the 0.1–0.5% region. This is not too different from Uniswap’s 0.3% swap fee.

Why would users want to use Bancor?

  • Providing single-sided liquidity, earning fees while enjoying full price exposure to their supplied asset.
  • Providing liquidity and enjoying IL-protection.
  • Speculating on BNT upside by providing BNT liquidity and earning BNT rewards.
  • Trading at lower fees than uniswap for common assets (ignoring potential slippage).

You can read more about Bancor v2.1 here.

Uniswap v3

Uniswap v3 blog graphic

On March 24 2021, the Uniswap team unveiled Uniswap v3, expected to be up to 4000x more capital efficient than v2. The team is first targeting a launch on Ethereum in May and later on Optimism when it’s operational.

A key focus of v3 is solving the capital inefficiency constraints of v2’s constant product model with the ability to have liquidity concentrated only at various price points. In v2, the majority of liquidity is never put to use and users only earn a small portion of their capital in fees, likely not compensating for the risk of IL. With v3, users can construct “individualised price curves” and provide a greater amount of liquidity in a price range, reflecting their own risk preferences.

Uniswap blog graphic indicating concentrated liquidity between 2 price points

As long as prices remain within the user’s price range, he can support larger trading volumes and earn more fees. However, out of the range, he no longer earns fees as he might in v2. Given the dynamic nature of liquidity provided, there will inevitably be price regions where little to no liquidity is provided. The team expects the broader market to actively shift liquidity around to take advantage of these asymmetric opportunities.

V3 also brings about the ability to create range orders that can be thought of as a hybrid between a limit order and an LP position. When prices enter the range, the underlying asset is sold for the other along the range. Trading fees are accrued in the process.

The non-fungibility of LP positions is a side effect of this new model. LP positions have to be tokenized via NFTs instead of current ERC-20 LP tokens. Furthermore, trading fees have to be manually reinvested back into pools.

Fees will no longer be fixed at 0.3%, rather they will have 3 separate tiers: 0.05%, 0.3% and 1%. This will provide LPs with a greater ability to customise pools and their respective risks. The drawback is the potential for liquidity fragmentation.

Why would users want to use Uniswap v3?

  • Creating “limit orders” via range orders and earn additional fees in the process
  • Earning high yields by providing liquidity in specific areas.
  • Gain v3 LP tokens that will undoubtedly be needed for a new generation of yield aggregators and farms building an ecosystem around v3.
  • Trade with potentially lower slippage than DEXs.
  • (More that have yet to be discovered).

You can learn more about Uniswap v3 here.

Integral HQ

Integral homepage

Integral is a new AMM which recently launched their platform along with a fair-launch mining program. At first glance, it seems similar to Uniswap v3 due to their focus on concentrated liquidity provisioning–they suggest the ability to have 3x the liquidity that Binance has.

What makes Integral stand out from Uniswap is that it is not focused on active management of concentrated liquidity positions due to the complexity from a user perspective. Rather, Integral focuses on keeping liquidity concentrated around the middle.

Something unique about Integral is the ability to prevent impermanent loss via the implementation of a 5-minute trade delay. Coupled with the 5-minute delay, the arbitrager would have to buy at the time-weighted average price (‘TWAP’). As the team suggests, this lowers the probability of a successful arbitrage, thus reducing their expected value (‘EV’) of their profits. With high gas fees, the expected margin might be negative, making it an impossible trade.

Any imbalances are deemed to be “cyclical” in nature, which eventually reverts back to 50:50 with enough time. The imbalances are not to do with the number of tokens pooled but to do with the price of one side moving up. As the project begins to move towards maturity, it will be extremely interesting to see how its innovation gets adopted.

Why would users want to use Integral?

  • Put idle assets to use and accrue fees on liquidity provided with lower levels of impermanent loss.
  • Traders will enjoy lower trading costs than even a centralised exchange such as Binance.
  • Earn ITGR tokens by providing liquidity during the 3 month LP farming phase starting 30 March, released over 6 months from April’s upcoming listing.

You can read more about Integral’s AMM model here.

Kyber Network

Kyber Network’s Kyberswap Homepage

Kyber Network launched in Feb 2018 as one of the early players within the AMM space. It runs off a “reserve model” where it aggregates liquidity from 3 types of reserves: (1) Automated Price Reserves (“APR”)”, (2) Price Feed Reserves (“PFR”) and (3) Bridge Reserves (“BR”). BR allows Kyber to connect with other DEXs like Uniswap for greater liquidity.

The network is transitioning into its Kyber 3.0 upgrade with the notable addition of its new Dynamic Market Maker (“DMM”) model. The DMM is essentially a programmable pricing curve reminiscent of Uniswap v3, improving upon the old Kyber APR model, bringing Curve-style stable swaps, Uniswap-style liquidity pooling and a lower amount of IL.

Taken from Kyber Network’s DMM Whitepaper dated Feb 21

The DMM model will still use the constant product formula, but utilise both real and “virtual balances” in the form x * y = k and x’ * y’ = k’, respectively. The virtual balance implements something called an “amplification factor” that is applied to the real liquidity, increasing its capital efficiency and provides a better trading experience with lower slippage and spreads.

The drawback is that pools are no longer asymptotic in nature, where the pool can never truly run out of tokens (rates just get exponentially worse). Rather, the price range will now be fixed within a defined range. This will work well for stable swapping similar to Curve — the amp on a small liquidity pool could be significantly cranked up for greater capital efficiency.

Fees are also a large focus of the new DMM model, introducing dynamic fees that adjust to market conditions e.g fees going up in volatile conditions. In turn, liquidity providers will experience lower levels of IL from higher fees as an offset.

With the size and depth of the Kyber 3.0 upgrade, the paragraphs above are indeed unexhaustive. Other benefits include improved functionality for professional market makers and more efficient gas usage. With the DMM beta recently launched on 5 April 2021, we’ll be keeping a close eye on it to see its performance and levels of adoption in the coming months.

Why would users want to use Kyber 3.0?

  • Put idle assets to use and accrue fees on liquidity provided with lower levels of impermanent loss.
  • Market make professionally without needing to deploy and maintain inhouse reserve contracts
  • Enjoy lower gas costs when trading as a taker
  • Earn protocol revenue from fees as a holder of the KNC token

You can read more about Kyber’s DMM model here and the 3.0 upgrade here.

Honorable Mention: Thorchain

Asgardex homepage

Thorchain is the first real decentralised cross-chain liquidity protocol that does not require wrapping assets like Binance Smart Chain does. Its Continuous Liquidity Pools (‘CLP’) is reminiscent of Bancor where every pooled asset is paired with the platform’s native RUNE token. Thus, swaps are made inter-pool rather than intra-pool. Instead of the constant product formula, they use the formula shown below.

Swap formula

Fees come in 2 parts: network and slippage fees. Network fees are paid as a multiple of the outgoing chain stored gas. The CLP model includes a liquidity-sensitive slip-based fee that leads to better value capture and access-control than Uniswap’s model.

For example, with a fixed 0.3% fee, there is poor incentive for low-depth pools to capture more liquidity. With dynamic fees, liquidity providers may end up more profitable with low-depth pools instead. With regards to access-control, slip-based fees solve the pool’s exposure to ‘sandwich attacks’, due to the increasingly costly nature of it.

The dynamic nature of its fees also appears to help reduce the impact of IL by generating more fees for LPs, offsetting it.

Why would users want to use Thorchain?

  • Conducting true cross-chain swaps without having to deal with custodial risk from wrapped assets (WBTC, bBTC).
  • Put idle assets to use and accrue fees on liquidity provided with lower levels of impermanent loss.
  • Generate RUNE rewards by securing the network with a ThorNode.
  • Arbitrage any opportunities for profit.

You can read more about Thorchain’s model here.

We’ve come a long way since the early days of only trading on CEXs, to clunky trading on EtherDelta and now to our “golden age” of AMMs. There’s innovation everywhere and we’re certain there is more to come. On a final note, go out and try every AMM — you’ll never know when you’ll enjoy a retrospective airdrop.

If you come across any inaccuracies or major changes in the AMMs above, do not hesitate to reach out to the author or anyone in the Hillrise team.

Hillrise Capital is an independent research and advisory firm exclusively focused on early-stage blockchain startups and crypto-assets.

Connect with Hillrise Capital
https://hillrise.capital/join-us
https://hillrisecapital.medium.com
https://twitter.com/hillrisecapital

--

--

Hillrise Group
Hillrise Research

Hillrise Group is a blockchain-native venture capital and consulting firm supporting emerging Web3 startups.