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 the mainnet deployment scripts #1072

Merged
merged 7 commits into from
Jun 27, 2024
Merged

Conversation

jalextowle
Copy link
Contributor

Resolved Issues

Addresses: #976, https://github.com/spearbit-audits/delv-week-review/issues/2

Description

This PR adds the mainnet deployment scripts for the ElementDAO deployment and addresses the last remaining issues from Saw Mon.

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?

tasks/deploy/hyperdrive.ts Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jun 27, 2024

Hyperdrive Gas Benchmark

Benchmark suite Current: d5eedc7 Previous: 7bc914f Deviation Status
addLiquidity: min 33937 gas 33937 gas 0% 🟰
addLiquidity: avg 155907 gas 155757 gas 0.0963% 🚨
addLiquidity: max 429262 gas 429262 gas 0% 🟰
checkpoint: min 40316 gas 40316 gas 0% 🟰
checkpoint: avg 144712 gas 144703 gas 0.0062% 🚨
checkpoint: max 255940 gas 255940 gas 0% 🟰
closeLong: min 31361 gas 31361 gas 0% 🟰
closeLong: avg 135739 gas 135769 gas -0.0221%
closeLong: max 2539376 gas 2539376 gas 0% 🟰
closeShort: min 31327 gas 31327 gas 0% 🟰
closeShort: avg 131099 gas 131221 gas -0.0930%
closeShort: max 354418 gas 271348 gas 30.6138% 🚨
initialize: min 31349 gas 31349 gas 0% 🟰
initialize: avg 333469 gas 333439 gas 0.0090% 🚨
initialize: max 399746 gas 399978 gas -0.0580%
openLong: min 33370 gas 33370 gas 0% 🟰
openLong: avg 172927 gas 173218 gas -0.1680%
openLong: max 333831 gas 334062 gas -0.0691%
openShort: min 33936 gas 33936 gas 0% 🟰
openShort: avg 168431 gas 168476 gas -0.0267%
openShort: max 415036 gas 415110 gas -0.0178%
redeemWithdrawalShares: min 31251 gas 31251 gas 0% 🟰
redeemWithdrawalShares: avg 75019 gas 75114 gas -0.1265%
redeemWithdrawalShares: max 305459 gas 305698 gas -0.0782%
removeLiquidity: min 31301 gas 31301 gas 0% 🟰
removeLiquidity: avg 215338 gas 215048 gas 0.1349% 🚨
removeLiquidity: max 403858 gas 403641 gas 0.0538% 🚨

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

@jalextowle jalextowle added this pull request to the merge queue Jun 27, 2024
@jalextowle jalextowle removed this pull request from the merge queue due to a manual request Jun 27, 2024
@jalextowle jalextowle merged commit e84bb23 into main Jun 27, 2024
31 checks passed
@jalextowle jalextowle deleted the jalextowle/deploy/mainnet branch June 27, 2024 03:55
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