-
Notifications
You must be signed in to change notification settings - Fork 6
Spearbit #60: Safety and Liveness Improvements #810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hyperdrive Gas Benchmark
This comment was automatically generated by workflow using github-action-benchmark. |
|
After taking a step back, the present value shouldn’t cause problems with liveness. If we can’t calculate the LP share price for the checkpoint event, so be it. It’s not the end of the world. Similarly, if we can’t calculate the present value in “getDistributeExcessIdleParams”, we can just skip distributing excess idle. Making these changes will allow me to revert the changes in the netting test and will give us additional assurances that liveness will not be compromised due to being unable to calculate the present value. When I do this tomorrow, I’ll consider reverting the change that allows the trading function to fail in calculateNetCurveTradeSafe. |
657efc7 to
9abab7a
Compare
calculateSharesOutGivenBondsInDownSafe underflows
jrhea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment here is that i think some of this conditionals are going to be hard to write tests for
6a7b1cd to
e26fb07
Compare
…erest_time_elapsed`
d4d912b to
371fc08
Compare
Addresses Spearbit Issue #60.
Fixes: #762.
This PR implements several changes that attempt to improve Hyperdrive's liveness properties without relying on hacks like the one that Spearbit mentioned in issue #60. The two primary methods of achieving better liveness used in this PR are:
calculateNetCurveTradeSafesinceYieldSpaceMathhas a fundamental with small inputs.calculatePresentValueanddistributeExcessIdleon a case-by-case basis.