-
Notifications
You must be signed in to change notification settings - Fork 1
Perp Leverage Strategy STIP #15
base: main
Are you sure you want to change the base?
Conversation
STIPS/STIP-007.md
Outdated
| ALM/CLM Strategy Extension Feature | Perp Strategy Extension Feature | | ||
|----------------------------------- |-------------------------------- | | ||
|Methodology - Flexible leverage is a superset of most of the leverage token methodologies. Supports the fixed ratio (FTX), and Binance methodologies|Methodology - Can use the same methodology as FLI or another by toggling parameters on the smart contract| | ||
|Rebalance execution - Use TWAP and oracle to limit slippage|Rebalance execution - Similarly, we need TWAP and oracle to limit slippage on rebalances. Need to keep track of what the virtual addresses and spot token addresses are.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oracle could be tricky since definitionally we would expect the spot price of the Perp to differ from the spot price of the underlying
STIPS/STIP-007.md
Outdated
- Allow keepers to rebalance the perp leverage token via the native exchange | ||
- No need for an external DEX | ||
- No need for a viewer contract | ||
- Use Chainlink oracles to price slippage and determine trade size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is biggest open question for me since we expect there to be some delta between spot and perp. How big can we expect that delta to get?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we can parameterize it still. On mainnet we set it to be 2%. Hopefully perps do their job and closely mirror index price
STIPS/STIP-007.md
Outdated
A keeper wants to rebalance the Perp token which last rebalanced a day ago so calls shouldRebalance on the strategy contract directly | ||
- The keeper calls rebalance on the PerpStrategyExtension | ||
- The exchange's max trade size is grabbed from storage | ||
- The current leverage ratio is grabbed from the Perp Module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Historically haven't had the module return a leverage ratio, this assumes we have access to an oracle at the protocol level which I think I'd prefer not to make a dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't a perp helper return this? Mainly meant the leverage ratio (or account leverage or collateral ratio) would be returned from Perp V2 vs us using oracles to calculate anything
### Comparison between the ALM/CLM Leverage Token Extensions and Perpetual Token Extension | ||
In general, external perpetual protocols simplify the lever and delever flows for rebalances, and many of the previous extension logic can be reused in the perpetuals extension. | ||
|
||
| ALM/CLM Strategy Extension Feature | Perp Strategy Extension Feature | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we track what state we usually pull from Compound and AAVE? Would be good to know what we'll need to pull from the PerpModule
No description provided.