You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a few functions associated with calculating the absolute max short:
calculate_max_short_upper_bound --> max only considering yieldspace curve absolute_max_short_guess --> one-shot approximation to the Hyperdrive pool's max short (incl fees & solvency reqs) calculate_absolute_max_short --> iterative method for refining pool's absolute max short guess
They all seem to have some problems.
calculate_max_short_upper_bound fails this test:
- tolerance = some small value (ideally zero)
- initialize & trade to a random state on-chain
- ys_max = state.calculate_max_short_upper_bound()
- celine.open_short(ys_max)
- new_max = state.calculate_max_short_upper_bound()
- assert!(new_max <= tolerance)
I'm seeing failures with tolerances on the order of 1e36.
absolute_max_short_guess does not always a return solvent result
calculate_absolute_max_short often throws errors from insolvent guesses, resulting in many tests having to catch panics and errors whenever using the function.
The text was updated successfully, but these errors were encountered:
We have a few functions associated with calculating the absolute max short:
calculate_max_short_upper_bound
--> max only considering yieldspace curveabsolute_max_short_guess
--> one-shot approximation to the Hyperdrive pool's max short (incl fees & solvency reqs)calculate_absolute_max_short
--> iterative method for refining pool's absolute max short guessThey all seem to have some problems.
calculate_max_short_upper_bound
fails this test:I'm seeing failures with tolerances on the order of 1e36.
absolute_max_short_guess
does not always a return solvent resultcalculate_absolute_max_short
often throws errors from insolvent guesses, resulting in many tests having to catch panics and errors whenever using the function.The text was updated successfully, but these errors were encountered: