{
 "sources": [
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/amm/cfmm.rs",
   "quote": "let k = self.reserve_x * self.reserve_y;"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/market/arbitrageur.rs",
   "quote": "let new_x = (k / (gamma * fair_price)).sqrt();"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/market/router.rs",
   "quote": "let numerator = r * (y2 + gamma2 * total_y) - y1;"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/market/price_process.rs",
   "quote": "let z: f64 = StandardNormal.sample(&mut self.rng);"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/market/retail.rs",
   "quote": "let n_arrivals = self.poisson.sample(&mut self.rng) as usize;"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/simulation/engine.rs",
   "quote": "for amm in amms.iter_mut() {"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/types/wad.rs",
   "quote": "Wad((value * WAD as f64) as i128)"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/types/trade_info.rs",
   "quote": "if bid_fee > max_fee_u128 || ask_fee > max_fee_u128 {"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/Cargo.toml",
   "quote": "rand_distr = \"0.4\""
  },
  {
   "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3178-build-shared-evaluation-kit/45e7563d1a29ffca9d608fdf60c90bf2624d2d01/bootstrap/smoke_engine.py",
   "quote": "rng = np.random.default_rng(seed=seed)"
  },
  {
   "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3178-build-shared-evaluation-kit/45e7563d1a29ffca9d608fdf60c90bf2624d2d01/engine_eval.py",
   "quote": "result = engine.run_batch(list(codes[0]), list(codes[1]), [cfg], 8)"
  },
  {
   "url": "https://api.imd.fun/artifacts/8b18deed94ffc0ce7268140f652b5a1d2cf1a55e98a7e18575d1c51ce83cb098",
   "quote": "k recomputed from the stored reserves at every quote and every arbitrage sizing, against a constant. This is the cause."
  },
  {
   "url": "https://api.imd.fun/artifacts/a88ff982eba7e078bc6ccb1555b90a211c00c9fd76ec90a62ab13a4074f2c3d0",
   "quote": "fast exact port of LEANBASE with a fee-correction hook"
  },
  {
   "url": "https://raw.githubusercontent.com/rust-random/rand/0.8.5/rand_pcg/src/pcg128.rs",
   "quote": "const MULTIPLIER: u128 = 0x2360_ED05_1FC6_5DA4_4385_DF64_9FCC_F645;"
  },
  {
   "url": "https://raw.githubusercontent.com/rust-random/rand/0.8.5/rand_core/src/lib.rs",
   "quote": "const INC: u64 = 11634580027462260723;"
  },
  {
   "url": "https://raw.githubusercontent.com/rust-random/rand/0.8.5/rand_distr/src/poisson.rs",
   "quote": "if self.lambda < F::from(12.0).unwrap() {"
  },
  {
   "url": "https://raw.githubusercontent.com/rust-random/rand/0.8.5/rand_distr/Cargo.toml",
   "quote": "num-traits = { version = \"0.2\", default-features = false, features = [\"libm\"] }"
  },
  {
   "url": "https://raw.githubusercontent.com/rust-random/rand/0.8.5/rand_distr/src/utils.rs",
   "quote": "let i = bits as usize & 0xff;"
  },
  {
   "url": "https://raw.githubusercontent.com/rust-random/rand/0.8.5/src/distributions/float.rs",
   "quote": "fraction.into_float_with_exponent(0) - (1.0 - EPSILON / 2.0)"
  },
  {
   "url": "https://raw.githubusercontent.com/rust-lang/libm/libm-v0.2.11/src/math/exp.rs",
   "quote": "y = 1. + (x * c / (2. - c) - lo + hi);"
  }
 ]
}
