Skip to content

Conversation

@jalextowle
Copy link
Contributor

This PR cleans up the close long tests by abstracting out the assertions as much as possible. The assertion about the amount of capital the long receives is intentionally left out to add flexibility to the assertion.

@coveralls
Copy link
Collaborator

coveralls commented Feb 20, 2023

Pull Request Test Coverage Report for Build 4227251506

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 37.912%

Totals Coverage Status
Change from base Build 4227139744: 0.0%
Covered Lines: 207
Relevant Lines: 546

💛 - Coveralls

@jalextowle jalextowle force-pushed the jalextowle/tests/refactor-assertions-close-long branch 2 times, most recently from 3b5e962 to 216e43e Compare February 20, 2023 20:57
* Refactored the assertions for open short

* Refactored the assertions for the short close short

* Added a TODO for the error bar
@jalextowle jalextowle force-pushed the jalextowle/tests/refactor-assertions-close-long branch from 2407cde to 2974f01 Compare February 20, 2023 21:40
@jalextowle jalextowle merged commit 2093eba into main Feb 20, 2023
@jalextowle jalextowle deleted the jalextowle/tests/refactor-assertions-close-long branch February 20, 2023 21:48
jrhea added a commit that referenced this pull request Mar 3, 2024
…g edge case of distribute excess idle (#800)

* Removed unneeded memory access in `calculateDistributeExcessIdleShareProceedsNetLongEdgeCase`

* Cleaned up the `calculateDistributeExcessIdleShareProceedsNetLongEdgeCaseSafe` function and its usage

---------

Co-authored-by: Jonny Rhea <5555162+jrhea@users.noreply.github.com>
jalextowle added a commit that referenced this pull request Mar 7, 2024
* Use safe functions more consistently in `calculateNetCurveTradeSafe`

* Fail if `calculateSharesOutGivenBondsInDownSafe` underflows

* Fixed the rust tests

* Improved the system's liveness when the present value can't be computed

* Improved the liveness properties of `removeLiquidity`

* Ignore `calculateLPSharePrice` failures in `removeLiquidity`

* Ensure that the ending indexes are valid in `HyperdriveFactory` getters

* Used unchecked arithmetic in several places

* Made the `LPMath` safer and used unchecked arithmetic

* Use unchecked arithmetic in the rest of the contracts

* Consolidated the derivative functions in the `LPMath` library

* Addressed review feedback from @jrhea

* Simplified the main loop of `calculateDistributeExcessIdle`

* Addressed review feedback from @Saw-mon-and-Natalie

* Addressed review feedback from @Saw-mon-and-Natalie
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.

4 participants