Skip to content
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

fix(DrawCalcV3): set gaugeController as immutable #280

Conversation

PierrickGT
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Jun 1, 2022

POOL-2302 Analyze impact of swapping DrawCalculatorV3

DrawCalculatorV3 is dependent of the following contracts:

  • gaugeController
  • drawBuffer
  • prizeConfigHistory

Currently, there are no setter functions to set these contracts. drawBuffer and prizeConfigHistory are immutable, so the only way to update these addresses would be by redeploying the contract.

If we redeploy DrawCalculatorV3, we will need to call the setDrawCalculator function on the PrizeDistributorV2 contract to set the newly deployed DrawCalculator.

Which would be a pretty minimal change and easy fix.

These 3 contracts should not be swapped, except if we notice a bug. So I would recommend to make all variables immutable , since it will be pretty easy to redeploy a DrawCalculator if we need to.

TODO:

  • set gaugeController as an immutable variable

Base automatically changed from pool-2303-analyze-impact-of-swapping-out to pool-2300-add-any-events-to-prizedistributorv2 June 2, 2022 15:23
@PierrickGT PierrickGT merged commit 426e05a into pool-2300-add-any-events-to-prizedistributorv2 Jun 2, 2022
@PierrickGT PierrickGT deleted the pool-2302-analyze-impact-of-swapping branch June 2, 2022 15:24
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.

None yet

2 participants