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

feat: Generalize to many hyperdrive instances (MIlestone 2) #670

Merged
merged 19 commits into from
Nov 22, 2023

Conversation

lucas-manuel
Copy link
Contributor

@lucas-manuel lucas-manuel commented Nov 12, 2023

Current State

  1. Removed all deployer state variables from HyperdriveFactory.
  2. Added isValidHyperdriveDeployer mapping to HyperdriveFactory.
  3. Removed updateImplementation
  4. Consolidated all info into extraData, updated all interfaces
  5. Moved all target deployment logic into hyperdrive deployer
  6. Moved sweepTargets into extraData
    • NOTE: Cannot call updateSweepTargets as of right now, needs further discussion. I can still make an issue for this or we can have the discussion in this PR @jalextowle @jrhea
  7. Added getter functions for hyperdrive deployer instances onboarded by governance.
  8. Updated all tests.

Work Remaining

  1. Add tests for getters
  2. Add test for deployer whitelist
  3. Add failure mode tests for deployment

@lucas-manuel lucas-manuel self-assigned this Nov 12, 2023
Copy link

github-actions bot commented Nov 12, 2023

Hyperdrive Gas Benchmark

Benchmark suite Current: 7af0956 Previous: 516c95a Deviation Status
addLiquidity: min 1622 gas 1622 gas 0% 🟰
addLiquidity: avg 54725 gas 53804 gas 1.7118% 🚨
addLiquidity: max 98648 gas 98352 gas 0.3010% 🚨
checkpoint: min 1216 gas 1216 gas 0% 🟰
checkpoint: avg 48273 gas 48284 gas -0.0228%
checkpoint: max 97592 gas 99770 gas -2.1830%
closeLong: min 1690 gas 1690 gas 0% 🟰
closeLong: avg 24882 gas 24927 gas -0.1805%
closeLong: max 114354 gas 114154 gas 0.1752% 🚨
closeShort: min 1693 gas 1693 gas 0% 🟰
closeShort: avg 27685 gas 27859 gas -0.6246%
closeShort: max 109072 gas 108895 gas 0.1625% 🚨
initialize: min 1605 gas 1605 gas 0% 🟰
initialize: avg 179780 gas 179603 gas 0.0986% 🚨
initialize: max 254322 gas 254125 gas 0.0775% 🚨
openLong: min 736 gas 736 gas 0% 🟰
openLong: avg 56031 gas 55929 gas 0.1824% 🚨
openLong: max 195686 gas 195381 gas 0.1561% 🚨
openShort: min 702 gas 702 gas 0% 🟰
openShort: avg 55548 gas 55423 gas 0.2255% 🚨
openShort: max 194932 gas 194882 gas 0.0257% 🚨
redeemWithdrawalShares: min 1598 gas 1598 gas 0% 🟰
redeemWithdrawalShares: avg 22367 gas 22307 gas 0.2690% 🚨
redeemWithdrawalShares: max 49853 gas 49538 gas 0.6359% 🚨
removeLiquidity: min 1661 gas 1661 gas 0% 🟰
removeLiquidity: avg 77182 gas 79639 gas -3.0852%
removeLiquidity: max 204563 gas 205229 gas -0.3245%

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

@coveralls
Copy link
Collaborator

coveralls commented Nov 12, 2023

Coverage Status

coverage: 95.751% (-0.2%) from 95.984%
when pulling 7af0956 on lm/feat/milestone-2-updated
into a0eefb1 on main.

@lucas-manuel lucas-manuel changed the title feat: Generalize to many hyperdrive instances (MIlestone 2) [WIP] feat: Generalize to many hyperdrive instances (MIlestone 2) Nov 13, 2023
@lucas-manuel lucas-manuel marked this pull request as ready for review November 13, 2023 16:19
Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

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

This is looking good!

Co-authored-by: Alex Towle <[email protected]>
Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

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

Great work on this! This LGTM once the last two nits are addressed

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.

great work!

@jrhea jrhea enabled auto-merge (squash) November 22, 2023 04:29
@jrhea jrhea disabled auto-merge November 22, 2023 04:39
@jrhea jrhea enabled auto-merge (squash) November 22, 2023 04:45
@jrhea jrhea merged commit adb4fa4 into main Nov 22, 2023
@jrhea jrhea deleted the lm/feat/milestone-2-updated branch November 22, 2023 07:04
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.

4 participants