0xmons Blog
sudoswap v69: An NFT AMM

A few weeks ago, I wrote a litepaper about another way to approach NFT financialization, via an NFT AMM, instead of the fractionalization route. This protocol, jokingly named LSSVM (a tongue-in-cheek nod to the popularity of choosing mathematical names for DeFi protocols), has been further refined after several conversations with some excellent people in the NFT/DeFi space. Though a testnet MVP is still at least a month out, I want to pull back the curtain some more and outline how the protocol works. Bear in mind this is still very early stage, and things will change before launch.

overview image

At a high level, LSSVM consists of many individual pools of NFTs. Each pool is managed by one liquidity provider, and is parameterized by a custom bonding curve. Traders can then pick a single pool to trade with or trade across multiple pools with the help of an aggregator. Similar to other NFT financialization protocols, we assume that floor NFTs will be primarily used, with more customizable options being left for later iterations.

What does a pool look like?

pool image

A pool is a contract managed by a single address that holds some amount of ETH and some amount of an NFT. They can be buy-only, sell-only, or both. A buy-only pool contains ETH and is always ready to give a quote to buy NFTs with its ETH. A sell-only pool contains NFTs and is always ready to give a quote to sell its NFTs for ETH. If both buying and selling are enabled, then the pool will give quotes for both. Users that trade with a pool will exchange either ETH for a whole number of NFTs or a whole number of NFTs for ETH.

How are the quotes determined?

bonding curve examples

The quote that a pool gives is determined by a bonding curve specified during pool creation. Though in theory any sort of curve (linear, sigmoid, sinusoidal, etc.) could be implemented, we’ll restrict our focus to a few specific ones at launch. Bonding curves can be constant (i.e. always quoting the same price), linear (i.e. increasing/decreasing price linearly with buys/sells), or exponential (i.e. increasing/decreasing price by X% with buys/sells). Being a single-direction liquidity provider with an LSSVM pool is equivalent to having a rudimentary automated buying/selling strategy.

The end result of LSSVM is, for each NFT, you end up with some number of pools, each with their own pricing parameters. Some will offer buy-side liquidity, some will offer sell-side liquidity, and others will allow for direct trading.

LSSVM allows users to get immediate quotes on either the buy or the sell side for their NFTs. Particularly on the sell side, this will ideally give better slippage than existing methods (e.g. relying on an x*y=k + fractionalized token AMM or simply accepting the best offer on OpenSea). This is in part due to the lack of existing good ways to create floor bids for any NFT in a collection. LSSVM allow for doing so in an on-chain way, with pricing that behaves predictably. The most simple example is someone locking up X ETH to buy NFTs at Y price (assuming a constant bonding curve).

For liquidity providers, single-sided pools allow for DCA’ing in or out of a large NFT position. For example, a buy-side pool that buys its first NFT for 10 ETH, then 9 ETH, then 8 ETH, etc. (assuming linearly decreasing bonding curve). Or a sell-side pool that sells its first NFT for 1 ETH, then 1.5 ETH, then 2.25 ETH etc. (assuming exponential increasing bonding curve). For NFTs, spreads can be quite large, in part due to a combination of royalty and marketplace fees. To account for this, liquidity providers who wish to be automatic market makers can set custom spreads between buy and sell to profit off trading volume for their pools.

This is the gist of the protocol. There are of course still many areas for improvement.

The first is the question of having many pools. Because each LP manages at least one pool, it’s possible to have many different pools for the same NFT collection. At first, this seems quite problematic because it fragments liquidity, which is usually associated with worse pricing. In the worst case, however, where each LSSVM pool contains only 1 NFT, this degrades into basically an on-chain order book. My guess is that at first, we’ll see several large pools managed by whales using LSSVM, either to scale in/out of a position, or as the primary market maker. The end goal, of course, is to create a powerful base protocol for others to build on top of. Just like how we’re now seeing Uniswap v3 position aggregators, I’m hopeful for protocols which can combine with something like Fractional or NFTX to handle multiple users in the same LSSVM pool.

The second is the question of on-chain vs off-chain. Because the bonding curves for LSSVM are on-chain, comptuation is limited. LPs who want a more sophisticated pricing strategy might find even arbitrary bonding curves to be insufficient for them to respond to the market. This motivates the question of having some sort of hybrid model where we can move more of the pricing calculations off-chain. This is something I’m still thinking more about. However, I think there are several nice benefits to the on-chain model which make it worth building out, if only for easier integrations with other protocols. For example, having a buy-only pool with ETH locked in at a constant bonding curve, with liquidity locked for X amount of time allows for easier loans and liquidations if being used in tandem with a lending platform like Bunchy Protocol.

I’m actively working on developing LSSVM at the moment as the next-next upgrade for sudoswap. (That’s two upgrades away–the next upgrade is better order books). If any of the above seems interesting, and you’d want to chat, please reach out via Twitter or Discord! Otherwise, I hope this provides more detail into exactly how I envision the protocol working and provides a starting point for others thinking in a similar direction.

Last Updated: 2021-08-06 17:30