{
 "sources": [
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/amm/cfmm.rs",
   "quote": "pub fn execute_buy_x_with_y(&mut self, amount_y: f64, timestamp: u64) -> Option<TradeResult> {"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/amm/cfmm.rs",
   "quote": "let (total_y, fee_amount) = self.quote_sell_x(amount_x);"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/market/arbitrageur.rs",
   "quote": "let x_virtual = (k * gamma / fair_price).sqrt();"
  },
  {
   "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": "const MIN_AMOUNT: f64 = 0.0001;"
  },
  {
   "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": "/// Post-trade X reserves (WAD precision)"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/simulation/engine.rs",
   "quote": "if let Some(arb_result) = arbitrageur.execute_arb(amm, fair_price, t as u64) {"
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/README.md",
   "quote": "`afterInitialize` is called once at simulation start — return your opening `(bidFee, askFee)`. Then `afterSwap` is called after every trade that hits your AMM. You see what just happened and return updated fees for the next trade."
  },
  {
   "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/README.md",
   "quote": "You get 32 storage slots (`slots[0..31]`) and helpers like `wmul`, `wdiv`, `sqrt`."
  },
  {
   "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/4812a6382311624e1506aca131ca35c378f930d9/research/solved/README.md",
   "quote": "**What separates +4.26 from #1 is one call:** is the first trade of a step the arb or retail. The filter is wrong 16% of the time. With the true answer the same code scores +6.98."
  },
  {
   "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/4812a6382311624e1506aca131ca35c378f930d9/research/solved/replica2.py",
   "quote": "RNG streams differ from the Rust engine, so absolute scores move by the seed set;"
  },
  {
   "url": "https://api.imd.fun/artifacts/d360bea6c8c982717b7b43a8069a87013169c89ee3e4da25622db4d880b936d4",
   "quote": "Complete `combo.py`. It imports TC's Code block saved unmodified as `twocomp.py` in the same directory"
  },
  {
   "url": "https://api.imd.fun/artifacts/d3c849db2ac31e567b57e52b80b86e8c24c842e5b4125b9d75c78e3cb07115b9",
   "quote": "class TwoComp(QMRef):"
  },
  {
   "url": "https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/31ff8ed128b463cde10ea0a71d354f8c54d4464a/reference/qt1/qmref.py",
   "quote": "usage: from qmref import QMRef; QMRef('blob.bin') is a replica2 policy (wants_j)."
  }
 ]
}