{"sources":[{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/README.md","quote":"For n in n0 - 1, n0, n0 + 1: `v = fl(n * grid / gamma)`, then what the contract would be handed for it, `trunc(fl(v * 1e18))`. Equal to `paid_wad` for one of them: arbitrage. Do not invert the conversion instead: an amount under 0.009 of a token loses bits in it."},{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/tellref.py","quote":"def is_arb(is_buy, amount_x_w, amount_y_w, reserve_x_w, reserve_y_w, prev_reserve_x_w, prev_reserve_y_w, bid_fee_w, ask_fee_w):"},{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/check.py","quote":"A vector is [is_buy, amount_x, amount_y, reserve_x, reserve_y, prev_reserve_x, prev_reserve_y, bid_fee,\nask_fee, arb, first, expected]: nine inputs as decimal strings (they pass 2**53), the truth, whether it\nwas the pool's first trade of its step, and what `tellref.is_arb` answers.  A port passes when it gives\n`expected` on every vector."},{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/tellpol.py","quote":"return hit, min(1.0, math.ulp(paid) / grid)"},{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/fetch.sh","quote":"print('fetched', n, 'files,', bad, 'mismatched')"},{"url":"https://raw.githubusercontent.com/gtmcknight/amm-sim/66604b3426d8e97a73e2c39940b9b4dece51cc73/research/tell/SHA256SUMS","quote":"7483623d551bd6334547b6b1fcd621b4d721dd2082011b6c113f083421396947  vectors.json.gz"}]}
