gHearbox Hour with Element Finance: leveraging fixed & variable rates?

gHearbox Hour with Element Finance: leveraging fixed & variable rates?

We are back from the radio silence! A lot of work has been happening behind the scenes with v2 audits starting up, research for new protocols’ adapters, and onboarding contributors to Gearbox DAO. All that you can find in the next monthly community update. Here is the previous one:

Gearbox DAO: Retroactive Public Contributions Funding & Jan Recap
A fancy title to bait you! Jk, it’s real. This article is a recap of the 1st month of Gearbox Protocol life as well as Gearbox DAO coordination so far. Buckle up, there is a lot to go through. For example, unexpected rewards to the first active contributors — which

Today though, we have something else to talk about — recap of the gHearbox Hour (it was in fact two hours though) from the Twitter Spaces talk with Element Finance developers. gHearbox Hour TM is a podcast that we started to do research into potential integrations on the fly. What does it mean?

Well, we jump on Twitter Spaces with teams / devs / DAOs and talk about their products, how integrations could be done, what they think of the DeFi rates, and so on. Quite literally, technical due diligence and idea sharing with each other and the communities LIVE. It’s an important process as it helps Gearbox become more composable: as the architecture of different protocols is quite similar, one solved case potentially smooth out the integration process for others. Ok, let’s dive right into the specifics.

First of all, you should have enough technical context on how the Gearbox Protocol architecture works and what composability entails. A TLDR is that simple adapters can be built for practically any protocol, that allow Gearbox leverage to flow into a given protocol after it passes through the DAO governance. See what is required and what the process looks like:

How to add new Contracts & Assets to AllowedList - Gearbox Protocol
Want to see your favorite protocol or asset be added to Gearbox Protocol? Here is what you need to know.

The first gHearbox Hour we did was with Element Finance devs, chatting about fixed yields and leveraging on interest rates.

You can read about Element Finance here. In short, they make it possible to split yield between fixed (Principal Tokens) and variable (Yield Tokens) rates. As a user, you can decide to lock in the current yield the system offers, while other market participants can act on yields increasing, raising the fixed rate yield on the marketplace. Moreover, you can also leverage both into fixed and variable yields, which is where Gearbox Protocol comes into play!

Let’s say that you “deposit” aka provide liquidity into Curve Finance and later deposit into Yearn Finance. Your Yearn LP tokens can be then deposited into Element Finance. Element Finance splits that into Principal Tokens representing a fixed-rate future on an underlying asset — and Yield tokens representing a position with variable rate which can go up or down.

Principal Tokens in AllowedList for Gearbox

Adding Principal Tokens as Allowed Tokens allows users to buy leveraged fixed-yield. If the current Element Finance yield on a given pool is 5%, you can buy that fixed rate — and receive that APR, even if the rate goes lower. Accordingly, if a user expects that the floating rate in the Gearbox pool will not be higher than the fixed yield they are deploying into, they can create a leveraged fixed rate position… and get higher returns.

Imagine that the Gearbox rate for borrowing is 5%, the fixed rate is 10% at Element, so then with x5 leverage the user will receive a yield of 50%!

What are the complications on the technical side?

First of all, how should we value eP tokens in the absence of an oracle for Principal Tokens? As a reminder, Gearbox uses some price feed to calculate the health factor of Credit Accounts to understand if it is safe or should be liquidated.This question caused a lengthy discussion. As a summary:

  • The value of Principal Tokens always goes towards the value of their underlying asset. As such, it’s a guaranteed redemption after a certain period of time.
  • If we value Principal Tokens as its underlying asset, this creates an interesting case that the Credit Account can be temporarily undercollateralized. Over time, the Principal Token will become 1:1 and the credit account will become collateralized again at the redemption.
  • Valuing PTs as 1:1 complicates liquidation of Credit Accounts as sometimes the liquidator should lock their capital in ePs and wait for the maturity date to exit from it… This drastically raises the capital requirements for liquidators (especially if there will be high limits for Credit Accounts with ePs as allowed tokens).

An interesting point is that such time arbitrage can be done via Gearbox itself (see the presentation here) and it is one of possible niches Gearbox can be quite effective in existing DeFi now. So it’s an interesting case to build such a time-arbitrage bot on top of Gearbox and bootstrap this market…

CeFi-like periods = modified Credit Accounts?

This time-based Credit Account model can actually be further applied to options. For example, it’s not yet possible to efficiently exit options positions in DeFi during the week period. But if you wait until the redemption period and take into account a high possible drop, you can also structure the liquidations that way. This can be applied to Yield Protocol, Notional Finance, Opium, Ribbon, and other protocols working slightly more like a CeFi model where redemption times and fixed periods are more important than 24/7 liquidity and a slight sacrifice of composability?

Yield Tokens in AllowedList for Gearbox

Adding Yield Tokens provides exposure to future variable rates over a fixed time period. Things get tricky if we want to forecast these rates, which requires some use of oracles. Unlike with fixed yield where redemption is guaranteed to be 1:1 [note: unless smart contract hacks which can’t be taken into account] — variable rates can fluctuate from 10%+ to 3% even as we have seen in the past few weeks.

One option is to calculate the yield rate on-chain.

Let’s say we have Curve 3pool:

  • Emissions can be pulled on-chain (number of CRV tokens farmed to LPs)
  • Liquidity staked can be pulled on-chain (number of LP tokens)
  • LP token price can be pulled on-chain (LP’s value is some derivative of underlying tokens that can be precisely calculated)
  • CRV price can be pulled from the Chainlink price oracle

What questions still remain?

How much such a calculation can be manipulated? That’s for some future research. Calculating the liquidation depth for YTs is harder but it can be balanced with taking a low LTV and a very low possible variable rate, as such the redemption pool will always make up for at least some amount. But then the question is how to make such a product offering capital-efficient…

Splitting Diesel tokens (Gearbox LP tokens) into Principal and Yield Tokens by Element

Now this is more for the Element Finance integration side.

When a user provides liquidity to Gearbox, they get Diesel tokens.

Pools & APY - Gearbox Protocol
Passive lending on Gearbox Protocol: supply & earn APY.

Diesel tokens are a standard float-rate LP token, the rate on which depends on the pool utilization, similar to how it works on Compound or Aave. This opens up an opportunity to split diesel token’s rewards — so that diesel token can be divided into principal token and yield token using Element Finance.

For example, gDAI (gearbox DAI LP token) can be divided into ePgDAI Principal Token and eYgDAI Yield Token. Now imagine that eYgDAI will be added as allowed tokens. This allows a DAI Credit Account user to buy the required amount of eYgDAI and get a fixed rate for the loan they have. That actually means you can borrow at a fixed rate. And this is very cool, since one of the Gearbox Protocol potential use cases is interest rate arbitrage, and it is very critical to understand at what rate you are lending and to be sure that your rate doesn’t change in future.

We’d love to hear from community builders what integrations they see interesting, what is the benefit of such integration for both projects and for the DeFi community overall. As always, you can see the latest on the DAO notion page of the Risk Committee:
Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.
A new tool that blends your everyday work apps into one. It’s the all-in-one workspace for you and your team

If you are interested in getting involved deeper and would like to develop Gearbox Integrations, you can dive into smart contracts or read our documentation and get started today. You can also contact us on our Discord if you have any questions or would like to discuss new integrations that weren’t covered in this post. Let’s make DeFi & NFTs more composable!

Link Tree - Gearbox Protocol
Useful links about many things in the Gearbox ecosystem.