Like any borrowing with leverage, Alpha Homora has its own risk. It is important that every user clearly understands the risk they are undertaking and this blog intends to outline risks involved. Alpha Homora, despite being reviewed by Peckshield, is still considered a beta product.
As stated in the Alpha Homora previous blog, Alpha Homora users may face the following risk:
To this end, Alpha Homora's key parameters are initialized to balance risk and reward for our users. This article will focus on providing insights behind these values.
Here's a brief version:
We provide a more detailed risk analysis for each of the above setting.
GOAL 🥅: Provide sufficient incentive for liquidating positions at risk. REQ. 📝: Liquidation bonus > gas fee. RESULT 📈: In the worst case assumed, liquidation bonus \(\ge\) 0.1 ETH while gas fee \(\le\) 0.08 ETH. ✅ ANALYSIS 🤔:
5% Liquidation bonus: With 5% liquidation bonus and 2 ETH minimum debt size, a successful liquidation guarantees liquidation bonus of at least \(5\%\cdot 2\) ETH = 0.1 ETH.
Gas fee \(\le\) (400k gas) * (200 gwei/gas) = 0.08 ETH.
GOAL 🥅: Provide sufficient incentive for reinvesting at least every 24 hours REQ. 📝: Bounty reward > gas fee RESULT 📈: In the worst case assumed, bounty reward > 0.16 ETH while gas fee \(\le\) 0.08 ETH. ✅ ANALYSIS 🤔: We assume:
Bounty reward. The 1-day reinvest bounty reward is at least $5000000 * (1ETH/$500) * (20%/365) * 3% > 0.16 ETH.
Gas fee \(\le\) (600k gas) * (200 gwei/gas) = 0.12 ETH.
GOAL 🥅: Provide yield farmers with sufficient liquidation safety, i.e., with sufficient tolerance to price volatility. REQ. 📝: Small positions should be able to tolerate up to a certain amount of price fluctuation before being at risk of liquidation. RESULT 📈: Small newly opened positions with maximum leverage (3.33x) can tolerate up to ~30% ETH price increase (relative to farming token price), or equivalently, ~23% farming token price drop (relative to ETH), before being at risk of liquidation. For example, if Alice opens a new (small) position to farm on Uniswap ETH/USDT pool with 3.33x leverage when ETH@$400. Then, her position will be at risk when ETH price hits ~$522. ✅ ANALYSIS 🤔: For small positions, we assume no slippage from swapping and no swap fee.
Let \(P\) be the ETH price (in USDT) when position is opened, and let \(P'\) be the ETH price (in USDT) that causes the position to be at liquidation risk.
The goal is to find \(P'\) (in terms of \(P\)).
For simplicity, suppose the user opens a position worth 100 ETH at ETH price \(P\) and 3.33x leverage (supply 30 ETH and borrow 70 ETH). Half of the position gets swapped to USDT, so the position becomes 50 ETH + 50\(P\) USDT, and gets converted to LP pool shares. Note that debt = 70 ETH.
When ETH market price becomes \(P'\), the pool also rebalances, so LP pool shares can instead withdraw 50\(\sqrt{P/P'}\) ETH + 50\(\sqrt{P\cdot P'}\) USDT. By swapping USDT portion back to ETH, the user gets 50\(\sqrt{P/P'}\) ETH.
So, the position's worth is now 100\(\sqrt{P/P'}\) ETH.
Since the position will be at liquidation risk when position's value hits 87.5 ETH (when the debt hits 80% the position's value).
Solving 100\(\sqrt{P/P'}\) ETH = 87.5 ETH yields
$$\frac{P'}{P} = \left(\frac{100}{87.5}\right)^2 = 1.3061.$$
Thus, positions with 3.33x leverage can tolerate up to ~30% ETH price increase, relative to USDT (deducting 2*0.3% swap fee from 2 swaps). Equivalently, they can tolerate up to ~23% USDT price drop, relative to ETH.
GOAL 🥅: Provide yield farmers with sufficient liquidation safety, i.e., with sufficient tolerance to price volatility. REQ. 📝: Larger positions should still be able to tolerate up to a certain amount of price fluctuation before being at risk of liquidation. RESULT 📈: Larger newly opened positions (<2% pool’s total value) with maximum leverage (3.33x) can tolerate up to ~25% ETH price increase (relative to farming token price), or equivalently, ~20% farming token price drop (relative to ETH), before being at risk of liquidation. For example, if Alice opens a new (large) position to farm on Uniswap ETH/USDT pool with 3.33x leverage when ETH@$400. Then, her position will be at risk when ETH price hits ~$480. ✅ ANALYSIS 🤔: We assume no swap fee for simplicity, and like the previous analysis, assume the user wants to farm on ETH/USDT Uniswap pool.
We proceed in steps:
Assuming the user opens a position with at 70% work factor, and the kill factor is at 80%, then we solve
$$ \frac{0.7 \cdot (c^2+2c)\cdot k/\sqrt{P}}{\frac{c^2+2c}{1+c}\cdot k/\sqrt{P'}} = 0.8, $$
or equivalently,
$$ \frac{P'}{P} = \frac{1}{(1+c)^2}\cdot \left(\frac{0.8}{0.7}\right)^2. $$
When \(c = 0.04\), the opening position size is worth \(\frac{c^2+2c}{2} \approx 0.04\) of the pool's value. The value \(P'/P\) is roughly 1.20, giving ~20% ETH price increase tolerance.
Here is the table for price tolerance for each value of \(c\).*
At first we started out with 10% fixed borrow interest rate to balance between ETH lenders’ reward and yield farmers’ risk. Lender's interest rate is calculated based on borrower's interest rate * asset utilization rate (this has not changed).
However, within 15 hours since launch, Alpha Homora had accumulated a total value locked of > 17,600 ETH ($6M). Given this excessive demand to use Alpha Homora, we had to update the interest rate model to be dynamic, scale faster, and offer safer leveraged yield farming for everyone. ✅
See how borrower's interest rate and lender's interest rate here: https://blog.alphafinance.io/3-changes/
How much leverage should a user borrow while being safe from liquidation? A profit & loss calculator for your leverage can be found on this spreadsheet.
Please make a local copy of the spreadsheet before proceeding.
Hopefully each stakeholder now understands the risk involved in participating in Alpha Homora! Although the protocol allows yield farmers to earn higher APY with leveraged borrowing, yield farmers should remain cautious as the protocol is also risky, for example, you may lose your opened position from liquidation when asset prices are volatile.
Feeling excited about this product and curious on what's more to come? Interested in joining as beta testers?
Fill out this form, and we'll get back to you!
Alpha Finance Lab is an ecosystem of DeFi products, starting on Binance Smart Chain and Ethereum. Alpha Finance Lab is focused on building an ecosystem of automated yield-maximizing Alpha products that interoperate to bring optimal alpha to users on a cross-chain level.
We are moving at a rapid pace, so we encourage everyone to join our Discord for the latest updates, follow us on Twitter, or read more about us on our Blog!