Building a Router, Part II
Quoting: direct quoting vs. simulations
You can start with sims (ex: LiteSVM) but you'll quickly find it doesn't scale. Native quoting is 200-3000x faster
What goes in to a quote?
quote = f(input, pool state, clock, route, flow)
Input: direction, input amount
Pool state: reserves, ticks/bins, fees, curve params
Clock: slot, timestamp, epoch
Route: router/profile, hop position, route source/destination
Flow: caller, accounts, surrounding instructions, route shape
here's a table comparing direct quoting vs. simulation execution for some propAMMs and a subset of AMMs
We built a router. Not meant to compete with existing routers. We need it for our upcoming solana-wide execution quality scoring. More on that in a future post
Supports 10+ propAMMs and many more AMMs
Still early days and a bit hungry on the CUs