Fixes for the case where the initial max short guess made the pool insolvent.
Fixes for convergence of calculate_max_short.
~Increasing the default number of iterations from 7 to 10 for calculate_max_short.~ Solved issue where we needed more iterations, so the default number of iterations is not changed.
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
[ ] Testing
[ ] Are there new or updated unit or integration tests?
[ ] Do the tests cover the happy paths?
[ ] Do the tests cover the unhappy paths?
[ ] Are there an adequate number of fuzz tests to ensure that we are
covering the full input space?
[ ] If matching Solidity behavior, are there differential fuzz tests that
ensure that Rust matches Solidity?
Resolved Issues
General updates towards https://github.com/delvtech/hyperdrive-rs/issues/45
Description
This PR does the following updates:
long_amount_derivative
andshort_deposit_derivative
emperically.calculate_max_short
.calculate_max_short
.~ Solved issue where we needed more iterations, so the default number of iterations is not changed.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