Whenever you're ready, walk me through how you'd approach this.
How would you match a buy order with the cheapest price in a database?
Explain how you would identify compatible sell orders, handle multiple offers at the same price, and prevent two matching processes from selecting the same liquidity. The answer should address both the selection logic and the transaction-safety concerns.