delvtech / hyperdrive

An automated market maker for fixed and variable yield with on-demand terms.
Apache License 2.0
28 stars 3 forks source link

Simplified `_applyCheckpoint` #1059

Closed jalextowle closed 3 months ago

jalextowle commented 3 months ago

Resolved Issues

Fixes: https://github.com/spearbit-audits/delv-week-review/issues/11

Description

This PR simplifies _applyCheckpoint.

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]]

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9555235961

Details


Totals Coverage Status
Change from base Build 9554961305: -0.008%
Covered Lines: 1963
Relevant Lines: 2131

πŸ’› - Coveralls
github-actions[bot] commented 3 months ago

Hyperdrive Gas Benchmark

Benchmark suite Current: 9074688c2e1e68ca93cbae49bb0a7a11983e7bbf Previous: e5525e96fea5bc61e0eec7fe694049aa6722aa1c Deviation Status
addLiquidity: min 33937 gas 33937 gas 0% 🟰
addLiquidity: avg 156439 gas 155877 gas 0.3605% 🚨
addLiquidity: max 429527 gas 429437 gas 0.0210% 🚨
checkpoint: min 40316 gas 40316 gas 0% 🟰
checkpoint: avg 144724 gas 144636 gas 0.0608% 🚨
checkpoint: max 255931 gas 255830 gas 0.0395% 🚨
closeLong: min 31361 gas 31361 gas 0% 🟰
closeLong: avg 135914 gas 136439 gas -0.3848% βœ…
closeLong: max 2539376 gas 2621435 gas -3.1303% βœ…
closeShort: min 31327 gas 31327 gas 0% 🟰
closeShort: avg 131189 gas 132305 gas -0.8435% βœ…
closeShort: max 400823 gas 272530 gas 47.0748% 🚨
initialize: min 31349 gas 31349 gas 0% 🟰
initialize: avg 333397 gas 333352 gas 0.0135% 🚨
initialize: max 400023 gas 399922 gas 0.0253% 🚨
openLong: min 33370 gas 33370 gas 0% 🟰
openLong: avg 173171 gas 174248 gas -0.6181% βœ…
openLong: max 334107 gas 335241 gas -0.3383% βœ…
openShort: min 33936 gas 33936 gas 0% 🟰
openShort: avg 168493 gas 168925 gas -0.2557% βœ…
openShort: max 415527 gas 415870 gas -0.0825% βœ…
redeemWithdrawalShares: min 31251 gas 31251 gas 0% 🟰
redeemWithdrawalShares: avg 74809 gas 75830 gas -1.3464% βœ…
redeemWithdrawalShares: max 305734 gas 305633 gas 0.0330% 🚨
removeLiquidity: min 31301 gas 31301 gas 0% 🟰
removeLiquidity: avg 215481 gas 214933 gas 0.2550% 🚨
removeLiquidity: max 404194 gas 404194 gas 0% 🟰

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

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9556659487

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 9554961305: 0.07%
Covered Lines: 1971
Relevant Lines: 2138

πŸ’› - Coveralls