Skip to content

Test that the minimum share reserves resolve Spearbit's issue#459

Merged
jalextowle merged 2 commits intomainfrom
jalextowle/test/lp-with-small-share-reserves
Jul 13, 2023
Merged

Test that the minimum share reserves resolve Spearbit's issue#459
jalextowle merged 2 commits intomainfrom
jalextowle/test/lp-with-small-share-reserves

Conversation

@jalextowle
Copy link
Copy Markdown
Contributor

Fixes: #425.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 13, 2023

Hyperdrive Gas Benchmark

Benchmark suite Current: 1c813a5 Previous: 5007450 Deviation Status
addLiquidity: min 709 gas 709 gas 0% 🟰
addLiquidity: avg 49605 gas 45498 gas 9.0268% 🚨
addLiquidity: max 77728 gas 77728 gas 0% 🟰
checkpoint: min 514 gas 514 gas 0% 🟰
checkpoint: avg 23019 gas 23019 gas 0% 🟰
checkpoint: max 33407 gas 33407 gas 0% 🟰
closeLong: min 659 gas 659 gas 0% 🟰
closeLong: avg 47672 gas 47497 gas 0.3684% 🚨
closeLong: max 83240 gas 83240 gas 0% 🟰
closeShort: min 616 gas 616 gas 0% 🟰
closeShort: avg 42742 gas 42330 gas 0.9733% 🚨
closeShort: max 84477 gas 84477 gas 0% 🟰
initialize: min 532 gas 532 gas 0% 🟰
initialize: avg 160360 gas 160281 gas 0.0493% 🚨
initialize: max 161781 gas 161781 gas 0% 🟰
openLong: min 661 gas 661 gas 0% 🟰
openLong: avg 115861 gas 114770 gas 0.9506% 🚨
openLong: max 175911 gas 175911 gas 0% 🟰
openShort: min 709 gas 709 gas 0% 🟰
openShort: avg 158997 gas 159830 gas -0.5212%
openShort: max 218810 gas 218810 gas 0% 🟰
removeLiquidity: min 569 gas 569 gas 0% 🟰
removeLiquidity: avg 62394 gas 62682 gas -0.4595%
removeLiquidity: max 116558 gas 116558 gas 0% 🟰

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

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Jul 13, 2023

Coverage Status

coverage: 96.372%. remained the same when pulling 1c813a5 on jalextowle/test/lp-with-small-share-reserves into 5007450 on main.

Comment thread test/units/hyperdrive/ExtremeInputs.t.sol
Copy link
Copy Markdown
Contributor

@ControlCplusControlV ControlCplusControlV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a minor comment about a magic number

@jalextowle jalextowle merged commit fb74a17 into main Jul 13, 2023
@jalextowle jalextowle deleted the jalextowle/test/lp-with-small-share-reserves branch July 13, 2023 16:29
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.

An attacker can force 0 shares to be minted for a liquidity provider

3 participants