Skip to content

Fixed some edge cases that caused problems with calculateDistributeExcessIdle#711

Merged
jalextowle merged 3 commits intomainfrom
jalextowle/fix/rounding-errors
Dec 19, 2023
Merged

Fixed some edge cases that caused problems with calculateDistributeExcessIdle#711
jalextowle merged 3 commits intomainfrom
jalextowle/fix/rounding-errors

Conversation

@jalextowle
Copy link
Copy Markdown
Contributor

This PR adds safety checks to several questionable subtractions in the system, and fixes the LPWithdrawalTest suite in response to some recent intermittent failures.

@jalextowle jalextowle requested a review from jrhea December 19, 2023 04:21
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 19, 2023

Hyperdrive Gas Benchmark

Benchmark suite Current: 0bb2e6e Previous: 54dbf65 Deviation Status
addLiquidity: min 1600 gas 1600 gas 0% 🟰
addLiquidity: avg 54081 gas 52537 gas 2.9389% 🚨
addLiquidity: max 253298 gas 232092 gas 9.1369% 🚨
checkpoint: min 1216 gas 1216 gas 0% 🟰
checkpoint: avg 47987 gas 47973 gas 0.0292% 🚨
checkpoint: max 201987 gas 201955 gas 0.0158% 🚨
closeLong: min 1690 gas 1690 gas 0% 🟰
closeLong: avg 26678 gas 26522 gas 0.5882% 🚨
closeLong: max 139742 gas 139742 gas 0% 🟰
closeShort: min 1693 gas 1693 gas 0% 🟰
closeShort: avg 28792 gas 28799 gas -0.0243%
closeShort: max 144509 gas 98675 gas 46.4495% 🚨
initialize: min 1605 gas 1605 gas 0% 🟰
initialize: avg 181851 gas 181825 gas 0.0143% 🚨
initialize: max 256942 gas 256942 gas 0% 🟰
openLong: min 736 gas 736 gas 0% 🟰
openLong: avg 39677 gas 39667 gas 0.0252% 🚨
openLong: max 161281 gas 161281 gas 0% 🟰
openShort: min 702 gas 702 gas 0% 🟰
openShort: avg 46346 gas 46301 gas 0.0972% 🚨
openShort: max 160559 gas 160559 gas 0% 🟰
redeemWithdrawalShares: min 1598 gas 1598 gas 0% 🟰
redeemWithdrawalShares: avg 18555 gas 17072 gas 8.6867% 🚨
redeemWithdrawalShares: max 84776 gas 80228 gas 5.6688% 🚨
removeLiquidity: min 1661 gas 1661 gas 0% 🟰
removeLiquidity: avg 119122 gas 121035 gas -1.5805%
removeLiquidity: max 258840 gas 258376 gas 0.1796% 🚨

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

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Dec 19, 2023

Coverage Status

coverage: 94.946% (-0.4%) from 95.366%
when pulling 0bb2e6e on jalextowle/fix/rounding-errors
into 54dbf65 on main.

@jalextowle jalextowle enabled auto-merge (squash) December 19, 2023 06:20
@jalextowle jalextowle merged commit 39130f0 into main Dec 19, 2023
@jalextowle jalextowle deleted the jalextowle/fix/rounding-errors branch December 19, 2023 06:59
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