Understanding the trading and matching engine