Skip to content

Commit

Permalink
remove checkpoint exposure from initial liquidity
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaiton committed Dec 17, 2024
1 parent ed8e50f commit 119f54c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/hyperdrive-math/src/test_utils/preamble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,7 @@ pub async fn initialize_pool_with_random_state(

// Add some liquidity again to make sure future bots can make trades.
let liquidity_amount = rng.gen_range(fixed!(1_000e18)..=fixed!(100_000_000e18));
let exposure = FixedPoint::try_from(
alice
.get_checkpoint_exposure(alice.latest_checkpoint().await?)
.await?
.max(I256::zero()),
)? + alice.get_state().await?.long_exposure();
let exposure = alice.get_state().await?.long_exposure();
alice.fund(liquidity_amount + exposure).await?;
alice
.add_liquidity(liquidity_amount + exposure, None)
Expand Down

0 comments on commit 119f54c

Please sign in to comment.