delvtech / hyperdrive

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

LP Sandwich Tests #1043

Closed jalextowle closed 1 month ago

jalextowle commented 1 month ago

Description

Adds testing for the LP sandwich attack to ensure that the initial LP will not lose money with a properly configured circuit breaker delta.

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 1 month ago

Pull Request Test Coverage Report for Build 9375008841

Details


Totals Coverage Status
Change from base Build 9374786147: 0.0%
Covered Lines: 1833
Relevant Lines: 1963

šŸ’› - Coveralls
coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9375069920

Details


Totals Coverage Status
Change from base Build 9374786147: 0.0%
Covered Lines: 1833
Relevant Lines: 1963

šŸ’› - Coveralls
github-actions[bot] commented 1 month ago

Hyperdrive Gas Benchmark

Benchmark suite Current: 5e6774a6f2a7d9c3dea0c2eb18daa11824f144dc Previous: 5383ec41cfe4c92ea2831cbbd09bbab8ee94527e Deviation Status
addLiquidity: min 33827 gas 33827 gas 0% šŸŸ°
addLiquidity: avg 155541 gas 156428 gas -0.5670% āœ…
addLiquidity: max 429092 gas 429092 gas 0% šŸŸ°
checkpoint: min 40292 gas 40292 gas 0% šŸŸ°
checkpoint: avg 142306 gas 142280 gas 0.0183% šŸšØ
checkpoint: max 253424 gas 253424 gas 0% šŸŸ°
closeLong: min 31361 gas 31361 gas 0% šŸŸ°
closeLong: avg 136118 gas 135514 gas 0.4457% šŸšØ
closeLong: max 2625796 gas 2625796 gas 0% šŸŸ°
closeShort: min 31349 gas 31349 gas 0% šŸŸ°
closeShort: avg 131995 gas 131768 gas 0.1723% šŸšØ
closeShort: max 263302 gas 402203 gas -34.5350% āœ…
initialize: min 31371 gas 31371 gas 0% šŸŸ°
initialize: avg 330940 gas 331025 gas -0.0257% āœ…
initialize: max 396934 gas 396934 gas 0% šŸŸ°
openLong: min 33370 gas 33370 gas 0% šŸŸ°
openLong: avg 174129 gas 173464 gas 0.3834% šŸšØ
openLong: max 306958 gas 306958 gas 0% šŸŸ°
openShort: min 33936 gas 33936 gas 0% šŸŸ°
openShort: avg 168522 gas 168593 gas -0.0421% āœ…
openShort: max 415910 gas 415910 gas 0% šŸŸ°
redeemWithdrawalShares: min 31251 gas 31251 gas 0% šŸŸ°
redeemWithdrawalShares: avg 75021 gas 75352 gas -0.4393% āœ…
redeemWithdrawalShares: max 210128 gas 210128 gas 0% šŸŸ°
removeLiquidity: min 31301 gas 31301 gas 0% šŸŸ°
removeLiquidity: avg 214675 gas 209310 gas 2.5632% šŸšØ
removeLiquidity: max 403971 gas 403971 gas 0% šŸŸ°

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

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9375141576

Details


Totals Coverage Status
Change from base Build 9374786147: 0.0%
Covered Lines: 1833
Relevant Lines: 1963

šŸ’› - Coveralls
coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9392318290

Details


Totals Coverage Status
Change from base Build 9374786147: 0.0%
Covered Lines: 1833
Relevant Lines: 1963

šŸ’› - Coveralls