Docs · 05
Router
Optional contract that sends an order to the best attested venue.
The router is an optional contract that sends an order to the venue returned by bestVenue. Use of the router is never required to read scores.
Behaviour
- The caller specifies Stock Token, side, amount, a maximum acceptable slippage versus the mid in bps, a recipient and a deadline.
- The router calls
bestVenuefor the current market state and the size bucket of the order. - If the returned
scoreBpsis 0 (no fresh score) or the market state is Halt, the call reverts. - The router executes the swap on that venue and checks the realized fill price against the mid at the same block.
- If the realized slippage exceeds the caller's maximum, the transaction reverts.
Fee
0.05% (5 bps) of routed notional, taken in the input asset. The fee is sent to the fee collector: 60% to buyback-and-burn of $PRGE, 40% to the treasury.
Properties
- Non-custodial. The router holds no balances between transactions.
- Single venue per order. The router does not split orders across venues.
- Stateless with respect to scores; it reads the same public view any other contract can read.
Limits
- A score describes the past day. The realized fill can differ from
scoreBps; the caller's maximum slippage is the only guarantee. - Router volume is itself measured like any other flow. Routed trades are attributed to the venue that executed them, not to the router.