Makers in Hubble vAMM (Part 2)
Published on
This is the second post in the “Makers in Hubble vAMM” series. In the first one, we discussed the payoffs of being a maker qualitatively. For this post, we performed some simulations to understand what to expect as a maker (liquidity provider) in the Hubble AMM.
For the simulation, we assume an efficient arb b/w FTX and Hubble. We performed the following steps.
- Start with x (= $5m, $10m) liquidity goal in the Hubble vAMM
- Get FTX avax-perp minutely data for the month of January
- For each data point (every minute), execute 4 efficient arbitrage (i.e. mark price on Hubble closely follows that on FTX) trades on Hubble — open, low, high, close. For e.g. on Jan 1 00:00, the [price_open, price_high, price_low, price_close] are [109.479, 109.897, 109.479, 109.809] respectively. So we execute 4 trades, that bring price parity with ftx on Hubble.
- At the end of the day, track the Maker’s daily apr, net apr until that time, PnL, volume, depth and slippage
Note that the apr here includes the impermanent loss — this is super important to take note of because most protocols never talk about it and only mention the “fee apr” which is always > 0. So,
apr (daily) = (fee — IL) * 365 * 100 / tvl
Intuition
Before we discuss the results, let’s briefly talk about what we should expect to see.
- For every position opened by a trader, there is a counter position opened for all makers who share it in the ratio of their liquidity. So say that there’s only 1 maker in the system and a trader opens a 5 avax long, then the maker automatically becomes 5 avax short at an avg open price determined by the AMM, while also earning a trading fee for it.
- Now if the price keeps climbing from here, the maker is subject to a loss-making short position (but since this could be transient, we call it IL)
- If fee from trading > IL, apr is +ve, if fee < IL, apr is -ve. That is when the volumes are high enough to counter the IL from price movements, makers make money, and lose if the price moves drastically in a short while.
Simulations
Refer to left Y-axis for net_apr (green) and mark price (yellow) and right Y-axis for daily apr (dotted blue)
- At the end of day 1, mark price = $114.3, apr (and net_apr) = 57.3%. There was a price movement of $5 which was obviously executed while makers acting as counter-parties but the fee from volatility was able to offset the IL resulting in an apr of 57%
- From Jan 2 to Jan 6, the market moved gradually such that the fee was only slightly greater than IL hence daily apr (blue dotted line) is hovering around 0. The net_apr (Jan 1 — Jan 6) was still 16%.
- On Jan 7, the mark price dipped relatively drastically ($95 -> $86), resulting in IL becoming > fee which led to a steep fall in the daily apr and causing the net_apr to fall (but still above 0)
- From Jan 8 — Jan 12, the mark price was quite stable, so the IL was minimum and the fee caused the daily apr to jump to nearly 200%
- The next interesting event happens on Jan 21 when mark price dumps from $79 to $66. High IL, causes the apr to dump to -500%, however, it quickly recovers as soon as the price stabilizes, and the trading fee saves the day again.
So the results match our intuition.
The avg values for the other metrics were:
For $10m, the apr results were similar because even though the depth (and hence arb) volume is much higher, the fee is diluted due to a higher TVL. Simulation data can be found here in Hubble Makers Simulation Sheet.
Strategies
So while it’s true that makers take IL if the price moves in either direction; however it’s still possible to express your view on the direction of the asset. This is enabled by Hubble's multi-collateral design which supports USD and avax collateral at launch (with BTC and ETH to follow).
1. Bullish Avax
For e.g., If I want to add $10k to Hubble AMM but feel that avax only goes up from here:
- I should swap $10k for avax
- Deposit that as collateral and use it to LP in Hubble.
If the price moves up, I take some IL but it will be offset by my profits from appreciation in avax price.
2. Bearish Avax
If I want to add $10k to Hubble AMM but feel that avax dumps from here, I should
- borrow avax using $10k as collateral on TJ/aave/benqi
- Sell avax for USD
- Deposit USD collateral and use that to LP
If the price moves down, I take some IL but it will be offset by my profits from my avax short.
3. Delta Neutral
If I do not want to take exposure to avax in either direction, I can just use USD as collateral to LP. That way I only take IL if I believe the fee can offset the IL (volatile market). The following napkin math shows the payoff of LPing in avax-usd TraderJoe pool.
When you LP with USD collateral you take exposure to “IL” but not “pnl” in the calculation above.
4. Payoff structure similar to AVAX-USD TraderJoe pool
Deposit 50/50 Avax/USD in Hubble and LP in avax-perp.
Some other factors that will affect net gain/loss are funding payments and vHubble incentives.