Update both ETH2x-FLI and BTC2x-FLI to support levering and delevering using multiple exchanges.
The Flexible Leverage Index uses a smart contract called FlexibleLeverageStrategyAdapter to execute rebalances. This contract currently only executes trades through a single exchange (Sushiswap). This upgrade allows us to pass in a list of enabled exchanges that our keeper bots may use. Initially, we will enable Sushiswap and Uniswap V3.
As FLI products grow larger, we increasingly have to consider slippage on our trades. This is because as AUM grows our rebalancing trades must also scale. To combat this, we set a maximum trade size, and lever/delever the product slowly over multiple trades. While this solution has been sufficient under normal operation, it is a slow process since we must also set a minimum delay period between trades to allow the Sushiswap pool to be arbitraged back to the correct price. During rapid price changes, this bottleneck can prevent us from delevering fast enough, leading to liquidation risk. This constraint is part of the reason why FLI supply caps must be maintained.
Enabling FLI to use a list of whitelisted exchanges to rebalance has several advantages. First, minimum trade delays can be enforced on a per-exchange basis. This means that we can execute a rebalancing trade for each exchange simultaneously, increasing our rebalancing speed. Secondly, having access to multiple exchanges allows us to make use of Uniswap V3. Uniswap V3 almost always will allow us to execute large trades with low price impact, but occasionally produces suboptimal trades for brief periods when price moves outside of liquidity providers’ preset range, and high gas prices are preventing them from redeploying their liquidity. By utilizing multiple exchanges, we can easily direct our keeper bots to use Uniswap V3 as the primary exchange, with Sushiswap as a backup. By utilizing Uniswap V3 in this way, we will be able to achieve a 3-6x increase in our existing trade size and delevering speed.
Overall, this change significantly improves FLI’s safety and will allow us to have more confidence when increasing the FLI supply caps.
The FlexibleLeverageStrategyAdapter is responsible for controlling FLI’s rebalancing operations. This change will require deploying two new versions of this contract (one for each FLI product).
The proposed changes to the contract can be viewed on GitHub here:
Additionally, we will have to execute five transactions per FLI product from the Index Coop multisig to enable these adapters. A table detailing them is provided below:
|Old FLI strategy adapter||Withdraw ripcord incentive|
|BaseManager||Add new adapter to BaseManager|
|New FLI strategy Adapter||Whitelist the keeper bots|
|New FLI strategy Adapter||Send ripcord incentive|
|BaseManager||Remove old FLI strategy Adapter|