Uniswap Liquidity Provision: Automated Market Making

Markets

Jul 11

Since my last post, Million Token is up almost 100%. I recently became aware of Uniswap through learning about MillionToken, a speculative token with “moon shot” growth potential, in my opinion. One of the goals of decentralized finance or DeFi as it’s called is to democratize finance through technology. Uniswap has an automated market maker feature where you can basically allocate a certain amount of liquidity to a token pair. You can allocate one side only or two sides. Uniswap v3 offers ability to set custom ranges.

To be honest, I do not fully understand how it works, yet especially when it comes to offering on one-side only which would be useful for buying on the dips. What I read suggested to only offer up one of the token sides, i.e. USDC using the range order type. But, it will still offer out if it trades back through the other side of the range: so it doesn’t look to be a 100% satisfactory solution for dip buying as it can lose your tokens through automatically selling them out.

Uniswap doesn’t use an orderbook but, instead, uses a mathematical formula known as constant product formula which aims to keep ratio of a pair the same. The formula is x*y=k where x and y are the pool sizes. It is stated this formula can penalize larger orders. My understanding is that you get a pro-rata percentage of the fees for the liquidity pool which can be set from .3% to 1% depending on how volatile the asset/pair is. The risk is that the pair trades outside your range described as an “impermanent ” risk of loss. The model also assumes there are arbitragers who play an important role in keeping the price fair.

I am currently offering liquidity in only MillionToken. This is a brand new token with a lot of risk and the pool was created as a 1% pool. Here you can see with only a small outlay, I’m up $100 in only a few days.

Notice on this pool I have only a little Million token available because the price has appreciated to the point where it is almost outside my range. I hold a larger core position and so that’s okay with me. What’s curious is that because I hold some of my liquidity profits in Million token that my fees earned in USDC can drop even as I earn more fees if the price of MM/USDC drops– which I have seen several times: however, my profits really roar back when it recovers.

Now, what’s interesting is that I could have likely made 2x to 4x as much by adjusting my ranges better because I used a very wide range. For example, if one liquidity provider has $100,000 over a $100 range then they can offer only $1,000 per dollar or let’s say $5,000 over a $5 dollar range. Assuming this is the entire liquidity, let’s imagine another liquidity provider offers $5,000 over just the current $5 range then they can collect half the liquidity fees. The ability to pick good ranges is obviously a market making skill in this model. You can scale out by offering more ranges on a single products and more pools over other products. Adjusting the ranges incurs fees and also takes you out of the pool where you could be earning money. So, ideally you probably have a few staggered ranges. (Note the constant product model makes a curve instead of a linear allocation but the idea expressed is what’s important.)

We know that professional market makers spread their risk by offering liquidity over many assets and products. A natural question is how much one make? But, the answer depends on how much volume you have, how good you are picking the ranges, and how much you lose to impermanent losses that become permanent.

In order to decrease risk, one can provide liquidity across many more pools to take advantage of diversification. Stable coins are obviously attractive because they provide a natural mean reverting market. However, this would be offset by the deeper pools and lower fees. Volume and volatility is the life blood of liquidity provision.

What’s needed is ability to quantitatively evaluate individual token pairs and a portfolio of tokens to provide an estimate of the risk and return possibility across of a basket. Do you know of any quantitative tools for helping with this task? What type of returns are you seeing and how do you project returns? I imagine that a mix of low risk and higher volatility products would provide the best risk adjusted return.

Could this be the future of market making which democratizes liquidity provision? Or is there a fatal flaw with this liquidity provision model? However, I still wonder whether or not there might be a problem with this automated market making model. However, you have a real spread to earn fees on. The more I think about it: the bigger I think this could be because it takes away monopoly profits from the likes of Coinbase and distributes it to individuals willing to bear the risk.

If you want to experiment with automated marking making and providing liquidity on Million token via Uniswap then you can go here to the Million token official site:

https://www.new.milliontoken.org

(1) Click the buy button

(2) Once you’re on the Uniswap site then instead of “swap”, choose the “pool” tab, and create a new pool. You will be able to define your range and how much risk you want to allocate. You will need to authorize/approve the transactions in your Metamask wallet and then approve the transfer. Pay attention to the Metamask alert status if you get stuck. You probably have a waiting transaction to approve.

Pay attention to the Ethereum gas and transaction fees because they can be a large percentage if you only have a small limited amount of money to deploy. You probably want to deploy at least $1,000 to $2,000 to be able to overcome the fees relatively quickly. The more you deploy then the less significant the gas fees will be. Although to be clear, there is no guarantee of making a profit and risk-of-loss is possible. Notice the default Metamask gas fees seem high: I was able to halve my fees with experimenting with the gas fee variables.

To learn more:

https://uniswap.org/blog/uniswap-v3/

https://uniswap.org/docs/v2

https://novuminsights.com/post/can-i-still-make-astounding-money-providing-liquidity-on-uniswap-v3/

https://dailydefi.org/articles/price-impact-and-how-to-calculate/

https://uniswap.org/docs/v2/advanced-topics/pricing/

Cool, here’s a calculator I found below (not verified results). Select the MM-USDC pair:
https://uniswapv3.flipsidecrypto.com

Here you can see the 24 hour fees and other stats:
https://info.uniswap.org/#/pools/0x84383fb05f610222430f69727aa638f8fdbf5cc1

Update: While writing this article because the volume and volatility have been good, I earned $5 in fees but because the MM/USDC price declined, the value of my liquidity pool lost about $15. I can recover either through earning more volume fees or through the price appreciating again.

Disclaimer: The author holds Million token and does not fully understand Uniswap. On the up side, there is a risk providing liquidity with a speculative token that it “moons” and you lose out on the big gains. On the downside, the crypto drops below your range and doesn’t recover. Liquidity provision works best when markets stay in a range and high volume is transacted. However, Uniswap avoids a “short position” risk by requiring both tokens for two-sided market making. There is risk of loss in trading and many additional risks when it comes to crypto such as but not limited to: picking the wrong crypto, incurring high transfer fees, hacking, and losses caused by accidentally sending the crypto to the wrong wallet.

Be sure to take your time when sending money: check and double check everything or send a smaller test amount to verify before you send.

About the Author

The author is passionate about markets. He has developed top ranked futures strategies. His core focus is (1) applying machine learning and developing systematic strategies, and (2) solving the toughest problems of discretionary trading by applying quantitative tools, machine learning, and performance discipline. You can contact the author at curtis@beyondbacktesting.com.

>