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

Implemented an Admin Controller #1136

Merged
merged 12 commits into from
Aug 21, 2024
Merged

Conversation

jalextowle
Copy link
Contributor

Description

Simplified the admin configuration of Hyperdrive instances. This feature wires up Hyperdrive to look up the admin configuration from an "admin controller." This admin controller must provide the following data: hyperdriveGovernance, feeCollector, sweepCollector, checkpointRewarder, and defaultPausers. These are all of the fields that can currently be updated by governance on the Hyperdrive factory, and the intention is that the factory will be the admin controller for deployed pools.

This feature is fully backward-compatible. setPauser and setGovernance were updated to be stub functions since the Hyperdrive factory calls these functions during the deployAndInitialize routine. IHyperdrive.PoolConfig wasn't updated to include the adminController to avoid changing the interface, and all of the interface changes live inside the deployers and the contract constructors. Handling the changes at this level avoids any deployer coordinator interface changes since the deployer coordinators know which factory they are connected to.

@coveralls
Copy link
Collaborator

coveralls commented Aug 20, 2024

Pull Request Test Coverage Report for Build 10495395776

Details

  • 20 of 21 (95.24%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 90.659%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/src/external/HyperdriveTarget0.sol 1 2 50.0%
Totals Coverage Status
Change from base Build 10484681759: -0.04%
Covered Lines: 2271
Relevant Lines: 2505

💛 - Coveralls

Copy link
Contributor

@jrhea jrhea left a comment

Choose a reason for hiding this comment

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

if we decide to go this route, it would be good to thoroughly document in the operations playbook how this is used and what existing pools will have to still be manually updated

Copy link

github-actions bot commented Aug 21, 2024

Hyperdrive Gas Benchmark

Benchmark suite Current: 0416cfa Previous: 7e32c9f Deviation Status
addLiquidity: min 33812 gas 33893 gas -0.2390%
addLiquidity: avg 192891 gas 197249 gas -2.2094%
addLiquidity: max 474677 gas 474700 gas -0.0048%
checkpoint: min 40338 gas 40316 gas 0.0546% 🚨
checkpoint: avg 147741 gas 144521 gas 2.2280% 🚨
checkpoint: max 259386 gas 256108 gas 1.2799% 🚨
closeLong: min 31390 gas 31384 gas 0.0191% 🚨
closeLong: avg 129953 gas 135708 gas -4.2407%
closeLong: max 2539405 gas 2539399 gas 0.0002% 🚨
closeShort: min 31378 gas 31327 gas 0.1628% 🚨
closeShort: avg 124804 gas 131209 gas -4.8815%
closeShort: max 277300 gas 400887 gas -30.8284%
initialize: min 31356 gas 31305 gas 0.1629% 🚨
initialize: avg 355850 gas 352465 gas 0.9604% 🚨
initialize: max 424766 gas 418737 gas 1.4398% 🚨
openLong: min 33370 gas 33370 gas 0% 🟰
openLong: avg 173975 gas 174215 gas -0.1378%
openLong: max 339743 gas 333737 gas 1.7996% 🚨
openShort: min 33936 gas 33936 gas 0% 🟰
openShort: avg 172388 gas 174134 gas -1.0027%
openShort: max 394598 gas 415133 gas -4.9466%
redeemWithdrawalShares: min 31240 gas 31211 gas 0.0929% 🚨
redeemWithdrawalShares: avg 75114 gas 75105 gas 0.0120% 🚨
redeemWithdrawalShares: max 311190 gas 305184 gas 1.9680% 🚨
removeLiquidity: min 31246 gas 31217 gas 0.0929% 🚨
removeLiquidity: avg 215366 gas 215255 gas 0.0516% 🚨
removeLiquidity: max 403659 gas 403538 gas 0.0300% 🚨

This comment was automatically generated by workflow using github-action-benchmark.

@jalextowle jalextowle added this pull request to the merge queue Aug 21, 2024
Merged via the queue into main with commit a76e266 Aug 21, 2024
32 checks passed
@jalextowle jalextowle deleted the jalextowle/feature/admin-controller branch August 21, 2024 19:47
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