-
Notifications
You must be signed in to change notification settings - Fork 334
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
docs: update docs for slashing #709
base: add-docs-2
Are you sure you want to change the base?
Conversation
* @return slashableBips the slashable bips of the given strategy owned by | ||
* the given OperatorSet for the given operator and timestamp | ||
*/ | ||
function getSlashableBips( |
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.
imo we should just return parts per 1e18 that the AVS is allowed to slash. rounding with bips just too sketch
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.
docs/releases/slashing-release/interfaces/core/slashing-parameter-configuration.md
Outdated
Show resolved
Hide resolved
docs/releases/slashing-release/interfaces/core/slashing-parameter-configuration.md
Outdated
Show resolved
Hide resolved
Reverts if | ||
|
||
1. The `operatorSignature` is invalid or `msg.sender` is not the `operator` | ||
2. The sum of all magnitude allocations for a IStrategy is greater than the free magnitude that is available to allocate. |
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 make sure all the revert conditions are here? should add
any of the operatorSets do not exist in the AVSD
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 registered whether the operator is registered with the operator set | ||
* @param lastDeregisteredTimestamp the timestamp at which the operator was last deregistered | ||
*/ | ||
struct OperatorSetRegistrationStatus { |
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.
move this to operator-sets.md imo
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.
|
||
### modifyAllocations | ||
|
||
Operators call this to set the proportions of slashable stake allocated to a list of operatorSets for a set of strategies. Depending on what the new magnitude/proportion and current magnitude value is configured to, this will either create a pending allocation or deallocation. Allocations by default have a delay of 21 days but can be one-time configured by an operator. Deallocation delays all have a built-in delay of 17.5 days until they can be "completed". There is a "completing" second step to deallocations that must take place to account for the fact that deallocations are still susceptible to slashing by the operatorSet up until the completeableTimestamp for the deallocation has passed. Pending allocations on the other hand are not slashable (referring to the added increase in magnitude). |
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.
no need to mention completion imo. just say that after allocation/deallocation delays have passed they automatically take effect.
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.
docs/releases/slashing-release/interfaces/core/slashing-parameter-configuration.md
Outdated
Show resolved
Hide resolved
1. if a `MagnitudeAllocation` results in a value greater than the current magnitude, `MagnitudeAllocated` is emitted for the given (operator, IStrategy, operatorSet) | ||
2. if a `MagnitudeAllocation` results in a value less than the current magnitude, | ||
`MagnitudeDeallocated` is emitted for the given (operator, IStrategy, operatorSet) | ||
3. |
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 looks messed up
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.
25d410d
Take 2?
|
||
### modifyAllocations | ||
|
||
Operators call this to set the proportions of slashable stake allocated to a list of operatorSets for a set of strategies. Depending on what the new magnitude/proportion and current magnitude value is configured to, this will either create a pending allocation or deallocation. Allocations by default have a delay of 21 days but can be one-time configured by an operator. Deallocation delays all have a built-in delay of 17.5 days until they can be "completed". There is a "completing" second step to deallocations that must take place to account for the fact that deallocations are still susceptible to slashing by the operatorSet up until the completeableTimestamp for the deallocation has passed. Pending allocations on the other hand are not slashable (referring to the added increase in magnitude). |
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.
there should be no default allocation delay. configutation is blocking allcoation modification.
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.
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 are going with configurable delays but I specified here that a initial delay is required to call modifyAllocations
Co-authored-by: Gautham Anant <[email protected]>
Co-authored-by: Gautham Anant <[email protected]>
Co-authored-by: Gautham Anant <[email protected]>
also added additional reverts to modifyAllocations
|
2 similar comments
|
|
|
#### **finalizeMigration** | ||
|
||
Only callable by ServiceManager contract owner, this will mark the AVS ServiceManager contract as fully migrated and prevents any future calls to `migrateToOperatorSets`. | ||
|
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.
insert
Reverts If:
|
* @param isSet whether the allocation delay is set. Can only be configured one time for each operator | ||
* @param allocationDelay the delay in seconds for the operator's allocations | ||
*/ | ||
struct AllocationDelayDetails { |
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.
add todo to add this to DM docs
@@ -63,12 +53,16 @@ interface IAVSDirectory { | |||
/// EXTERNAL - STATE MODIFYING | |||
|
|||
/** | |||
* @notice Modifies the proportions of slashable stake allocated to a list of operatorSets for a set of strategies | |||
* @notice Modifies the propotions of slashable stake allocated to a list of operatorSets for a set of strategies | |||
* This will revert if the operator has never set their allocationDelay before. |
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.
@dev this
* @dev Updates freeMagnitude for the updated strategies | ||
* @dev Must be called by the operator or with a valid operator signature | ||
* @dev For each allocation, allocation.operatorSets MUST be ordered in ascending order according to the | ||
* encoding of the operatorSet. This is to prevent duplicate operatorSets being passed in. The easiest way to ensure |
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.
ew, this is kind of gross to handle offchain, @shrimalmadhur what would you prefer
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 also have to think about LRT or every other client using this directly. I think this should be baked in solidity if possible - otherwise every other thing built on top has to think about it.
@@ -150,11 +146,11 @@ interface IAVSDirectory { | |||
|
|||
### modifyAllocations | |||
|
|||
Operators call this to set the proportions of slashable stake allocated to a list of operatorSets for a set of strategies. Depending on what the new magnitude/proportion and current magnitude value is configured to, this will either create a pending allocation or deallocation. Allocations by default have a delay of 21 days but can be one-time configured by an operator. Deallocation delays all have a built-in delay of 17.5 days until they can be "completed". There is a "completing" second step to deallocations that must take place to account for the fact that deallocations are still susceptible to slashing by the operatorSet up until the completeableTimestamp for the deallocation has passed. Pending allocations on the other hand are not slashable (referring to the added increase in magnitude). | |||
Operators call this to set the proportions of slashable stake allocated to a list of operatorSets for a set of strategies. Depending on what the new magnitude/proportion and current magnitude value is configured to, this will either create a pending allocation or deallocation. Allocation delays can be configured by operators but setting a new value itself has a delay of 21 days. Deallocation delays all have a built-in delay of 17.5 days until they take effect. Deallocations are still susceptible to slashing by the operatorSet up until they take effect. Pending allocations on the other hand are not slashable (referring to the added increase in magnitude). |
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.
do we really want a 21 day delay on the first setting?
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 fine for now, few protocol questions
Tentative plan is to include OperatorSets and Slashing releases as one combined release. This PR is for updating docs to latest interfaces and combining files
INCOMPLETE:
middleware ServiceManagerBase with migration functions