Data Insights on v2.1 → v3 Migrations
Part 3: Migrating IL from v2 to v3 to offset the deficit
Data Set: https://docs.google.com/spreadsheets/d/18cehllrocu3U-3gDzaNDkpxwX-Pjt-44Xzn53-4X3rI/edit?usp=sharing
Note: While this value is calculated for every token in the spreadsheet, it is applicable to only those with a non-zero v2 vault balance post-IL migration.
Q: Since v2 positions are exposed to impermanent loss (on a position-basis) this IL could be utilized on v3 to mitigate the deficit. So could we consider migrating the IL-incurred on currently staked v2 positions to v3?
TLDR - Migrating the full amount of IL that has been incurred on currently staked v2 positions could yield $1.3M relief to the v3 deficit. However, this method is not applicable to pools where the IL exceeds the current v2 vault balance. Modifications to this method to include large value pools (such as ETH, WBTC) might be more suitable to assist with the v3 deficit.
Setup
- Get current stakes on v2 (includes the rate - price - at which the TKN was deposited)
- Get the current rate (price of the TKN) and evaluate the IL-incurred per position (%)
- Multiply the IL by the user stake to get the IL-incurred in TKN and sum for all positions currently in the pool
- Total IL on the pool divided by the staked balance is the average IL per pool
Data
Analysis block: 15523726
Pools with Migration: 108
The average IL incurred on currently staked v2 positions exceeds the total staked balance in some cases. That is, migrating the entire IL incurred on all pools is not a feasible solution.
Figure 1. Average IL per pool. Negative one (-1) on the y-axis indicates IL is 100% of the current v2 staked balance. Y-axis is truncated - MATIC is approximately -12.
In this implementation, the applicable pools must: have IL to migrate; must not result in a negative v2 vault balance post-IL-migration; and must have a non-zero v3 staked balance. Thus the number of applicable pools is 74 and, as can be seen in Figure 3, this improves the deficit state considerable for v3 pools. However, the value associated with this migration is just $1.3M. This is a small component of approximately $30M of IL that has been incurred on currently-staked v2 positions. The primary reason being is that when the IL-incurred exceeds the v2 vault balance we omit this pool (i.e. migrate nothing).
Large pools including ETH, WBTC, USDC, and USDT all fall into this category of omission and so considering how much - if any - of the IL incurred on these pools to migrate to v3 is a difficult task. See Modifications section below.
Figure 2. Current v3 surplus per pool (red).
Figure 3. Current v3 surplus per pool (red) overlay v3 surplus post-v2-IL migration (green). Y-axis truncated at (-1,1).
Figure 4. Current v3 surplus per pool (red) overlay v3 surplus post-v2-IL migration (green).
Modifications
After evaluating the above method yields just $1.3M in migration value, I investigated a thresholding method whereby an arbitrary limit is set to the minimum for the vault balance post-migration.
Let’s say we set the minimum vault balance to 50% of its current balance. In this method, the IL is migrated to a maximum value of 50% the TKN in the vault. This way, at least some of the TKN in v2 pools can contribute to the v3 deficit.
As an example, if we set the threshold to 50% of the current vault balance then the total migration value comes to ~$6.4M and this method is applicable to 90 pools. A summary of this effect on the surplus/deficit for v2 and v3 is shown in Table 1 below.
Table 1. Example of the thresholding method at 50% current v2 vault balance and its effect on the v2 and v3 deficits. IL is migrated up to the maximum amount defined by the threshold.
token | v2_current_surplus_perc | v2_postMigration_ILthreshold_surplus_perc | v3_current_surplus_perc | v3_postMigration_ILthreshold_surplus_perc |
---|---|---|---|---|
eth | -37.1% | -68.5% | -60.0% | -51.9% |
link | 94.2% | 76.7% | -48.4% | -45.7% |
usdc | -6.8% | -53.4% | -41.1% | -29.0% |
usdt | 8.4% | -45.8% | -43.9% | -32.8% |
wbtc | -64.2% | -82.1% | -50.6% | -25.2% |
Conclusion
IL-incurred on v2 positions could be migrated to v3 to assist with the deficit. Taking the entire IL amount incurred, but limiting the applicable pools to those where the IL does not exceed the current v2 vault balance, could contribute $1.3M to the deficit. However this omits large value pools that would benefit from alleviation of their deficit. One modification to this method may be to take IL from a given pool up to a particular threshold (be it a percentage of the vault balance or a dollar value). This would allow a greater coverage of pools and also allow contributions from large value pools whom have incurred a substantial IL.