Understanding NFT AMMs

Tom J. Pandolfi
10 min readSep 21, 2022

--

With the growing popularity of Sudoswap, and the rise of similar NFT AMMs on Solana, it’s important to look beyond the hype and understand what concentrated liquidity actually means for NFTs and traders.

Concentrated liquidity — Basics

I will keep it short, but if you’re interested in fully understanding how Automated Market Makers (AMMs) work and what sets them apart, you can read my previous article Understanding AMMs and Concentrated Liquidity.

TL;DR — Concentrated liquidity Market Makers (CLMMs) allow liquidity providers to decide at what prices their assets can be used by traders in a market, unlike constant product AMMs where liquidity is distributed evenly amongst all potential prices of an asset. Concentrated liquidity can be up to 4000x more capital efficient, but requires active liquidity management from liquidity providers.

Instead of liquidity providers supplying liquidity to every possible price of an asset (like in an x*y=k style AMM), they can choose to only provide liquidity in a finite range, often the range where the current trading activity is happening.

This is great for a few reasons:

1- Less slippage and better trades, as the price range with most trading activity benefits from much deeper liquidity.

2- Higher APRs for liquidity providers. Supplying only the area where trades are taking place, means traders use more of your liquidity, resulting in more trading fees received.

3- You can achieve the same depth, with less liquidity. Depending on how actively people update their concentrated positions, a CLMM can achieve the same slippage and depth as a normal AMM with only 10 to 25% of the liquidity that a normal AMM would need.

What is an NFT AMM ?

There are two kinds of NFT AMMs, those based on constant product curves, and those based on concentrated liquidity positions.

Constant Product NFT AMMs will commonly use an existing DEX like Serum or UniSwap and add an intermediary layer between the NFTs and the DEX. This middle layer makes the NFT fungible, by locking the NFT and minting a fungible floor token. This fungible floor token can then be traded on a DEX against USDC, SOL or ETH and should roughly be worth the current floor price of the NFT collection.

If someone wants to purchase a whole NFT from the pool, they must buy a fungible floor token from the DEX, and burn the token in exchange for an NFT.

The complexity of fungible floor tokens is in their minting/burning mechanisms, which can easily be abstracted away from the user. The same goes for the outsourced DEX and AMM infrastructure.

Examples: NFTX, NFT20, Solvent, Frakt, Elixir.

Concentrated Liquidity NFT AMMs (NFT CLMMs) allows liquidity providers (depositing NFTs/tokens) to create their own pools for NFTs, sell pools, buy pools, or trade pools.

Sell pools are effectively the sum of asking prices from an NFT owner. A seller says they want to sell X number of NFTs, and that each time someone buys from them, they want to increase their asking price.

Buy pools are the opposite, they are a sum of buy orders from an NFT buyer. A buyer decides they want to purchase X number of NFTs, and that each time someone sells them an NFT, they want to decrease their bidding price. The more NFTs are sold to the pool, the worse the price gets for the seller. This means more demand increases the price, and more supply decreases it.

Trade pools allow liquidity providers to supply both NFTs and fungible tokens into a micro-pool, set their own trading fee, and their own pricing curve (how the price of the NFT changes after each sale). Liquidity is not segregated into these micro-pools, instead an aggregator contract routes traders through the best one at any given moment. This makes CLMMs highly flexible, highly efficient but also more complex.

Examples: Sudoswap, TensorSwap, GoatSwap, HadeSwap.

Do we need NFT AMMs ?

NFTs are very hard to trade, putting aside the question of royalties, their small supply relative to fungible tokens make it very illiquid and volatile. There’s a clear demand for more financial infrastructure around these assets, but that can’t exist without a liquidity layer to build on top of.

The ambition of NFT AMMs is to be this liquidity layer for NFTs and replace marketplaces, unlocking the potential for a whole range of DeFi applications to be built.

However, there are fundamental challenges at the heart of NFT illiquidity, that AMMs have yet to overcome:

1- Nobody cares about fractionalisation

When NFTs are converted into fungible floor tokens there’s no buy-pressure on the fungible floor tokens and their fractions. The narrative that people are interested in purchasing fractions of NFTs, from collections they might be priced out of hasn’t panned out. If it were true, you would expect NFT droplets to trade at a premium, since they would be available to more investors and have lower barriers to entry. However, these tokens most often trade at a discount due to the nature of NFT AMM arbitrage, explained below.

Maintaining a peg between a fungible floor token’s price, and an NFT floor price is made difficult due to asymmetric arbitrage. Here’s how it works:

If the price of the fungible floor token raises above the NFT marketplace floor price, an arbitrageur should purchase an NFT from a marketplace, then trade it in the AMM in exchange for a fungible floor token. They then sell the token at a premium to what they purchased the NFT for. In this direction, the arbitrage is instant.

If the fungible floor token goes below the NFT marketplace, they should trade the cheaper token for an NFT from the pool, thus acquiring the NFT at a discount, then list the NFT on a marketplace. Result: you’re now waiting for someone to buy it, and holding on to the risk until someone does. In this direction, the arbitrage is risky and not-instant.

With fungible floor tokens, arbitrage only really works in one direction, resulting in these tokens prices being biased and almost always discounted from the floor price.

2- Low supplies relative to fungible tokens

An NFT collection usually only has 10k tokens, which is a problem for NFT AMMs. How many tokens can actually be in the AMM ?

Collections usually pride themselves on how few tokens are listed on secondary markets, however this bullish illiquidity cripples the usability of NFT AMMs.

But why not provide your NFT as liquidity on the platform ? You can still be bullish and keep your NFT in a pool ?

Yes, but then you have to accept that the NFT you withdraw may not be the same NFT you deposited. Since your NFT is being traded, you may be left with someone’s undesired NFTs. This game of who ends up with the unwanted NFTs leads us to another problem.

The hot potato problem

The non-Fungible nature of NFTs is in opposition with one of the core assumptions of an AMM.

AMMs use the mathematical expression x*y=k to reflect the change in price of asset X if people sell it to obtain asset Y. However in this formula, the assets X and Y are fungible, meaning that X can be worth any real number between 0 and infinity. There’s no value we can give X that would distinguish it in the pool and make the equation invalid.

However, if X is a group of NFT assets, then their traits, rarities, potential yield, and other characteristics make the value of X heavily reliant on the tokens which comprise it. The formula thus assumes that all supplied NFTs are equal making the pool only relevant for floor NFTs of equal value. This means an NFT AMM is an imperfect sample of the entire collection.

The assumption of the NFTs being fungible applies to both NFT CLMMs and constant product AMMs, however CLMMs can more easily get away with making trait specific micro-pools.

NFT AMMs need to have mechanisms against their pools going stale with trading, as traders swoop up the best NFTs and replace them with inferior NFTs of that same collection. Over time, the pool will be the result of the most unwanted NFTs in a collection.

This is best illustrated by the Degen Apes available in Solana NFT AMMs, where half of the remaining liquidity consists of the infamous pink dress degen apes.

Frakt addressed this problem early on, by adding randomised trading in their pools. While this makes the pool healthier and can be very gamified, it comes at the cost of trading experience and more difficult arbitrage.

Not all NFT AMMs are made equally

Another byproduct of Constant Product AMMs is they never run out of reserves for any asset in the pool. This is enforced through slippage. If there’s too much demand for one asset in the pool, the ratio between how much of assets X and Y are in the pool begins to change making the price of the asset with the most demand increasingly unfavourable. This balancing act is constantly occurring in an AMM.

The price becomes exponentially unfavourable, meaning that the more asset X is purchased, the faster its price trends towards infinity, so we never run out of asset X in the pool. With NFTs, it’s very easy to run out of reserves since their supply is so limited, and thus, it’s just as easy to get very high slippage.

With low liquidity, adding 1 ETH to buy the NFT drastically changes its price along the constant product curve.

Because collections are so small, and because they’re always traded as whole units, NFTs exacerbate the slippage problem of AMMs.

Liquidity in NFTs is too scarce for it to be evenly distributed between 0 and infinity like in a constant product AMM.

When providing liquidity using a constant product function, only around 25% of the liquidity is being used at the price ranges -50% and +50% of the current price.

Example: Solana Monkey Business is trading at 200 SOL. You provide 500 SOL of liquidity for SMBs in an AMM. Using a constant product curve, only 25% of your liquidity can be used by traders between the prices of 100 SOL and 300 SOL per SMB. This means the depth of the SMB pool in the price range near 200 SOL price is equal to 125 SOL. The price difference needed to make the trade for 1 SMB happen with the limited liquidity is resolved with slippage.

As per 0xmons’ example: a pool with 20 NFTs has a minimum slippage of around 5%.

We can add more NFTs and more SOL to have deeper liquidity, but this is very limited. Due to the scarcity of NFTs, they need to be supplied in a tighter price range to not inefficiently dilute liquidity across infinite potential prices.

In our previous example, a liquidity provider supplied 500 SOL worth of liquidity in a pool, resulting in a depth of 125 SOL at the price ranges +/- 50% from the current floor. With the CLMM model, a liquidity provider would only have to provide 125 SOL to achieve the same depth, and set the range to be +/- 50% of the current floor.

If trading activity in the pool is usually limited to this price range, then the liquidity provider earns the same amount in fees, but with only 125 SOL provided instead of 500 SOL. This effectively means their APR is 4x higher using a CLMM with a broad range, instead of constant product AMM.

This APR could be even higher, if the liquidity provider decides to supply liquidity in a tighter range than +/- 50%, but they will have to adjust it more frequently as the price changes.

NFT CLMMs offer better prices for buyers and sellers

In the world of concentrated liquidity, slippage is set by the curves chosen in the micro-pools and is more reasonable in the limits.

In a constant product (x*y=k) AMM, where X is an NFT collection, and Y is a fungible token like SOL, the price and slippage to buy multiple NFTs in the pool goes up exponentially the more NFTs are being purchased.

This results in the average price of buying multiple NFTs in an AMM to be very high.

Best to illustrate with a modified example from SudoSwap:

Let’s say 1 SMB = 200 SOL. We create a liquidity pool using a constant product function with 10 SMBs and 2000 SOL of liquidity.

Someone wants to buy 5 SMBs from this pool.

They buy the first SMB, and incur around 11% slippage, they have to pay 222 SOL to receive the SMB. They buy the second SMB, which the pool now quotes at 278 SOL per SMB, the third will cost 357 SOL, the fourth 476 SOL, and the fith 667 SOL. If the buyer wants to buy 5 SMBs, the average price will be 400 SOL per SMB.

Now let’s say the liquidity provider instead creates a micro-pool in a CLMM, and sets the price to go up by 10% after each sale.

The same buyer wants to buy 5 SMBs from this pool. The first would cost 200 SOL, the second 220 SOL, the third 242 SOL, the fourth 266 SOL, the fith 292 SOL. If the buyer wants to buy 5 SMBs with this CLMM, the average price would be 244 SOL per SMB.

Notice in the example above, that slippage doesn’t increase with every trade, and stays constant at 10%. This means the price doesn’t trend towards infinity, and the last (10th) NFT in the pool is worth 471 SOL instead of ∞ SOL.

Conclusion

That is the power of CLMMs, and why NFTs so desperately need them if we want to create deep liquidity that can support financial infrastructure such as liquidations, options, derivatives, leverage, and more.

Constant product AMMs are designed to ignore what many NFT collectors value the most, which is the uniqueness of their asset. Successfully applying the concepts of DeFi AMMs to NFTs is difficult, and requires projects to reflect on the specificities of NFTs. Ignoring these characteristics will lead to poor user experience, and unfavourable trades, which will ultimately limit NFT AMMs’ ability to scale.

Concentrated liquidity AMMs have the potential to address these pain points, but now face the challenge of complicated user experiences. While being an amazing innovation and a necessary building block in the DeFi x NFTs ecosystem, we can only hope that they’re not ahead of their time.

--

--