Alpha Tips
Below we will be listing some of the useful information that may come in handy as you develop your own Alpha.
Leveraged Looping
Slippage will kill your performance, on either side.
If possible try to use native staking or unstaking as opposed to swapping. If you have to resort to swapping make sure your alpha tracks the exchange rate and only executes swaps when it makes economical sense.
If you can, TWAP in and out. Building large leveraged position in one go might cause huge slippage. Keep in mind that LPs often actively manage the pools on DEXes and it may make sense to build your position in several smaller steps rather than one large one.
Use aggregators. They will help you get the best route for your swap. Additionally the Universal Swapper fuse that you will use for this interaction will provide additional validation of the transaction provided by the aggregator.
Watch your slippage params. Although the fuse will force certain slippage upper limit, you should always be aware, that there will be attempts to sandwich your transaction. You can simulate the slippage on DEX before executing transaction to make sure that the slippage will not leave room for MEV bots to take advantage of you.
Negative share price on deposit
Leveraging may generate a drawdown to a vault because of associated cost of swapping, if you don't charge a deposit fee the user will see negative performance after alpha levers up. To avoid this you should look for opportunities to avoid swapping (try to use native staking or wrapping) charge a deposit fee or accept that building a leveraged position will cause the drawdown to the vault.
Depending on slippage and leverage, a deposit fee could make sense
Deleverage
Deleveraging, unless you can avoid swapping, will generate a cost. Triggers to deleverage should take into account cost of deleveraging versus negative performance with inverted rates. Oftentimes it makes more economical sense to wait and accept negative yield over the deleveraging....
.... however in a high risk scenario it might be better to bite the bullet then be last bag holder
Sometimes its better to use the next deposit to pay down the vault debt rather than lever up. You should not ignore the flexibility coming from the scheduled withdrawals.
Buffer
Leveraged positions are not instantly liquid. You can maintain a buffer of funds that can be used to fulfill smaller withdrawals instantly. The condition is that those assets should be parked in an instantly liquid strategy such as Lending Optimizers operated by IPOR DAO.
Fees
Request fee. If you can, make it dynamic and roughly equal to your cost of unwind. Your alpha can manage that fee if given the proper role to do it via the access manager.
Withdrawal fee (from buffer)- set similar to Request fee, otherwise you'll get people twapping the buffer and socializing the unwind cost
Avoid swaps as much as possible
If moving between positions with like assets and leverage use flash loan to move between positions
Simulate market depth
Understand your own context on the position via simulation on current market depth, rate dynamic
Estimate for gas fees for execution, evaluate them in the context of the likelihood of sustained rates change
Update the share price often enough for accuracy and to prevent share price inflation attacks if the vault is public
Oracles
Depending on how you choose to lever and delever make sure to setup the proper oracles
If the asset is new, small, or limited DEX liquidity but you can always mint it and redeem it 1:1 consider using a hardcoded price oracle for that asset inside the vault
Last updated