Counterparty discovery is the task of finding another party to trade with.
Apps like AMMs or on-chain order books perform both counterparty discovery and settlement on the blockchain; when a trader executes a swap transaction on-chain, the counterparty happens to be the liquidity provider of the liquidity pool.
However, it’s also possible to decouple counterparty discovery and settlement. To reduce transaction costs, some applications perform counterparty discovery off-chain and only use a blockchain as a settlement layer. Performing counterparty discovery off-chain may have benefits such as better UX, scalability, privacy, etc.