In an effort to place as little trust in the Sparkswap Relayer as possible, the Relayer does not act as a matching engine on behalf of Brokers. Instead, Brokers are expected to monitor the orderbook published by the Relayer and take appropriate action to fulfill user desires. Users place orders (called block orders) with Brokers that can have all of the characteristics of typical trading instructions, including time and price restrictions (like a Market Order), but Brokers turn those instructions into only two types of actions with the Sparkswap Relayer: placing new limit orders, and filling other Brokers’ previously placed limit orders.
Since Brokers select the specific order to fill, order priority happens at the Broker level rather than on the Relayer. Fundamentally that means that there is no guarantee of order priority at a given price level, since every Broker is free to decide for themselves which order to fill. The default behavior of the Broker is to fill the first order at that price.
Brokers can avoid front-running in this way since their intentions are not published to the network, only their actions.