Skip to content

Conversation

0xClandestine
Copy link
Member

Motivation:

Explain here the context, and why you're making that change. What is the problem you're trying to solve.

Modifications:

Describe the modifications you've done.

Result:

After your change, what will change.

Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have this target a release branch too

_isOperatorRedistributable(operator, registeredSets) || _isOperatorRedistributable(operator, allocatedSets);
}

/// @inheritdoc IAllocationManager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much space do we have left?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-180 bytes rip

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will sort this out as well

uint256 wadToSlash
) public view returns (uint256 shares) {
// Fetch operator's allocation details.
Allocation memory allocation = getAllocation(operator, operatorSet, strategy);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make an internal function that does this logic and is called by this function as well as slashOperator

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, will sort that out once my fn is sound.

uint64 maxMagnitude = getMaxMagnitude(operator, strategy);
uint64 slashedMagnitude = uint64(uint256(allocation.currentMagnitude).mulWadRoundUp(wadToSlash));
uint64 newMaxMagnitude = maxMagnitude - slashedMagnitude;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to also include shares that are being deallocated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants