Hello, world! This is Gearbox — Generalized Leverage Protocol.

Hello, world! This is Gearbox — Generalized Leverage Protocol.
Docs | Twitter | GitHub | Website | Discord

We are very sorry to interrupt you from your daily jpeg hunt, but maybe the following writeup could be as interesting to you. To make sure we follow the latest trend, let’s start off with a weird and hopefully funny story to get you into the mood — accompanied by some custom drawings.

And no, those are not the jpegs you can buy — after all, we are doing DeFi here and not NFTs… actually, is that even still relevant today? Let’s find out ☕️

If you prefer to read the meat, scroll to the middle of the article.

You get woken up. The sun is piercing through the curtains. It would have been nice to relax and chill outside, but you have work to do.

You go to the barn and see your old friend. The good old rusty tractor you’ve been using for the past few years. You can’t really say it’s a goodie though. The oil is dripping on one side of the engine, and it looks like the tires need a replacement. “Screw it, it shall survive another day!

You jump into the cabin and spend the next few hours in it, sweating from the abnormal heat and inhaling chemicals that look to be coming from the old engine. The old manual transmission barely works, making you lose some crops. You keep swearing at this old damn machine, but unfortunately it can’t hear you.

As the sun is getting closer to the horizon, it’s time to wrap it up. You stare into the distance and see that you’ve managed to get only a few acres done. A pathetic result! But what can you do?

If only there was a way…

On the way back, you start daydreaming about a new multi-crop harvester which could make your life x2 easier. What a delight it would be. You would even be able to rebuild the barn. If only you could get it. You see a falling star. “Close my eyes and make a wish!” — you decide.

Exhausted, burned under the sun — you fall asleep right in the tractor…

You open your eyes. Somehow, you feel rested and relaxed.

“What is this?!” — you ask yourself out loud in absolute confusion. There is no barn anymore — instead, you have a modern penthouse. There are no crops that you have to endlessly collect — instead, it’s all automated. And your tractor has turned into a flying car with an automatic new… Gearbox?

It looks like the wish you made didn’t just do an x2, it went beyond. With the new tooling, you can not only do the entire field in one day, but also travel to another continent, run simulations, s̵t̵o̵r̵e̵ ̵y̵o̵u̵r̵ ̵j̵p̵e̵g̵s̵, and so on.

It seems the new way has made things more efficient and… composable?

Those are the right words you can put as a mission statement of Gearbox: making DeFi more capital-efficient and more composable. This is what it feels like to build a primitive. A piece of the stack which doesn’t just give you a better short-term solution to a problem, but gives you an array of possibilities you didn’t even think of before.

Now, before you close the article and call the police to report drug abuse (after all, this was a long weird intro) — let’s get into the details.

Redrawn from this Reddit artist’s work.

Actually, what is Gearbox? Gearbox is a generalized leverage protocol: it allows you to take leverage in one place and then use it across various DeFi protocols and platforms in a composable way. That could be:

  • margin trading on Uniswap and Sushiswap;
  • leverage farming on Yearn;
  • arbitraging pegged assets on Curve, and more!

Gearbox does not silo the assets within its protocol. All trades and operations happen on third-party protocols: Uniswap, Curve, Yearn, etc. Needless to say, your assets never end up in some custody or under anyone’s control. Gearbox is not a trading platform. The protocol does not execute trades or have its own order books.

The core vision is to become a backend composable leverage protocol that all kinds of users have but don’t even need to interact directly with. You can envision building your own DeFi protocol and making a “take leverage from Gearbox” button. And bam — your users are now more capital-efficient. Or integrate Gearbox into a platform like Zerion or Zapper.

A look inside Gearbox Protocol

Gearbox protocol has two sides to it:

  • Lenders — liquidity providers who seek additional yield and have a higher risk tolerance. This can be seen as similar to providing liquidity to Compound and getting cTokens back.
  • Borrowers — traders or farmers who wish to increase their positions by borrowing liquidity from the protocol, for which they pay an interest rate. But the liquidity they borrow is 2–4x+ or more of what their notional size is. This is the leverage they get.
A Credit Account is an isolated smart contract that contains both the user funds and the borrowed funds. This is where your leverage is. After you open an account, all the operations go through this account and the assets stay on it as well.

One of the key aspects that actually makes this DeFi primitive possible are Credit Accounts, which“bind” together lenders and borrowers in this equation. More specifically, a Credit Account is an isolated smart contract that holds user + borrowed funds, has liquidation thresholds, and has a list of approved tokens and protocols (in order to avoid attack vectors from malicious actors). One could open as many Credit Accounts as they want, as Gearbox Protocol doesn’t differentiate.

Funds on Credit Accounts are used as collateral for debt, and users can operate these funds by sending financial orders to their Credit Accounts. That could be: margin trading on Uniswap or Sushiswap; leverage farming on Yearn; arbitraging pegged assets on Curve, and more!

Gearbox in a nutshell

The lending protocol side is not a core differentiation, it’s just the first step. No competition with Aave or Compound is intended. The assets you can borrow can be 4x and more unlike with normal lending protocols where you are can borrow < LTV. In addition to that, the source of liquidity can be expanded to other lending protocols like Aave or Compound. It would be technically possible to get a Credit Default Swap with Aave and ask other lending protocols, like when Iron Bank lent to Alpha Homora. This would get the interest rates (funding rates) for traders to a lower level!

So this won’t be happening.

There is no undercollateralized lending here like TrueFi, Union, Sublime, Maple, and others try to do. Math over reputation! Lenders (farmers or traders) don’t have access to the funds directly, nor does anybody else. There is no credit scoring or other reputation model involved here. It’s all based on the on-chain available data related to the accounts’ liquidation thresholds and the performance of third-party liquidators. Anyone can be a liquidator and do work for the protocol. There is no gatekeeping.

Gearbox can tackle both user segments: passive & active. Liquidity providers are passive; they do not take directional risk*. The positions which traders and farmers take are not of direct concern to lenders. Third-party liquidators are incentivized to do their job and liquidate Credit Accounts before the assets of liquidity providers would start being exposed to the downside. This means at the point where health factor drops below 1.

As such, the liquidity providers’ assets are supposed to be returned to the pools in full + the protocols fees. Therefore, Gearbox is not like a yield aggregator product which takes idle assets and trades with them. However… you can build such a strategy on top of Gearbox. Suggest!

*unless the similar risks as liquidations of positions on existing DeFi lending protocols; this points will be disclosed in docs very soon.

Gearbox is not a margin trading protocol or a farming protocol only. Gearbox does not provide a platform to leverage trade on its liquidity or books. There is no goal to have an internal matching engine or an internal trading environment. The goal is to have full composability and be the backend solution for other protocols. We believe in the openness and composability of DeFi, and respect all builders and owe it to many DeFi founders for the work they put in and the risk they took.

We love the technical beauty of Yearn and Iron Bank, the launch strategy of Ribbon, the codebase of Aave, the model of cTokens of Compound, the amazing docs & innovation of Alpha Homora, the interface focus of dYdX, the community of Sushiswap, the relentless innovation of Curve, the product focus of Uniswap, etc. We hope to collaborate with DeFi builders to move the space forward!

Even if you think Gearbox could be competing with your favorite bag, it’s likely not the case — those could potentially be integrated. The reason for that is Gearbox is a DeFi primitive, not only a product. The leverage taken could even be applied to another leverage protocol in a composable way. As long as the risk models work out and the composability is possible, an integration doesn’t seem like an impossible endeavour.

The community shall decide.

How can I get involved and contribute?

Gearbox was born on ETH Global MarketMake Hackathon as developer passion of Mikael. After taking the idea to the finals, we’ve been working on this since February 2021. A few contributors (Ilgiz, ivangbi) got together and kept improving the protocol, product vision, and the strategy. It has been a few exciting months. Many helped with product & tech. Thank you! We shall write a piece about that in later stages.

There are a lot of things to get involved in, ranging from being a third-party liquidator to helping onboard collaterals, to research on risk scoring and building integrations, and so on. The community has just started forming, so we welcome everyone to jump into Discord.

Join the Gearbox Protocol ⚙🧰 Discord Server!
Welcome to Gearbox DAO. In this house, we are making leverage composable. Let’s build together! | 20126 members

Within the next few weeks, many things will come out for you to test & research. Follow on Twitter to be among the first to know. Join the Gearbox journey and take control over the new DeFi primitive 👀

JOIN DISCORD