For the sake of efficiency most of the DEX actions are split into two stages:
- order creation
- order execution
Once an order is submitted to the network it can be executed by off-chain bots. Off-chain bot is a piece of software that tracks orders and makes transactions from them performing all the necessary state transitions. Legitimacy of all transitions is checked on-chain by validation scripts. Off-chain bot can be run by anyone who is willing to support Spectrum Finance and earn execution fees.