mirror of
https://github.com/luxfi/dex.git
synced 2026-09-24 00:26:31 +00:00
The first cut read each market once, at a hundred dollars. That is right for a pool with depth and nonsense for one without: a hundred dollars into an abandoned pool buys a rounding error, and the implied price of a rounding error is enormous. Measured over the fifty tokens Ethereum lists first, half of what came back was more than one percent off an independent source and AUCTION — a token worth $3.44 — read $889,434,176. So the pools are asked twice, at ten dollars and at a hundred, and a price that does not survive ten times the size is not returned at all. Twenty-five of the twenty-seven that now come back agree with that source within two percent. The two that do not are real pools here sitting off the wider market, and that is this venue's price: /v1/trade/quote for the same size implies $0.036806 for ASM where /v1/trade/price says $0.036834, so the screen and the swap panel agree, which is the thing that has to be true. The gate is on the best reading at each size, not on each numéraire separately. Gating per numéraire refuses the cheapest route for being thin and then quotes a dearer one that was not — ANT came back at $3.72 against a market of $0.07 that way, because the route that knew better had been thrown out. Both sizes are asked at once, so the second one costs calls and not latency: fifty cold tokens on Ethereum in 10.1s, the same fifty warm in 36ms. Co-authored-by: Hanzo Dev <[email protected]>