-
Notifications
You must be signed in to change notification settings - Fork 99
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
refactor IPCVDepositAggregator #274
refactor IPCVDepositAggregator #274
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.
I like this design pattern a lot better than I like the old architecture.
LGTM!
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.
Approved with nits
@Joeysantoro moved depositSingle to public since deposit is. think we're good to go here. |
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.