As the release of @AlphaFinanceLab Homora v2 seems to get closer by the day, let's take closer look at the protocol, the various components, and what's coming.

🧵👇
1/

Alpha Homora is a protocol that allows users to yield farm on leverage. With v1, users can borrow ETH, supplied by lenders, to provide liquidity to LP pools.

This is especially useful for those with small capital or those who want to maximize their farming efficiency
2/

With v2 there are various changes

- More pool support in addition to Uniswap (Curve, Balancer, SushiSwap)
- Lending/borrowing of assets other than ETH
- Up to 9x leveraged positions
- Borrow multiple assets, releverage, deleverage
- Option to not automatically reinvest yield
3/

Alpha Homora v2 consists of 6 main parts

- HomoraBank
- Spell
- Caster
- SafeBox
- Wrapper
- Oracle

I'll mainly focus on the first 4 here, as the other 2 deserves their own threads
4/ HomoraBank

The HomoraBank contract store's all of the protocol's positions as well as the associated collateral token in the form of wrapped LP tokens.

It is also the contract that protocol users interact with
5/

The HomoraBank is also the contract that will be borrowing from with @CreamdotFinance Iron Bank for users to then use to farm on leverage https://twitter.com/tansawit/status/1349704993381601284?s=20
6/ Spells

Spells are contracts that defines how to interact with various liquidity pools the protocol supports. For example, the UniswapV2 spell contains functions to interact with Uniswap liquidity pools (e.g. add/remove liquidity).
7/

Similar spells exists for other pools such as @SushiSwap , @CurveFinance , and @BalancerLabs

Spells are also the contracts that execute borrow/repay assets by interacting with the HomoraBank.
8/ HomoraCaster

The purpose of the Caster is to help secure the protocol and the locked assets.

Instead of the HomoraBank calling the contract directly, these function calls are delegated to HomoraCaster, which in turn then calls the spells.
9/

As spells can be written by anyone to perform any arbitrary actions, they could be written to drain assets from the protocol.
11/

But as in Homora v2's case, the protocol is interacting with the spells through the Caster which, unlike the Bank, does not hold any assets itself. Thus, the above issue/exploit is mitigated
12/ SafeBox

Now we get to the juicy 🤑 bits. Similar to Homora v1, users can also choose to lend their assets for others to borrow.

But instead of the lending/borrowing happening directly on the protocol, it is instead done through Cream and the SafeBox contract.
13/

Users can deposit various supported assets (ETH, stablecoins, etc.) to SafeBox, which will then be further deposited onto Cream's lending protocol.

This is probably where the new ibTokens will come in đź‘€ @DegenSpartan
14/

Now you may ask why the added steps/complexity. There are two main reasons I can think of

1) Borrowers/farmers have a larger lending reserve to borrow from, thanks to the integration with Cream.
2) Lenders can deposit more tokens other than ETH that's supported by v1
15/

As for why lenders can't/won't then deposit directly onto Cream, my guess is there will be incentives to lend through SafeBox, possibly Merkle/airdrops that we've been seeing lately with protocols like @BadgerDAO and others.

This will most likely make use of the ibTokens
16/

With all that said, this is only my own understanding. If there's anything I missed or understood incorrectly, I would love to know

@tascha_panpan @nipun_pit @griphooketh @alpha_padfoot
You can follow @tansawit.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.