delvtech / hyperdrive-rs

Rust SDK for the Hyperdrive AMM.
https://docs.rs/crate/hyperdrive-math/latest
Apache License 2.0
2 stars 0 forks source link

absolute max short bug #200

Open dpaiton opened 1 month ago

dpaiton commented 1 month ago

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.