Prototype Phase & Where we are Now

Published by AVAX on

RoboVault is a yield optimiser building advanced innovative delta-neutral strategies allowing users to automatically earn safe yield with high upside and minimal risk exposure while also saving users both time & gas costs required to manually implement such strategies themselves.

This is the first in a three part article series we’ll be releasing over the coming weeks leading up to our token launch

Part 1 : Prototype Phase & Where we are Now

Part 2 : Roadmap & What’s Next

Part 3 : Token Launch & Tokenomics

Since launching we’ve gone through several phases, faced some challenges, and have been working on building a number of new products and strategies.

Prototype Phase

From the outset, we observed a large gap in yields offered to users providing LP from both trading fees & farming rewards vs single asset yields. Our early goal was to develop a product which would enable users to earn a portion of the higher yields available to LP providers while limiting the downside that LP providers are exposed to in the form of IL.

Our Prototype Phase saw the release of our first strategy, named “Single Asset Hedged Farming”.

The goal of this strategy was to provide end users with higher yield on single assets by utilising Lending Protocols along with LP Yield Farming. This was done by:

  1. Deploying a portion of the Vault’s Base Tokens to a Decentralised Lending Protocol such as SCREAM.
  2. The Vault would then use the deposited asset as collateral to borrow a secondary token.
  3. The borrowed asset along with the remaining Base Tokens are then paired to construct LP tokens to earn yield on trading fees & farming rewards.

As this strategy contains LP it had exposure to IL. We minimised exposure by developing rebalancing mechanics which aimed to maintain a delta-neutral position.

A more detailed explanation as to how our delta-neutral mechanics work can be found in our docs along with some modelling & simulations (users should also note that our strategies are not 100% hedged and there is some exposure to volatility however we have shown since deploying over a time frame of ~ 2–3 days our strategies are able to consistently deliver highly competitive yield to users historical performance of vaults can also be seen viewed on our analytics dashboards)

The first iterations of this strategy proved to be extremely promising in terms of providing highly competitive yields while also maintaining minimum volatility. Our keepers were able to successfully manage the position and minimise IL.

However, the first iterations of this strategy were deployed using modified versions of Yearn V1 vault architecture. The accounting methods we were using within the strategy led to a potential vulnerability. Fortunately, the Yearn team spotted it allowing us to disable the vaults with no funds lost. More details here

Current Phase

Vault Improvements

Since this initial phase, the team worked to integrate our core strategy into Yearn’s V2 architecture while also improving on a number of mechanics used within the strategy to provide better overall yields. Some of the key benefits gained by using Yearn’s V2 architecture & improvements to our core mechanics included:

Multi-strategy vaults

Strategy upgradeability

No withdrawal fee

Flash Loan manipulation protection

MEV Sandwich attack protection

Keeper Improvements

Outside of our strategies one of the biggest technical challenges we face at RoboVault is developing and maintaining reliability and effective keeper infrastructure. Reliable keepers are required to ensure that our strategies provide users with optimal returns. With keepers having to successfully complete required rebalances in order to :

  1. Minimise exposure to IL as prices move
  2. Avoid liquidation for strategies that are borrowing some secondary assets when the market is extremely volatile

When we initially launched on Fantom the level of activity on the network was significantly lower than it was when we relaunched our vaults using the Yearn V2 architecture.

However on December the 4th, there was a “flashcrash” within the entire crypto market including on Fantom, with a 40%+ drop in price over a few hours. During this period there was significant network congestion and our keeper infrastructure was unable to get the required rebalancing transactions on chain, at the time. This lead to multiple vaults suffering losses due to liquidations

More details here

Thankfully, when we relaunched the vaults we had put hard caps on the TVL in order to minimise risk if any potential issues occurred and we were able to compensate users for their incurred losses.

As a result we made a number of improvements to our keeper mechanics including having multiple keepers managing rebalances for our vaults including our own custom keeper, Gelato keepers using custom resolvers & OZ defender. Also to mitigate the risk of liquidation within our vaults we dropped the target c-ratio of our core strategy & also decided to utilise the Yearn V2 multi-strategy architecture by combining our core strategy with less complex strategies such as lending optimisers.

Another additional improvement we have made is the use of hysteresis within the rebalancing mechanics. As our strategies use thresholds to determine when rebalances should be triggered previously keepers faced the issues of sending a rebalance transaction but due to changes in prices the relevant metric would move back to within the thresholds where rebalances fail. This would lead to wasted gas on failed transactions and also lead to other issues such as clogging of transactions. By adding hysteresis to a resolver contract which determines when rebalances are needed we have been able to significantly improve keeper performance.

Since these changes have been made our keepers have been orders of magnitude more reliable.

Security Approach

As our delta-neutral strategies use LP’s to earn yield while also complete swaps between assets to maintain delta-neutral positions without sufficient protection these strategies may be vulnerable to a number of common attacks within DeFi. In order to secure users funds we use a number of different methods to protect against various attacks

  • Price Manipulation : By using Yearn’s V2 architecture together with health checks users are unable to significantly alter the vault price per share without taking significant loss
  • Sandwich Attacks : When completing rebalances to maintain a delta-neutral strategy we swap between assets, in order to protect against sandwich attacks we compare the price of the swapped assets using oracles vs the price of swapped assets to ensure there is no significant difference which would indicate a sandwich attack
  • Internal Testing : Prior to launching any strategies we conduct a significant amount of internal testing. This includes running strategies on mainnet forks & running various scenarios to ensure the mechanics used to maintain a delta-neutral position cannot be exploited and also will provide positive yields for users.
  • External Reviews / Audits : We have worked with a number of external parties to provide external reviews of our strategies including the Byte Masons Team, Strategists familiar with the Yearn V2 architecture and external audit firms.
  • Security Training : One of our core developer Smoothbot has also recently completed a fellowship through Yearns yAcademy program auditing a number of contracts and gaining mentorship from various leaders in the security space

New Strategy Development

Users of our vaults and observers will note that our core strategy is able to capture part of the upside of high yields from LP farming, but also has a number of limitations. These include:

  • Capital inefficiency : As our core strategy uses a lending protocol to borrow a secondary asset, the amount of assets in the strategy is constrained by the LTV limit on borrowing for the collateral used. This limits the portion of funds within the strategy that can be allocated to LP which generates the higher yield for our strategies.
  • Liquidation Risk : Increasing the capital efficiency (i.e. borrowing more) also exposes the strategy to potential losses if our keepers are unable to get the required rebalancing transactions on chain during volatile periods.
  • Exposure to large changes in available borrowing liquidity : If there is a significant change in the amount of liquidity available to borrow for the secondary asset used to create the LP position, the borrowing costs will significantly rise and negatively impact returns.
  • TVL Limits : As our rebalances complete swaps to maintain the delta-neutral position, there is some slippage incurred with each rebalance. As a result, if the strategy’s balance of LP is quite high relative to the total liquidity available for the pair used, slippage will be higher for the strategies
  • High Gas Fees : Currently rebalance transactions completed by our core strategy are quite gas intensive. This leads to high costs when networks are congested and also makes it more difficult to successfully complete a rebalance transaction compared to lower gas transactions.

Based on these limitations, we’ve been developing a number of new strategies using similar mechanics as our original “Single Asset Hedged LP Farming” strategy while aiming to overcome some of the constraints of this strategy. These include

Joint LP Strategy

Our Joint LP strategies use similar mechanics to our core strategy to maintain a delta-neutral position. Instead of borrowing a secondary asset, two provider strategies from single asset vaults pool funds to create an LP position which is managed within the Joint LP Holder contract. The LP position earns yield for both provider strategies from trading fees and yield farming rewards. While our keepers monitor the LP position and rebalance as needed to maintain a delta neutral position and minimise exposure to IL. This can be considered a more capital-efficient version of our core strategy. As a result the expected yield will be higher for provider strategies however these strategies will also have more short term exposure to IL. The Joint LP strategies also solves a number of key limitations of our current core strategy

  • Capital Efficiency : Allows for a much higher portion of the strategies assets to be allocated to LP (although is dependent on the other provider strategies also combining to create the joint LP)
  • Liquidation Risk / Borrowing Costs : By pooling funds from another strategy to create the joint LP, as opposed to using a lending protocol, we avoid any liquidation risk
  • Gas Costs : Again by not using a lending protocol’s rebalances to maintain the delta neutral position, strategies are much less gas intensive. This is important as it reduces operational costs of running the strategy & lowering gas costs improves the reliability of the keeper.

Additionally through our Joint LP Strategies we have the flexibility to utilise various types of LP’s with versions being tested that utilise Beethoven (Balance LP’s), CRV & Solidly.

(this strategy is currently deployed to a private test vault and we’ll be deploying to our Degen Vaults shortly)

General Hedged LP Strategy

Our general LP hedged strategy works in a similar way to our current hedged LP strategy, with one major exception. It allows for any two assets to be borrowed against the vault’s base asset to create a LP and farm rewards while constantly rebalancing the position to avoid IL. This allows us to gain exposure to high yielding LP pairs on any asset that can be used as collateral and also to potentially borrow pairs which are more correlated to minimise exposure to IL.

(this strategy is currently deployed to a private test vault and we’ll be deploying to our Degen Vaults shortly)

LP Strategies (in development)

In addition to the above strategies which we have developed and are currently testing we are also working on developing a number of strategies which optimise LP yields

Farming Optimiser : Often LP’s can be farmed / auto-compounded on a number of protocols our farming optimiser will work in a similar way to Yearns lending optimiser automatically allocating LP to the optimal pool to earn the highest yield available

Leveraged LP Strategy : Using protocols such as Tarot and Impermax we are able to leverage LP for higher yields while applying similar mechanics as our delta-neutral strategies in order to minimise exposure to losses incurred with the leverage LP position as prices move.

Wrap Up

In summary we now have a catalogue of strategies along with a well developed infrastructure that can reliably manage our delta-neutral strategies together with a strong understanding of security concerns involved with the delta-neutral strategies we are using within Yearn’s V2 architecture.

This will serve as a strong foundation for the future of RoboVault as we continue developing advanced strategies while launching a number of new products within the RoboVault suite. More on this in Part 2

Categories: DEFI_NEWS