Product Evolution V2. Gearbox Protocol from 1 to 2: Going Further!
GM GEARheads, today we have quite a piece for you… it’s a theoretical & practical path from Gearbox V1 to Gearbox V2 over the course of almost an entire year of 2022. Stick around for some protocol comparisons & assumptions that have led to what V2 is about to be.
This article is 33 pages-long if you count in word pages Arial 11… so pour yourself a glass of green tea + red wine 🍵🍷 Let’s go!
- Part 1: Theory and Market Perspective. Discussing some assumptions with regards to PMF in leverage, capital efficiency vs gambling, spot vs perps, and learnings from Gearbox V1.
- Part 2: Gearbox from V1 to V2 ⚙️ Here we touch upon concrete product assumptions, as well as all the sexy technical and interface improvements. Also, code & audits released!
- Part 3: V2 launch & alpha. Further plans, current state of the DAO treasury and resources, as well as some %%% alpha for V2 🔥
Don’t miss anything! Hope you enjoy the read ❤
PS: in case you are ready to ape in, Liquidity Mining for passive earn side has already started. Learn all the details and make it rain sers!
Don’t you find it super interesting to know why products do pivots and prioritize certain features over others? If you see how decisions were made, you can better understand the overall design. Together with early contributors, testers, and community members — Gearbox Protocol V2 and Gearbox dApp have undergone quite a few changes. Today, we want to explain all these major iterations. Almost a year ago, we wrote about a many-months journey leading up to Gearbox V1 in 2021. If you want to know the full story, check out that piece from 2021 as it contains parts the early thinking process:
PART 1: THEORY & MARKET PERSPECTIVE
1.1 Learnings from Gearbox V1
- ✅ 0% bad debt in the protocol [Google Studio for V1]
- ✅ no untimely liquidations, all ran well [see Dune, outdated a bit]
- 2 critical bug bounties paid out [disclosures in GitHub]
- a few protocol emergency pauses [see Discord notifications]
Overall, it was a safe run, and we are all happy with how the test-in-prod went. In terms of usage, it is hard to give concrete meaningful numbers because TVL and Credit Accounts were first throttled ($10K limits until May 2022) and then fully paused in August 2022.
Below are some data points which could be made sense of.
Low user interest in long-tail collaterals
Despite LTVs having been high for alternative assets (70–80 range), there wasn’t much interest in using them as collateral. That is, to portfolio margin kinda, using your 1INCH or other tokens to borrow stables or major assets. Of course, we can discredit this data point due to the fact that Gearbox V1 allowed very few interesting user interactions, however…
This rule seems to be true in other protocols. If we look at the volumes and usage of alternative collaterals in Aave, MakerDAO — it’s fairly fairly low. And whether it’s a chicken & an egg problem of liquidity, there are a few points that are interesting to point out here.
Crypto asset prices are extremely correlated with one another, see this Gauntlet report. As such, if you are already exposed to crypto like BTC & ETH — there isn’t much point for you to get a crypto index position. Because it’s quite likely that the major assets will show more or less the same performance, or rather the alpha-beta exposure (BTC goes up 100% meaning alts go up 300% — and vice versa). There are mutual funds and different rebalancing strategies in stocks in the real world, but they are also all fairly useless as they are mostly used to milk clients for fees.
The above, while maybe being a bad assumption from a trader / investor perspective [ignore it, to be honest] — still poses risk to protocols, where a drawdown in markets worsens liquidity. That presents issues for liquidations, where there might not be enough depth in the markets to liquidate positions. That’s extremely true in recent months for long-tail assets. As such, risks of bad debt in the liquidity pools become real. In fact, just after the draft of this article was written, Mango exploit happened.
To add or not to add long-tail collaterals?
Protocols don’t add too many long-tail assets, or if they do — they have extremely low LTVs for them. So it’s more of a user acquisition strategy & marketing to say “look, we have this asset onboarded” but the revenue-contribution for the protocol coming from those assets is small. So small, it’s better to remove those collaterals after user acquisition is done.
It’s almost similar logic to how “risky” clients’ accounts in banks are being closed (while being extremely annoying for users and usually making no sense). The potential those risks present just never outweigh how much the bank will make if they keep them. Nobody wants $5M FDV collaterals.
There have been attempts in the past at “multicollateral shitcoin DAI” or “many assets Aave” forks. In general, they have all eaten the dust as the long-tail simply brings more risks while not bringing much capital or revenue. Long-tail assets can be a great acquisition strategy and community hype, as long as risks can be balanced.
As you can see, there weren’t any strong objections to having LDO FXS CRV and other assets in V2 — to have very low LTVs. It is important to count those assets in as their rewards increase on a Credit Account, so they are included as interactable assets, but not as collateral per se:
Chicken & egg for long long-tail collaterals: oracles
It’s not just about what a dev wants, it’s about what a dev can do. And one of the largest issues for long-tail are oracles. Or rather, liquidity… or what is first? Well, let’s look into practical things:
- The reason why LTVs / LTs for long-tail assets are low is because liquidity is thin and is not guaranteed to be there at 1:1;
- Thin liquidity makes oracle data points either hard or impossible;
- Absence of good oracles for such assets (it’s not that oracle protocols are bad, it’s just how it is) makes liquidity growth & depth for such assets a chicken & egg problem.
One can try to do TWAPs on Uniswap V3 — but it’s still a fact that majority of capital and majority of power users don’t use such collaterals, for now [case of Euler]. It’s cool narrative building — but for now, long-tail assets are mostly a marketing move. Not a diss, just a fact, currently.
There is good research happening on this side of the world though, so once it’s crisp and done — we can expect to see more quality long-tail usage. And we would be happy to learn & build alongside when it happens. But the $$ in them could still be 1% of ETH (the percentage is made up, it’s just to show how small something is — like the school grade our intern got in statistics).
As we have gone through the above on why long-tail assets are not a money-making machine, it’s important to point out that it’s likely only the case in transparent systems. On exchanges like Binance and Coinbase, who are closer to “normie” users — they can charge a huge rake and swap feea and all that, making long-tail assets as one of the major revenue sources.
In DeFi, since fees stream into 0 with time (see Uniswap & Curve & Maker stablecoin swaps bps reduction battle), there is likely not such a possibility at play. Of course, Uniswap V3 has an option for higher bps for long-tail assets, they are still risky and not liquid. Need to see what happens!
We love them, we want them, but it’s just not possible now for anyone.
1.2 PMF Assumptions in Leverage
There is leverage as in derivatives (perpetuals) — and there is leverage as in spot. Perpetuals require funding rates to balance both sides and can always offer more liquidity, as such, allow for more depth to trade. Spot leverage is more like “borrowing physical cash”. The size you can enter with here is smaller. This is also true in the real world, whereas derivative markets are much bigger than spot markets.
In crypto, the size you can trade with also dictates your PMF in a way. That is why some traders literally prefer derivative markets to spot trading, even without leverage [can’t find that CL tweet, help] — simply because spot depth on big size is smaller. And what does it lead to? As you read above in the oracles section, it leads to lower LTVs:
- Lower LTV to account for safety as Chainlink tick price is up to 2%;
- 5% more percent or so for liquidator’s premium;
- A couple more percent to take slippage into account;
So we end up with 10% of the LTV being slashed simply due to lower market depth at current prices. This immediately means that the highest leverage that can be given is 6.7x. For a similar reason, IndexCoop leverage tokens can’t even go above 5x due to Compound constraints.
* 6.7x here is calculated as 1 / (1–85%), where 85% is liquidation threshold for ETH or BTC, while 5.5x on Compound you can get as 1/(1–0.82), because LTV for ETH on Compound is 82%.
Why would a trader go to spot leverage if the maximum they can do is about 6x for majors, and 3x for alts?
Bam, there we go. A clear assumption for the potential user base for Gearbox, at least given the current tools (oracles, liquidity) available. When it comes to casino-trading— perpetuals will be more efficient for this than spot leverage. So going long or short is simply better & possible on CEXes or perpetual exchanges: Perpetual Protocol, GMX, dydx, etc. Spot won’t give x25. Gearbox does not try to compete there right now.
So, the degen casino product idea for now is out of the way…
“What else then?” — Good question!
Composable Leverage is a fancy term, but also a real one. However, from the user perspective, the question is WHAT EXACTLY are you giving me leverage for, if it’s not casino trading?
→ Leverage in a sense of “Capital Efficiency”… YES!
1.3 Leverage as in “Capital Efficiency”
Let’s twist your notion of leverage from “x100, trading, gamble” to “more capital, safety, better yields”. So you are not degening on alts — you are taking larger more composable positions on a longer timeframe. Less systemic risk, more depth, more capital efficiency.
Why is the timeframe important?
Currently, Gearbox Protocol fees are (i) liquidations (ii) borrow-lend spread fee, like in Aave. Liquidations can be extremely profitable (hi, mr. Hayes and GMX) but lead to users churning out. And it’s not really an issue given people love to gamble and they never run out of new money to do so— but it’s just not our way. Also because it’s a different product.
On the other hand, taking fees for borrowing feels safer and more clean. And since those fees are taken linearly per-block, the protocol benefits from creating a long-term sustainable relationship with the leverage takers. As such, earning more and remaining more safe. That also reduces systemic risks from liquidations!
The protocol can later opt-in to take deposit or withdrawal fees and milk either one of the marketplace sides. In fact, pretty much any protocol can do it. But it’s not a nice look, especially at the start. Raking revenue usually starts at a very late stage. First = grow, then = make $$.
So what positions can be seen as sustainable / long-term?
- Pretty much any sort of farming with stablecoins: improves depth of those pools (even if capital allocation efficiency is reduced).
- Farming with liquid pegged assets like stETH & WBTC: especially when such assets are synthetic, it helps them grow as DeFi building blocks.
- Leveraged delta-neutral strategies: soon with Brahma & Mellow!
- Time arbitrage strategies: when peg restoration takes more than 1 block so you take a loan for a few days/weeks to make money on it playing out.
- Hedging strategies with short-tail assets, however one does it.
- And more… suggest On Discord!
The PMF for such pools (vaults, farms) has been clear across chains: be it Yearn, Alpha Homora in its early days, Abracadabra, Alpaca on BSC, etc. Leveraged yield farming is still a pretty large market sector, and many of contenders peaced the f out for some reason. So, it seems ripe!
Such leverage positions also make most sense from the protocol-earnings perspective. These positions are supposed to be held for months-long, and are only subject to liquidations in case the underlying assets experience systemic risks and truly depeg. And even then, it’s up to leverage users to decide their risk parameters and withstand liquidations by adjusting their positions. Anyway, do read up on some of the risk analysis:
PART 2: GEARBOX V1 — > V2
The assumptions explained above have become more or less apparent in January 2022. Quite a few changes needed to be made in order to make this product push possible. In fact, throughout V1 we have observed the majority of activity being passive APY arbitrage between the borrow rates and the Yearn pools available back then, see more here.
2.1 Leveraged Yield Farming x10 as PMF
Again; the focus is not on degen trading alts, for the reasons explained above (liquidity & oracles). Instead, the focus is on farms and big positions users go into long-term. As identifying those happened last winter, some of them could be outdated, but are still majorly relevant to this date and offer the most liquid & consistent APYs.
- Curve Finance pools both with stablecoins. Here we take the most liquid and “trusted” stables like LUSD, GUSD, sUSD, 3crv, FRAX.
- Convex and Yearn farms for those Curve LP tokens respectively.
- Lido stETH offering the highest APYs.
The other pools & farms & protocols that could be considered for the future but didn’t make it into V2 yet. Help us build it out!
- Uniswap V2/V3 LPing. Although one could argue that in Alpha Homora there is no huge interest in it, as the IL you take is usually even higher than the fees you make. Even when the APY is decent enough, you barely break even. But that is for now, as the market is down?
- DOVs. Those can be quite lucrative especially when hedged (looking at Rysk, Mellow, Brahma, and others) but in some cases like Ribbon it’s unfortunately not possible to integrate yet as the positions being taken are not fully liquid on-chain 24/7. Liquidating a Credit Account when taken as cross-collateral can be impossible as the possible downside is not limited due to how asset prices can fluctuate compared to underlying debt asset. Same-collateral is easy to price though.
- Structured finance protocols, like the ones listed above.
- Balancer and Aura Finance popped up quite recently, so there wasn’t time to finalize ERC-4626 just yet. But as Yearn is planning to move to such vaults too very soon, external and internal contributors should get back to the research with this new standard!
- Alchemix, mStable, MIM, and a bunch of other protocols / assets can be considered. Suggest anything else in Discord! A non-exhaustive list with ideas can be found on the Risk Committee page:
2.2 ⚙️ Technical changes in Gearbox Protocol
Codebase & audits can be found at the end of this section.
1. Multicall reimagined
The concept of multicalls has been around for a while — the base premise of “take several contract calls, execute them in a batch one after the other” is quite simple, after all. Multiple protocols have their own implementations of Multicalls for different purposes — Uniswap & MakerDAO the most known.
However, the current state of multicalls does not unlock their “true” potential — you can call a few view functions to gather a bunch of data from multiple sources within just one node interaction — but that’s about it. What if you wanted to execute some complex, multiple protocol-spanning strategy in a single transaction?
State-changing interactions are significantly harder to set up — since the multicall contract is the one making calls, all interactions that depend on msg.sender break (which is, all the interactions that matter).
You could, in theory, sidestep a problem by creating fixed strategies that could be executed in a single call (in fact, this is what Alpha Homora would do with their “spell” contracts), but this would not be sustainable in a constantly changing market. For example: suppose you have a strategy that deposits DAI into 3CRV, deposits 3CRV into FRAX3CRV and puts FRAX3CRV into Convex; and the reverse operation is the exact opposite.
Now suppose that FRAX has slightly depegged. In order to exit your position, you have to go through an imbalanced pool, where Curve will wreck you for trying to withdraw a deficient asset. And you can’t withdraw your FRAX3CRV from Convex and put them into Yearn, or withdraw your 3CRV and put them into LUSD3CRV — you have to unwrap the entire position first, losing money on gas, fees and slippage. And if you have a large amount of money, you can’t split it to prevent slippage — you have to use the hardcoded path, which goes through exactly one pool and won’t do any optimization on your behalf.
For state-changing multicalls to be truly useful without caveats and asterisks, you need to be able to execute any strategy that is possible through a sequence of ordinary EOA calls. For that, you need something more generalized — a smart wallet that would hold your funds and behave exactly as an EOA would when interacting with all those third-party protocols — in that case, you can route a batch of calls for it to execute within a span of a single transaction.
Turns out, this is exactly what Gearbox is good at. The whole concept of composable leverage is predicated on Credit Accounts, which are smart leveraged wallets that hold user’s (and borrowed) funds, and can execute arbitrary transactions (within certain limits) on user’s behalf. If we have this out of the box, then implementing state-changing multicalls is a natural evolution of their functionality.
With multicalls in Gearbox V2, you can do something as simple as depositing into 3CRV and then putting that into a Curve metapool, or something as complex as doing optimized trade splitting (the first time this can be done with leverage!), depositing into multiple Convex pools from just a single stablecoin, etc.
And, as it turns out, multicalls are an especially good fit for Gearbox as a composable leverage protocol. In protocols like Aave, health checks have to be performed after each action, which increases gas costs to the point where most complex leveraged strategies are prohibitively costly. It doesn’t have to be this way: as long as all actions are executed atomically, you don’t care if the system is solvent between them (que flash loans) — only that it is solvent after all of them are executed.
Gearbox multicalls behave exactly like that — no collateral checks are done until the very end of a multicall, which drastically reduces the collateral check overhead for complex strategies, making them much more (and, perhaps, for the first time) viable.
2. Liquidations without flash loans
Another great consequence of a multicall is that it flips the typical liquidation flow on its head, making it that much more cost-efficient.
For a typical liquidation, the liquidator procures enough capital to repay the loan before liquidating, receives the user’s collateral, and then has to dispose of that collateral to regain their capital in the original asset or return funds, if they flash loaned. There are flash loans, transfers to and from the liquidator, and other actions that increase the cost of liquidations. Additionally, positions that are not explicitly expressed as tokens (i.e., Convex farming positions) cannot be used as collateral, since the protocol wouldn’t know how to return them to the liquidators. This is how Gearbox V1 worked, and it faced all of those challenges.
Again, this doesn’t have to be this way. All of the funds are already in the position, and the risk parameters ensure that they are sufficient to cover the debt during the liquidation. It doesn’t make sense to make the liquidator pay upfront in most scenarios, as long as they can tell the protocol how to dispose of the collateral assets to make the LPs whole.
This is exactly where multicalls come in — they are a tool through which the liquidator can transform collateral assets to the borrowed assets without them ever leaving the Credit Account, which means that no flash loans or redundant transfers are required. And since multicalls support more general interactions than simply transferring the assets, a much wider range of collaterals can be supported.
Of course, the conventional mode of liquidation is fully supported — if the liquidator wants to keep the collateral assets, they can just approve enough underlying to the protocol to cover the debt, and all of the assets will be transferred to them.
Something in-between is also possible — if a Credit Account has non-transferable positions (such as staked Convex tokens), the liquidator can withdraw them into something transferrable before receiving them; or receive only part of the collateral and swap the rest to underlying.
3. Phantom tokens: Convex & more made collateral
When you stake into a Convex pool, it gives no ERC20 LP tokens back that can be tracked as collateral. The same is true for numerous farming contracts in DeFi, including Curve gauges, Uniswap V3 positions, etc.
For most money markets this would be the end of the story — if there are no ERC20 tokens that the protocol can take into custody, then there is no way it can track position health or enforce repayment. It’s very hard to teach a lending protocol to own and track non-fungible positions without ERC20 representation.
Credit Accounts are different — they can own non-fungible positions, and also support arbitrary actions to dispose of collateral. The only thing left to do is teaching the protocol to evaluate such positions and include them into the health score of a CA.
Ultimately, most DeFi non-fungible positions are just ERC-20 tokens bundled in a specific way — Convex positions are just 1 : 1 bundles of their respective Curve LP tokens, and Uniswap V3 LPs hold a specific proportion of two assets traded in a pool. We know how to evaluate ERC20 tokens, so the only thing left to do is to map a non-fungible position to the amount of fungible ERC20-s it holds.
Phantom tokens do exactly that — they are pseudo-ERC20’s that are not transferable, but able to discover non-fungible positions belonging to an address and report the ERC20 amount held within. They are a simple but powerful tool that currently enables Convex positions, and can in the future be used to implement Uniswap V3 positions as collateral, and much more.
4. Smart Router [Pathfinder]
Multicalls are powerful, but they are only the part of the ultimate end-user package. Multicalls allow you to execute complex strategies and swaps in a single transaction, but how exactly do you know which calls to make, and how to reach your destination optimally? There are many things to consider:
- Exchange and deposit rates change every block. At one moment, a Uniswap V3 0.05% pool is the best place to swap between DAI and FRAX, and on the next a whale comes and moves the price 10% up. At one moment, 3CRV is a balanced pool, and on the next 10% of USDC gets withdrawn, making depositing that asset very lucrative;
- When you execute a complex sequential swap (i.e., WETH => DAI => 3CRV => FRAX3CRV), you don’t know the exact amount you will receive at each step. So how do you know which amount to input into the next step? You can input only the minimal received amount from the previous step (i.e., dy_min you put into Curve), but that will inevitably leave dust on the account;
- How do you manage slippage through multiple swaps? If your slippage tolerance is 2%, then how is it split between different swaps and deposits along the way?
- What function do you call in a pool to make it do a specific thing, and how do you build the calldata for it?
These questions are just examples — there are many more issues to solve with complex interactions. With just one pool, it’s easy to take a look and determine the best course of action, but when several pools across multiple protocols are involved, complexity starts growing exponentially.
Router is a system created to address that — a route-optimization engine designed from ground-up in Solidity to build optimized, multi-step multicalls from just a small number of search criteria.
The router can search for the best swap between two tokens across several DEX protocols and pools, find the best Curve deposit/withdrawal, turn any combination of DEX-traded tokens into an LP position in a supported protocol, unwrap a specific number of layers from a composed farming position, find the most optimal route to liquidate a CA, and more.
The resulting multicall is gas-optimized, minimizes dust and defers slippage checks to the final amount of the desired asset only. And all of this is done in Solidity, which means that the best multicall can be built with just a single request to a node.
5. Oracles for different LP positions & assets
Since Gearbox V2 supports more exotic assets than simple exchange-traded tokens, some updates to oracles were required.
Firstly, all oracles for simple assets were changed from ETH to USD oracles — USD oracles are, in general, more precise, and are also more compatible with L2s or networks other than ETH, which greatly simplifies future deployments.
Secondly, new price feeds were introduced for LP tokens and shares, to support Curve and Yearn in particular. With LP token feeds, the challenge is to set up an oracle in such a way that at least a somewhat fair value of assets in the pool is computed, while also ensuring low risk for the protocol and resisting manipulation.
- For Yearn, the methodology is fairly standard — the price of the underlying asset (which can be retrieved from the corresponding Chainlink oracle) is multiplied by the vault’s price per share. This comprises fair value of vault shares, since in most cases this is exactly the value the user will receive on withdrawal, aside from especially large withdrawals causing yield loss. See more in the docs.
- For Curve, the design process is more complicated. Gearbox V2 supports USD-based and ETH-based stable pools, which means that the primary market risk is from rapid depegging. This leads to a fairly conservative methodology, whereas the price of the cheapest asset in the pool is multiplied by the pool’s virtual price to compute the price of the LP. This means that the oracle will quickly respond to depegging events, since it behaves as if the entire pool is comprised of the depegged asset. At the same time, it may estimate Curve LPs lower than the sum value of assets in the pool, although, under normal market conditions this discrepancy is small.
To address price per share / virtual price manipulation (see the Cream exploit as an example), each LP price feed implements a limiter on PPS / virtual price. This means that the value can only change within the interval of [current : current + 2%], and the DAO periodically votes to update the limit. If the value grows higher than the ceiling, it is simply bounded (this is done to prevent the price feed reverting under normal pool operation, simply because the DAO didn’t update the limiter in time), while going below the floor would cause the feed to revert, since PPS or virtual price should not decrease, normally.
6. Reducing or increasing debt made possible!
While partial redemptions are not made possible universally yet, to avoid potential security risks (even if none are envisioned right now) in V2 you can: increase your debt by borrowing more, of course — or alternatively return some of the borrowed capital on your Credit Account to reduce your debt (as such, reduce the borrow APY you are paying for the capital borrowed overall).
7. Maturity-based fixed rate borrowing
Fixed rate borrowing has great synergies with Gearbox, since it makes farming strategies much more predictable, and even enables all-new strategies, such as ones based on basis trading. While fixed rate pools will not be implemented at launch, the current core contract architecture fully supports in-house and third-party pools (think Yield or Element) being added later.
8. Gas optimizations over 25%
Beyond gas savings due to multicalls mentioned above, a lot of small tweaks have been done to optimize gas usage. This has reduced gas costs for simple actions (such as opening a credit account) and overheads on calling third-party protocols by 15–25% across the board.
… Building a more flexible and long-lasting system
Gearbox V2 is much more flexible in terms of updating the system and responding to threats than V1. Important system functions are compartmentalized, which makes it modular — for example, exploits can be patched and new Credit Account management features can be added by simply replacing a Credit Facade contract, which is an interface to the core Credit Manager contract. This means that the system’s functionality can be seamlessly updated without affecting existing positions and Credit Accounts — something that was much more challenging with V1.
Gearbox V2 is also much better at handling credit and integration risk. There is a special role that can liquidate accounts when the contracts are paused (to preserve fairness, this is done without a liquidation premium, so the borrower will receive nearly all of their funds back). Borrowing can be stopped while keeping the rest of the system functional — a measure that can be used to respond to moderate exploit vectors while allowing existing CA owners to manage their accounts. There is a special list where upgradeable third-party contracts can be put — this prohibits some functionality for included contracts, so that attack vectors based on compromised upgrade mechanisms cannot be utilized.
There are many little knobs like these being added to the system, which will give it greater overall robustness and longevity. Gearbox V1 had to be deprecated, as a discovered exploit (next to other reasons) required a hacky solution that wouldn’t work without also disabling borrowing — all because of a rigid architecture that did not allow for a simple interface change that would solve the problem.
One of the design goals for Gearbox V2 was creating a more flexible system that would still be as decentralized, trustless and immutable as possible — and the new architecture that pairs permanent Credit Managers with more flexible and updatable Credit Facades strikes a fine balance…
PS: chad van0k wrote this awesome technical part! Code in English?!
Codebase & Audits Released
Thanks to all the devs & big brains who have been working together on this complex project for the last year. Dive in, let us know what u think, help find bugs [$200,000 awaits you]. Excited for the launch in a couple days! © 0xmikko
- core-v2: https://github.com/Gearbox-protocol/core-v2
- integrations-v2: https://github.com/Gearbox-protocol/integrations-v2
Gearbox Protocol is modular, as such, full protocol re-deployment is not required. Enacted multisig can simply take pieces in-and-out. This makes it easier while not having smart contracts as upgradable. So, in V2, Credit Accounts (the 5,000 smart contracts) stay the same. Also, pools stay the same, so liquidity providers do not need to migrate!
In the future, there can be different Credit Managers with different Allowed List policies, etc. allowing to isolate risks and create different debt combinations.
What it means for audits is that not every protocol change has to be re-audited fully, however, we have done it anyway. The pool side has been covered with every single full audit we have done to date since summer 2021, so 6 in total. As for Credit Managers and some new pieces, they have been covered by 3 new full audits that are being released today:
- ChainSecurity [2] full V2 coverage up-to-date: report
- Consensys Diligence full V2 coverage up-to-date: report
- Sigma Prime V2 coverage without final modifications though, but you can see in the report that the changes made weren’t abundant: report
That is next to the previous V1 audits that have covered some parts of the protocol that will remain there in V2 without changes. Those were:
- Consensys Diligence Fuzzing (04/10/2021- 13/12/2021): report
- ChainSecurity (31/08/2021–13/12/2021): report
- MixBytes (06/07/2021–22/12/2021): report
- Peckshield early audits: report
Keep in mind that no number of audits can guarantee full safety. There are always high risks involved in DeFi, as many platforms are composable and depend on each other. There is no guaranteed return on Gearbox — you must understand the risks involved.
For V2, native & Immunefi bug bounty shall be updated in terms of the scope (V1 contracts are now outside of the scope — devs will update that after DAO deploys everything). If you are a developer, or even better — a whitehack — please jump in the codebase and help us improve security! We have had 2/2 successful critical payouts so far, fully respecting the work & time put in to prevent exploits. Let’s keep it going!
2.3 Interface Improvements
Overall, the interface got quite a few improvements:
- For passive liquidity providers, the most important information — being source of yield + security — are now displayed all on the main page. You can, of course, also click on links & read more in the docs.
- The Credit Account starting page now got a top “Strategy” page which uses V2 multicall+router to let you ape into strategies with one click! It saves you about 4+ transactions on average (meaning less gas costs and less time spent) while you can still control for your debt asset, your leverage factor, and the farm you want to be in.
- Inside a Credit Account, you can now find a new tab “Farm” which is related to non-trading operations: depositing & staking into certain vaults like Yearn and Convex contracts. “Connect” tab also got a new look which should be easier to navigate.
- And, overall, cleaner & faster loading time! Of course, still a few things to add and keep improving on, but we hope you like it ❤
Go and see for yourself [might take a few hours to update]:
PART 3: V2 LAUNCH ALPHA & DAO PROGRESS
Now let’s get into some practical things: WEN? Here you go:
- DAO successfully finalized votes after week-long discussions.
- The interface is ready and is currently being re-configured.
- The new landing page is being updated too.
- Liquidity Mining guide went live a few hours ago:
- Next up, multisig deploying the wstETH pool.
- Then, deploying all Credit Manager & other pieces; testing it on mainnet, finalizing the starting Leverage Ninja list and docs.
- And finally, releasing guides for Ninjas to ape by EOW!
Speaking of Ninjas, what can YOU do with gearbox V2?
3.2 Alpha for LPs and Ninjas in V2 🔥
Liquidity Providers Passive Earning +10%*
The Liquidity Provider LM program has jsut gone live. You can LP now! See pool contracts here. If you LP’ed in V1, there is nothing new for you to do. Pools stay the same, so no need for extra action.
* For all GEAR APY calculations, the number is taken at $200M FDV. That is according to the vote and and a slight premium to the last DAO rounds which are locked & vested for 2 more years. See at the bottom here. Also, the 1% withdrawal fee is already on snapshot vote to be removed on November 15.
Exact block height LP LM start: 15820000.
Assets: DAI, USDC, ETH, wstETH, WBTC.
Where to ape? Here. When? Now & later!
You can find an FAQ section about yield and more in the UI:
Leverage Ninjas: Credit Accounts ALPHA
First of all, Leverage Ninjas also have their own little reward system. That one starts on Oct 27–28 or so. All the details are in the same article.
The hot stuff though is what this composable leverage allows you to do! In a nutshell, any combination of trades & farms & collaterals & leverage based on the Allowed List voted for V2. All on-chain:
- Short & long ETH, WBTC, stETH. And then, go farm with them! As a result, it makes you be delta-neutral or hedging your positions.
- Time-arbitrage some of the stables. That means you can trade pegs of stables and stETH with leverage, making more ROI %. And…
Farm in Curve, Convex, Yearn… with all these!
- Want to know how to earn ~20% APY on Yearn, go here.
- Prefer Curve Finance pools? No worries, go here.
- Want to learn about FRAX +Gearbox? Here.
- Want to rock some stETH Lido plays? Check this out.
- YOU CHOOSE the debt asset (DAI/USDC/WBTC/ETH/wstETH). That is the asset you borrow, so it is your debt — basically, the asset you trade “against”. All the positions & farms you take are priced in this asset for the sake of Credit Manager calculating your Health Factor.
- YOU CONFIGURE leverage factor: safu x3, riskier x6, or degen x8–10. Depending on the position and collateral you choose, LTV be higher or lower, allowing you to borrow more. You can increase capital efficiency with correlated debt-vs-farm positions (stables to stables debt, stETH to ETH or wstETH debt, etc.)
- YOU APE into the farm you want to: Curve LUSD3crv / GUSD3crv / Frax3crv / sUSD3crv… -> then you can decide to go farm either in Convex or Yearn! All of that is up to you. Source yield, make more ROI than your borrowing rate -> GGWP!
- YOU ENJOY ser enjoooyer. Collect the yields and keep track of your Health Factor, of course! Just keep it in the yellow-green, and even stronger market moves shouldn’t really be an issue for you.
Strategies page to make your life easier ❤ multicall
Remember that multicall+router thingy from the technical part above?
— Well, new interface update takes advantage of that! The complex steps described above can be solved with just 1 tab where you choose it all at once… and ape into a farm with just one click!
Credit Accounts as Leverage 2.0 / DeFi -Native Prime Brokerage
Gearbox doesn’t dictate what you must do, it only caps the boundaries of what you can’t do. Think of it this way: robo advisors, yield strategies, other trading protocols, or anything* else — can be integrated with Gearbox — to then do the same things they do but with 5x+ efficiency.
You can have your Curve LP strategy be done with 10x the capital size, and your Uniswap trade with 5x+ the size as well! As such, Gearbox increases capital efficiency of possibly any protocol or farmer/trader position.
As Gearbox is open-source and on-chain, any protocol porting to Gearbox (on either the LP side or Allowed List) can increase their user base liquidity and capital efficiency. Let’s build it together and grow DeFi!
3.3 A few words about Gearbox DAO & governance
Gearbox DAO and governance are still very active and vibrant, despite GEAR being untransferable and having launched almost a year ago. Nevertheless, apathy isn’t creeping in! That is also confirmed by many governance participants on Snapshot [no rewards to vote].
Current governance setup is a “convenience” choice given the protocol has still not hit PMF and is in exploration stage. Once and when this happens, governor alpha-like setup should become a top priority, to keep decentralizing the DAO and its operations. It would be too cumbersome to do now, as protocol could potentially still undergo changes with V2 going live & some parameters requiring more testing.
Anyway, the process of fully-decentralizing is in full swing:
- Since December 2021 [DAO launch] there isn’t any company-boss-overseer in all processes; the workflows are open & transparent!
- Twitter is managed by different independent contributors;
- VIBES program is in control of yet another contributor;
- Various infrastructure parts are run by different devs, thanks to the newly forming grant system that will keep improving;
- Multisig was increased to improve response time & safety;
- Governance is able to hit quorums thanks to the delegation system, which is fairly practical. Become a delegate too!
DAO Treasury & Grant Ideas
Meanwhile, Gearbox DAO is well capitalized in terms of funds available to give grants and increase dev power: 🐻s will not have us!
There is a lot of cool stuff that can be built with / on top of Gearbox:
- one click strategies using Multicall feature which allows developers pack several actions into one transaction (for example, open Credit Account, put collateral, get leverage, swap assets and provide them as liquidity — all in one transaction);
- leveraged voting power: get more voting power to participate in governance w Snapshot or other governance tools;
- fixed rate / floating rate leveraging with Yield / Element;
- leveraged indexes and simple passive strategies;
- basis trading strategies (open a long position in Gearbox and short position on Perpetual / GMX and earn on the differences between borrow rate and funding rate);
- discord & telegram bot notification bot system for users to see liquidations and major protocol changes in real time;
- Other ideas? Shoot em in Discord, and ask for a grant!
Transparent Monthly Work & Spending Reports
All the communications are open in Discord / Telegram chats, for every DAO & external member to see who is doing what. Next to that, monthly reports on work & expenditures is being published in Notion. So if you don’t have time to read Discord 24/7, just check the reports.
Thanks to everyone putting in their time & skills into Gearbox Protocol & DAO. To infinity, and beyond!
Disclaimer: Gearbox DAO is a group of enthusiasts, developers, and some companies — contributing to the ecosystem. You should not expect anyone else to work: there are no full-time workers. Anyone is free to work and contribute, and there are some funds to compensate for the efforts — but there is no entitlement in the DAO. Want something done? — Do the work yourself and make a funding proposal! There is no central body overseeing anything, nor should you expect to make any profits with the DAO. YOU are in control!
If you would like to learn more — just get involved on Discord. Discuss, research, lead and share. Call contributors out on their bullshit and collaborate on making things better. Here is how you can follow developments:
- Website: https://gearbox.fi/
- General Docs: https://docs.gearbox.finance/
- Developer Docs: https://dev.gearbox.fi/
- Mainnet dApp: https://app.gearbox.fi/
- Governance Forum: https://gov.gearbox.fi/t/start-here-forum-rules/
- Blog: https://medium.com/@gearboxprotocol
- Snapshot: https://snapshot.org/#/gearbox.eth
- Github: https://github.com/Gearbox-protocol
- Twitter: https://twitter.com/GearboxProtocol
- And, of course, the DAO Notion pages: