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

Test discrepancy in `calculate_max_short` and `calculate_open_short` outputs #169

Closed ryangoree closed 3 months ago

ryangoree commented 4 months ago

Crash Report

Related to a discrepancy found in delvtech/hyperdrive-frontend#1254

Description

After calling calculate_max_short with a given budget, then calling calculate_open_short with the result of the max call, we're seeing results change pretty dramatically at a certain threshold that seems to adjust based on chain state.

ryangoree commented 4 months ago

We may just need to up max-iterations. Danny and Dylan tested in a wip PR. Will confirm.

ryangoree commented 3 months ago

The iterations needed to be bumped.