refactor IPCVDepositAggregator#274
Merged
xklob merged 5 commits intofeat/pcv-deposit-aggregatorfrom Oct 29, 2021
Merged
Conversation
ElliotFriedman
approved these changes
Oct 28, 2021
Contributor
ElliotFriedman
left a comment
There was a problem hiding this comment.
I like this design pattern a lot better than I like the old architecture.
LGTM!
Joeysantoro
reviewed
Oct 28, 2021
Joeysantoro
reviewed
Oct 28, 2021
Joeysantoro
reviewed
Oct 29, 2021
Contributor
Author
|
@Joeysantoro moved depositSingle to public since deposit is. think we're good to go here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes rebalancing from the PCV Deposit Aggregator.
Rationale: pcv deposits should be as firewalled from each other as possible, so that one compromised or malicious pcv deposit can't rug all tokens in the aggregator.
By removing the rebalance feature, we effectively only allow rebalance-on-push and rebalance-on-withdraw; deposits and withdrawals will still deposit and withdraw, respectively, from each pcv deposit to average the underlying tokens towards their weights, but there will be no atomic interaction that allows pcv to flow from one pcv deposit into another.
Withdraw is still permissioned, of course; a hacker couldn't withdraw from one pcv deposit and then call deposit() to deposit into another.
depositSingle(address pcvDeposit)has replacedrebalanceSingle(address pcvDeposit), and permission for this has been set to GuardianOrAdmin, though I'm up for changing this if warranted.