diff --git a/crates/hyperdrive-math/src/short/max.rs b/crates/hyperdrive-math/src/short/max.rs index c8dc7444..3343a971 100644 --- a/crates/hyperdrive-math/src/short/max.rs +++ b/crates/hyperdrive-math/src/short/max.rs @@ -94,7 +94,7 @@ impl State { /// `maybe_base_tolerance` of the target base amount (default is 1e9). /// /// Increasing `maybe_max_iterations` will increase the accuracy of the - /// result (default is 500). + /// result (default is 1_000). pub fn calculate_short_bonds_given_deposit( &self, target_base_amount: FixedPoint, @@ -104,7 +104,7 @@ impl State { maybe_max_iterations: Option, ) -> Result> { let base_tolerance = maybe_base_tolerance.unwrap_or(fixed!(1e9)); - let max_iterations = maybe_max_iterations.unwrap_or(500); + let max_iterations = maybe_max_iterations.unwrap_or(1_000); // The max bond amount might be below the pool's minimum. // If so, no short can be opened. @@ -1110,7 +1110,7 @@ mod tests { async fn fuzz_open_short_inversion() -> Result<()> { let abs_max_bonds_tolerance = fixed_u256!(1e9); let budget_base_tolerance = fixed_u256!(1e9); - let max_iterations = 500; + let max_iterations = 1_000; let mut rng = thread_rng(); // Run the fuzz tests.