Skip to content

Feat/pcv deposit aggregator#258

Merged
xklob merged 73 commits intofeat/v2/basefrom
feat/pcv-deposit-aggregator
Nov 9, 2021
Merged

Feat/pcv deposit aggregator#258
xklob merged 73 commits intofeat/v2/basefrom
feat/pcv-deposit-aggregator

Conversation

@xklob
Copy link
Copy Markdown
Contributor

@xklob xklob commented Oct 19, 2021

PCV Deposit Aggregator.

Each PCV Deposit Aggregator sits below its parent RewardsAssetManager, and is in charge of allocating to and from individual PCV Deposits for its particular currency. This could be ETH or tokens.

The interface (IPCVDepositAggregator) can be found here

Each PCV Deposit controlled by each aggregator will have a relative "weight", similar to how TribalChief works. When funds are needed to be withdrawn from this particular-currency asset, the RewardsAggregator that sits atop each aggregator will call into the aggregator with withdraw(). For the inverse, deposit()

The PCV Deposit Aggregator will need to intelligently withdraw, deposit, and occasionally rebalance funds so that the target weights remain generally correct (though this cannot be a strict requirement due to fluctuations in underlying value and yield)

Todo:

  • write base contract
  • fix draft comment issues
  • write unit tests
  • gas golf to heck and back
  • natspec
  • add/fix role
  • sum of optimal balances vs underlying sum (waiting on Joey response)
  • add guardian-only setDepositWeightZero function
  • final review

@xklob xklob force-pushed the feat/pcv-deposit-aggregator branch from fa0f2dd to 394d98e Compare October 19, 2021 20:45
@xklob xklob changed the base branch from develop to feat/v2/base October 19, 2021 20:45
@xklob xklob changed the base branch from feat/v2/base to develop October 22, 2021 23:23
@xklob xklob changed the base branch from develop to feat/v2/base October 22, 2021 23:23
@xklob xklob changed the base branch from feat/v2/base to develop November 1, 2021 21:04
@xklob xklob changed the base branch from develop to feat/v2/base November 1, 2021 21:04
@Joeysantoro Joeysantoro changed the base branch from feat/v2/base to develop November 4, 2021 18:49
@Joeysantoro Joeysantoro changed the base branch from develop to feat/v2/base November 4, 2021 18:49
@xklob
Copy link
Copy Markdown
Contributor Author

xklob commented Nov 7, 2021

todo: add tests for pcvDepositSingle

@xklob xklob merged commit 5306557 into feat/v2/base Nov 9, 2021
@xklob xklob deleted the feat/pcv-deposit-aggregator branch November 9, 2021 05:42
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.

3 participants