-
Notifications
You must be signed in to change notification settings - Fork 4
add adjust linear amplification logic #86
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
I am not sure we can define a sanity range for a, I assume it being a positive number is the least we should check, but is there an upper limit? |
validators/pool.ak
Outdated
) | ||
|
||
// Make sure the linear amplification is in the sane range | ||
expect linear_amplification > 0 && linear_amplification <= 10000 |
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.
the upper bound likely needs to be much higher, and i'm not sure we should even have an upper bound 🤔
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 agree, will remove that upper bound
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.
Let's just make sure to ask the auditors if they feel we should set an upper bound
@@ -378,6 +378,7 @@ fn scoop(options: ScoopTestOptions) { | |||
options.edit_initial_sum_invariant, | |||
2000000000000000000000, | |||
), | |||
linear_amplification_manager: None, |
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.
we should add one test exercising this branch, ideally
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.
Using this as test bed for a property based test in the next PR, so will be covered by that.
Closing this to use #87 instead. |
This pull request introduces a new feature for managing the linear amplification factor in stable pools. The changes include adding a new field to the
StablePoolDatum
type.Feature Enhancements for Stable Pools:
linear_amplification_manager
field: TheStablePoolDatum
type now includes an optionallinear_amplification_manager
field, which represents a multisig condition for updating the linear amplification factor.ManageRedeemer
type now includes anAdjustLinearAmplification
variant to enable updates to the linear amplification factor.Updates to Asset Reserves and Validation:
pool_input_to_asset_reserves
: Introduced a function to compute asset reserves while accounting for protocol fees and ADA-specific adjustments.