Skip to content

Commit

Permalink
increase number of iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaiton committed Jan 11, 2025
1 parent b5a1554 commit 593e47f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/hyperdrive-math/src/short/max.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<U256>,
Expand All @@ -104,7 +104,7 @@ impl State {
maybe_max_iterations: Option<usize>,
) -> Result<FixedPoint<U256>> {
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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 593e47f

Please sign in to comment.