-
Notifications
You must be signed in to change notification settings - Fork 39
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
Gyro 2-CLP and E-CLP dynamic and immutable info #1222
base: main
Are you sure you want to change the base?
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.
Looks good - just one substantive question about an apparent unrelated change in the swap path
* @param sqrtAlpha Square root of alpha (the lowest price in the price interval of the 2CLP price curve) | ||
* @param sqrtBeta Square root of beta (the highest price in the price interval of the 2CLP price curve) |
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.
* @param sqrtAlpha Square root of alpha (the lowest price in the price interval of the 2CLP price curve) | |
* @param sqrtBeta Square root of beta (the highest price in the price interval of the 2CLP price curve) | |
* @param sqrtAlpha Square root of alpha (the lowest price in the price interval of the 2-CLP price curve) | |
* @param sqrtBeta Square root of beta (the highest price in the price interval of the 2-CLP price curve) |
Just for consistency
* @param isPoolPaused If true, the pool is paused, and all non-recovery-mode state-changing operations will revert | ||
* @param isPoolInRecoveryMode If true, Recovery Mode withdrawals are enabled, and live balances may be inaccurate | ||
*/ | ||
struct GyroECLPPoolDynamicData { |
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 the same as the 2-CLP; technically this structure and corresponding function could be shared (i.e., both pool interfaces inherit an additional IGyroPoolDynamicData interface). Not sure if it's worth it.
@@ -115,8 +126,7 @@ contract Gyro2CLPPool is IGyro2CLPPool, BalancerPoolToken { | |||
(uint256 virtualParamIn, uint256 virtualParamOut) = _getVirtualOffsets( | |||
balanceTokenInScaled18, | |||
balanceTokenOutScaled18, | |||
tokenInIsToken0, | |||
request.kind | |||
tokenInIsToken0 |
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.
What is this argument change in _getVirtualOffsets
? Is something not updated, or did another change slip in?
Description
Gyro pools (2-CLP and E-CLP) should export dynamic and immutable data in the same way that Stable and Weighted pools do, and also inherit PoolInfo contract so that basic functions are available to compute the pool math off-chain.
Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution
Closes #1214