Protecting Against Impermanent Loss

Everyone everywhere is trying to get active yield from their passive assets. It’s one of the most beautiful things about Defi. The first platforms to offer this were straight lending platforms like Compound. They established the pattern of overcollateralization, liquidation mechanisms, and variable rates based on pool utilization. However, who was borrowing, what were they borrowing, and why? Mostly people used the early lending platforms to retain price exposure to the base asset while borrowing to short something else. There isn’t that much demand to short ETH and so there were far more lenders than borrowers leading to generally very low rates for lenders. I say ETH here but this applied to basically every token except stablecoins for which borrowing meant shorting the dollar and longing crypto. The crypto market participants are overwhelming (and unsurprisingly) long crypto. Go figure.

The next wave of iteration was with platforms like dydx which more directly supported longing/shorting in a single transaction and with leverage. The leverage part was based on the observation that if the lent funds could never leave the platform then the platform could ensure good behavior of the borrower. With Compound, if they didn’t have overcollateralization you could just take the money, run away with it, and forfeit your collateral for profit. But if you were never given the loan and instead the platform managed the loaned funds for some purpose on your behalf then the platform could still ensure your good behavior. The adoption of these platforms directly took away borrowing demand from the base lending platforms, leading generally to even lower rates. So if you were just sitting on a pile of RPL or MKR what options were you left with for yield? In 2019, not much.

Then along came Uniswap. Prior Defi summer dex’s just didn’t have much volume or fees. But then Liquidity Mining was invented, first gradually by SNX, then more aggressively by COMP, and finally in a tsunami by YFI. The magic of Uniswap v2 that I don’t even think they anticipated the significance of was that it gave a bearer asset to the depositor we now call an LP (Liquidity Provider) token. Using that, every food token in that day and age allowed you to stake your LP and get paid monstrous APR to provide liquidity to bootstrap the value of their newest edible. Once volume picked up, so did fees, and so there became a path to earn revenue using any tradable asset (on any Dex but especially Uniswap). In a matter of months volumes on all pairs, not even just for new Defi protocols, exploded and so a new pathway for yield was born.

The downside of course became known as Impermanent Loss. There’s no guarantee of impermance to Impermanent Loss. It’s a terrible proper noun that I blame Hayden Adams for. If you had MKR and you wanted to keep your MKR while getting some reasonable yield there was no safe way to do so. When you joined a pool, your MKR was inherently at risk. You literally put it up for sale. You were basically betting on a high volume crab market to increase your position faster than price movement eroded it. Of course, this created a market need. There is a class of LP’s who want to put their capital to work without assuming IL risk. The market thought up two competing approaches to solve this need.

The first to arrive was essentially insurance. Bancor created a one-sided liquidity pool with their v2 launch. You could deposit there and split your trading fees with the platform. In the event you suffered from Impermanent Loss the system would first settle this guarantee using its profit. Once that pool of money was exhausted BNT holders became the lender of last resort. Overall, the system works. Since inception the platform is deeply in profit in terms of its rake compared to the IL it is at risk for. Therefore depositors can rest safe in the knowledge that they can still have their MKR while earning some small percent yield on it. The downside of course is every cent you take from LP’s that you didn’t need to creates a market opportunity for your competitors. Just like with insurance companies their profit is proof that they are overcharging relative to their risk. The other downside is they simply don’t have the volume of Uniswap or Sushiswap and therefore they don’t have the fees. This is partly due to marketing, partly due to pool size limits, partly due to gas, partly due to capital efficiency, and partly due to momentum. I won’t get into that further here. What I will get into is that people thought of another way to generate safe yield while using Uniswap fees as the source of revenue.

That brings me to Indirect LPing. The two platforms I’ll be comparing here are Alpha Homora and Impermax. They combine the concepts of everything that came before them and try to solve the same market niche that Bancor v2 solves without having to reinvent the exchange itself. I describe this as someone jammed Compound into a crab market speculation platform. The basic idea is to have one party accept all the risk of IL and another party provide the liquidity for a lower yield. With Bancor this was accomplished by giving up half the trading fee to the insurance mechanism. With Alpha and IMX it’s accomplished via a loan system. Just like with dydx the loan is retained within the platform which enables leverage.

In both platforms borrowers assume three risks. First, the trading volume risk if the fees a pool accrues fall below the borrow rate. Second, price divergence risk that causes liquidation. Third, variable borrowing APR risk if a lender withdraws capital and increases the borrow rate above the trading fee profit. The most profitable situation for borrowers is a high volume, crab market, with plenty of lenders. This is why I called it a crab market speculation platform.

With Alpha Homora all of the borrowers across all Uniswap pools utilize a single underlying pool for each asset. This means that if a liquidation event doesn’t recover enough funds to pay back the loan the losses are socialized amongst all lenders of that asset. The lenders have no ability to pick and choose the pools they are willing to take that risk on. This socializes risk just like insurance and necessitates governance approval to create a new pool since it puts everyone in that asset class at risk. Impermax takes the other path, concentrating risk but forcing risk on no one. Each Impermax pool has 2 unique lending pools with their own utilization rate, interest rate, etc. This allows for the permissionless creation of pools but when a new pool is created there are no lenders yet so the pool you create may just never function. It also enables the rates for each pool to scale with the volume of that pool (indirectly) so a more active and informed investor can get a higher than average rate.

Now undoubtedly Alpha Homora is the larger protocol. It’s rated 16 on Defipulse with just about 1B in AUM. Meanwhile, Impermax barely even registers at rank 86 with… about 5M AUM. That’s a 200x difference. From a technical perspective however I see no reason both can’t succeed. I find Impermax’s model more trustless and in their favor they’ve never been hacked and racked up a debt with Yearn’s Iron Bank. The other thing I’ll note is that the lending rates on Alpha are pretty bad. While I can get over 10% with stablecoins in many places the base lending rate for stablecoins on Alpha is in the 2-3% range boosted to 7% only by their LM program. Meanwhile the supply rate on USDT on the Impermax USDC/USDT pool is currently over 40% and none of that is IMX. Borrowers are willing to pay that because they can farm and sell IMX. This makes the passive investing side on Impermax superior, both in terms of rate and the simplicity of not having to claim and sell tokens to get their yield. Overall I’m choosing to use Impermax at the moment as a lender. These values can change dramatically if Impermax grows appreciably.

One frustration I have with both protocols is it’s unclear just how much of the profit for the platform is going to the lenders vs going to the borrowers. Who is getting a good deal? While the profit to lenders should scale with the pool fees it only does so indirectly. For the lender rates to go up it requires borrowers to take active action to increase their leverage or for more of them to join the pool. To do so they have to forecast the three risks above. While I call these systems Indirect LPing that’s a bit of a misnomer. It’s just Indirect Lping is much shorter to say than a special purpose lending system for leveraged LP speculation. If we actually want indirect LP, the profit to lenders should be directly tied to the trading fees like in Bancor. So, I’m going to take it back to first principals here and propose a way to do just that. If you’re interested in building this, reach out to me on reddit or Discord.

Back to basics… The source of all revenue to the system is the trading fees. The purpose of the system is to create two groups of people, one group that absorbs all the IL risk for higher rewards but faces liquidation and one group that lends insured from IL at lower rewards. There are known systems for distributing different types of risk to different parties called tranche systems. For example in mortgage systems a higher risk tranche will be the first to eat the cost of any underwater liquidations. Users choose to join a tranche based on their risk appetite. A few of these systems such as saffron already exist in Defi. Putting this all together fees flow in and are distributed to each tranche by percentage. As the lending pool utilization changes the percentage of fees each tranche receives changes to incentivize a healthy balance.

This tranche system shares the risks of decreasing volume and variable borrow apr between the lender and borrower and ensures that as long as the borrower isn’t getting liquidated he is also never losing money unless he closes his position and eats the IL incurred to date. This makes the system fairer to the borrower. The percentage split is a point of visibility that let’s each participant know how good a deal they are getting in terms of the overall revenue available from trading fees. Because the lenders directly earn trading fees the system is closer to Bancor and a true Indirect LP but it lets the market determine how much fee is fair unlike Bancor. As with Impermax and Alpha, this doesn’t require reinventing the exchange. It’s like a cozy middle ground.

There are of course edge cases I’m hand waving to cover this in two paragraphs such as what to do if a pool utilization just hangs out at 100%. But all that is room for a whitepaper, not my blog.