-
Notifications
You must be signed in to change notification settings - Fork 53
Add AaveFLIStrategyExtension #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Diff between existing FlexibleLeverageStrategyExtension
and AaveFLIStrategyExtension
: https://gist.github.com/Alpha-Guy/1f9463f4c729e2467b98086c2b1eb001
I see that the diff is mainly due to changes in the calculation of position units and their decimal places. Would be great if you can explain the changes in the PR description or within the contract as comments.
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.
Diff is here
I think we should adjust the base units in the _calculateChunkRebalanceNotional
function, so we dont have to add .div(10 ** (18 - strategy.xxx)
to every calculate units function
|
||
/** | ||
* Derive the min repay units from collateral units for delever. Units are calculated as target collateral rebalance units multiplied by slippage tolerance | ||
* and pair price (collateral oracle price / borrow oracle price). Output is measured to 18 decimals. |
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.
This is confusing if output is 18 decimals, while units in other contracts all account for decimals
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.
Latest diff
Closing in favor of #72 |
No description provided.