Optimize Execution Quality
A high-fidelity routing sandbox. Test your smart order router against simulated AMMs and orderbooks, optimizing for slippage, gas, and MEV protection.
AMM + Router
Engines
Synthetic venues
Data
FX deviation
Dashboards
Advanced Routing Simulation
- Model Curve and UniV3 pricing with concentrated liquidity bands
- Generate synthetic orderbooks with realistic depth and latency
- Simulate slippage and MEV impact on every routed trade
Policy-Driven Execution
- Enforce max slippage and venue risk limits via policy-as-code
- Optimize for gas costs with dynamic per-venue multipliers
- Configure fallback routes with fail-open/fail-closed logic
Market Operations
- Deploy market-making bots to maintain target spreads
- Inject network latency to test routing performance under load
- Visualize FX deviation and execution quality in BigQuery
Curve-style Pricing Logic
// routing/amm/math.ts
export function curvePrice(x, y, amount) {
// Simulate Curve invariant for stable pairs
const invariant = x * y;
const newX = x + amount;
const newY = invariant / newX;
const dy = y - newY;
return {
dy,
price: dy / amount,
impact: calculateImpact(amount, x, y)
};
}
Policy-Aware Router
// routing/policy-router.ts
export function chooseRoute(quotes, policies) {
// Filter quotes based on strict risk policies
const filtered = quotes.filter((quote) => {
return (
quote.slippage <= policies.maxSlippage &&
quote.fxDeviation <= policies.maxFxDeviation &&
quote.venueRisk <= policies.maxVenueRisk
);
});
// Optimize for total cost (execution + gas)
return filtered.sort((a, b) => a.totalCost - b.totalCost)[0];
}
Ready to stress your router?
Deploy the routing engine to Cloud Run. Stream synthetic market data, toggle MEV risks, and verify that your execution logic holds up in volatile conditions.
