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

morpho blue sepolia config + generic library resolution/deployment #1113

Merged
merged 10 commits into from
Jul 24, 2024

Conversation

mcclurejt
Copy link
Contributor

Resolved Issues

  • Uses MorphoBlue coordinator + instance to deploy integration on Sepolia
  • Generic Library resolution in deployment functions (rather than specific configuration for each library)

Description

Review Checklists

Please check each item before approving the pull request. While going
through the checklist, it is recommended to leave comments on items that are
referenced in the checklist to make sure that they are reviewed. If there are
multiple reviewers, copy the checklists into sections titled ## [Reviewer Name].
If the PR doesn't touch Solidity, the corresponding checklist can
be removed.

[[Reviewer Name]]

  • Tokens
    • Do all approve calls use forceApprove?
    • Do all transfer calls use safeTransfer?
    • Do all transferFrom calls use msg.sender as the from address?
      • If not, is the function access restricted to prevent unauthorized
        token spend?
  • Low-level calls (call, delegatecall, staticcall, transfer, send)
    • Is the returned success boolean checked to handle failed calls?
    • If using delegatecall, are there strict access controls on the
      addresses that can be called? It shouldn't be possible to delegatecall
      arbitrary addresses, so the list of possible targets should either be
      immutable or tightly controlled by an admin.
  • Reentrancy
    • Are functions that make external calls or transfer ether marked as nonReentrant?
      • If not, is there documentation that explains why reentrancy is
        not a concern or how it's mitigated?
  • Gas Optimizations
    • Is the logic as simple as possible?
    • Are the storage values that are used repeatedly cached in stack or
      memory variables?
    • If loops are used, are there guards in place to avoid out-of-gas
      issues?
  • Visibility
    • Are all payable functions restricted to avoid stuck ether?
  • Math
    • Is all of the arithmetic checked or guarded by if-statements that will
      catch underflows?
    • If Safe functions are altered, are potential underflows and
      overflows caught so that a failure flag can be thrown?
    • Are all of the rounding directions clearly documented?
  • Testing
    • Are there new or updated unit or integration tests?
    • Do the tests cover the happy paths?
    • Do the tests cover the unhappy paths?
    • Are there an adequate number of fuzz tests to ensure that we are
      covering the full input space?

@mcclurejt mcclurejt marked this pull request as ready for review July 23, 2024 17:03
@coveralls
Copy link
Collaborator

coveralls commented Jul 23, 2024

Pull Request Test Coverage Report for Build 10079918579

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 91.592%

Files with Coverage Reduction New Missed Lines %
contracts/src/external/Hyperdrive.sol 1 97.96%
Totals Coverage Status
Change from base Build 9991233897: -0.01%
Covered Lines: 2146
Relevant Lines: 2343

💛 - Coveralls

Copy link

github-actions bot commented Jul 23, 2024

Hyperdrive Gas Benchmark

Benchmark suite Current: 47d3e85 Previous: 2514eec Deviation Status
addLiquidity: min 33893 gas 33893 gas 0% 🟰
addLiquidity: avg 197444 gas 197021 gas 0.2147% 🚨
addLiquidity: max 474728 gas 474728 gas 0% 🟰
checkpoint: min 40316 gas 40316 gas 0% 🟰
checkpoint: avg 144490 gas 144541 gas -0.0353%
checkpoint: max 256108 gas 256108 gas 0% 🟰
closeLong: min 31384 gas 31384 gas 0% 🟰
closeLong: avg 135782 gas 135870 gas -0.0648%
closeLong: max 2539399 gas 2539399 gas 0% 🟰
closeShort: min 31327 gas 31327 gas 0% 🟰
closeShort: avg 131163 gas 131250 gas -0.0663%
closeShort: max 271250 gas 271250 gas 0% 🟰
initialize: min 31305 gas 31305 gas 0% 🟰
initialize: avg 352446 gas 352411 gas 0.0099% 🚨
initialize: max 418715 gas 418715 gas 0% 🟰
openLong: min 33370 gas 33370 gas 0% 🟰
openLong: avg 174030 gas 174194 gas -0.0941%
openLong: max 333715 gas 333715 gas 0% 🟰
openShort: min 33936 gas 33936 gas 0% 🟰
openShort: avg 174196 gas 174122 gas 0.0425% 🚨
openShort: max 415009 gas 414993 gas 0.0039% 🚨
redeemWithdrawalShares: min 31211 gas 31211 gas 0% 🟰
redeemWithdrawalShares: avg 74973 gas 75583 gas -0.8071%
redeemWithdrawalShares: max 305162 gas 305162 gas 0% 🟰
removeLiquidity: min 31217 gas 31217 gas 0% 🟰
removeLiquidity: avg 214763 gas 214398 gas 0.1702% 🚨
removeLiquidity: max 403566 gas 403566 gas 0% 🟰

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

hardhat.config.ts Outdated Show resolved Hide resolved
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.

Aside from the other comments that I left, we'll want to bump the version in contracts/src/libraries/Constants.sol so that we can ship a new release once this lands. Any chance you could work on the mainnet config so that I can deploy it after I review and get up in the morning?

@jalextowle jalextowle added this pull request to the merge queue Jul 24, 2024
Merged via the queue into main with commit 8b00b7b Jul 24, 2024
31 checks passed
@jalextowle jalextowle deleted the mcclurejt/feature/morpho-sepolia branch July 24, 2024 17:12
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