Closed dpaiton closed 5 months ago
Benchmark suite | Current: 00ea923649759ca0e7658113002788968649c028 | Previous: 78a1b5959270a1ea5d10fbee8be2019bde04e919 | Deviation | Status |
---|---|---|---|---|
addLiquidity: min |
33893 gas |
33893 gas |
0% |
š° |
addLiquidity: avg |
144957 gas |
144492 gas |
0.3218% |
šØ |
addLiquidity: max |
428319 gas |
428319 gas |
0% |
š° |
checkpoint: min |
40220 gas |
40220 gas |
0% |
š° |
checkpoint: avg |
104106 gas |
104036 gas |
0.0673% |
šØ |
checkpoint: max |
212154 gas |
212154 gas |
0% |
š° |
closeLong: min |
31517 gas |
31517 gas |
0% |
š° |
closeLong: avg |
138417 gas |
138644 gas |
-0.1637% |
ā |
closeLong: max |
2640435 gas |
2640435 gas |
0% |
š° |
closeShort: min |
31394 gas |
31394 gas |
0% |
š° |
closeShort: avg |
132961 gas |
132896 gas |
0.0489% |
šØ |
closeShort: max |
227565 gas |
227553 gas |
0.0053% |
šØ |
initialize: min |
31305 gas |
31305 gas |
0% |
š° |
initialize: avg |
253631 gas |
253636 gas |
-0.0020% |
ā |
initialize: max |
322760 gas |
322760 gas |
0% |
š° |
openLong: min |
33437 gas |
33437 gas |
0% |
š° |
openLong: avg |
167200 gas |
166991 gas |
0.1252% |
šØ |
openLong: max |
253057 gas |
253057 gas |
0% |
š° |
openShort: min |
33959 gas |
33959 gas |
0% |
š° |
openShort: avg |
170098 gas |
170515 gas |
-0.2446% |
ā |
openShort: max |
385545 gas |
385545 gas |
0% |
š° |
redeemWithdrawalShares: min |
31227 gas |
31227 gas |
0% |
š° |
redeemWithdrawalShares: avg |
61912 gas |
62052 gas |
-0.2256% |
ā |
redeemWithdrawalShares: max |
167572 gas |
167572 gas |
0% |
š° |
removeLiquidity: min |
31191 gas |
31191 gas |
0% |
š° |
removeLiquidity: avg |
223472 gas |
223882 gas |
-0.1831% |
ā |
removeLiquidity: max |
398887 gas |
398863 gas |
0.0060% |
šØ |
This comment was automatically generated by workflow using github-action-benchmark.
Resolved Issues
working towards resolving https://github.com/delvtech/hyperdrive-rs/issues/29
Description
calculate_open_short
was called we would first computestate.calculate_spot_price
and then pass it in as an argument, I removed the argument and put the calculation inside the function. If one wants to calculate open short for a different spot price, they should adjust the state and then callstate.calculate_open_short(bond_amount)
. This is the same pattern we use for e.g.calc_spot_price_after_*
.maybe
" in front ofOption
parameters and changingshort_amount
tobond_amount
.wallet
andhyperdrive
attributes to the agent, which will be helpful for the calc_open_short test I'm writing in a follow-up PR.fuzz_*
if they are doing fuzzing (this makes it more consistent with the rest of the codebase).open_vault_share_price
to increase fuzz coverage.short_principal_derivative
code out ofmax.rs
and intoopen.rs
, which will be helpful for my later targeted short PR.short_principal
andshort_principal_derivative
short_principal
[_derivative
] tocalculate_short_principal
[_derivative
] to be consistent with the rest of the codebase.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 and/or Rust, the corresponding checklist can be removed.[[Reviewer Name]]
Rust