Matching Logic
Matching Logic
At the center of every trading platform is a matching engine — the system that determines how and when trades are executed. At Initiativ, we’ve designed our matching logic to prioritize clarity, speed, and transparency, while aligning with the unique needs of the regulated emissions markets.
1. What Is a Matching Engine?
A matching engine is a set of rules and processes that compares incoming buy and sell orders and determines when a trade can occur. It ensures that trades are made fairly, using criteria such as price, quantity, and order time.
Every time a user submits an order — whether to buy or sell — the matching engine checks if there is a counterparty offering the opposite side of the trade. If a match is found, the trade is executed.
2. Traditional Matching Systems
Most legacy trading platforms use matching engines hosted on centralized infrastructure. These typically rely on SQL-based databases or in-memory systems to sort and match orders.
Well-known platforms that use traditional matching engines include:
NASDAQ and Euronext, which operate proprietary engines based on high-frequency databases.
Binance or Kraken in crypto markets, which rely on Redis or custom in-memory matching frameworks.
ICE (Intercontinental Exchange), which uses specialized matching logic for commodities and allowances.
These systems usually operate with price-time priority. That means the best-priced orders are matched first, and among equally priced orders, the one submitted earliest is prioritized. This is often referred to as FIFO (First In, First Out).
3. Initiativ’s Approach to Matching
Initiativ uses a different approach. Rather than relying on an off-chain engine and centralized database, we operate an on-chain order book hosted on a private blockchain. Matching is executed using application-specific modules — built specifically for this platform — rather than general-purpose smart contracts.
This architecture allows for:
Instant matching as soon as an order enters the book.
Deterministic execution, based on predefined rules.
Full transparency, since all matches are recorded on-chain.
Although users interact with a familiar trading interface, the underlying logic ensures that all activity is traceable and cannot be altered retroactively.
4. Example: How Matching Works in Practice
Let’s consider a simple example to illustrate the process:
Scenario:
A buyer submits an order to purchase 100 EUAs at a maximum price of €80 per ton.
At that moment, a seller is offering:
80 EUAs at €79 per ton.
20 EUAs at €81 per ton.
What the engine does:
The engine recognizes that 80 of the 100 requested EUAs can be matched at €79, which is within the buyer’s limit.
That 80-unit match is executed instantly and delivered to the buyer.
The remaining 20 EUAs from the seller are priced above €80, so they are not matched.
The buyer’s order remains open for the remaining 20 units, still searching for sellers offering EUAs at €80 or less.
//+---------------------+ +----------------------+ +---------------------+
| | | | | |
| Buyer submits | | Engine checks | | Match found for |
| 100 EUAs @ €80 +------>+ active sell orders +------>+ 80 EUAs @ €79 |
| | | | | |
+----------+----------+ +-----------+----------+ +----------+----------+
| | |
| | |
| | |
| No match for 20 EUAs @ €81 |
| | |
| v |
| +--------------------------+ |
| | Deliver 80 EUAs to buyer| |
| +--------------------------+ |
| | |
| v |
+----------------------------->+-----------------------------+
| Keep remaining 20 EUAs |
| in open buy order @ €80 |
+-----------------------------+
5. Partial Fills and Order Persistence
In the case of a partial fill, Initiativ executes and delivers the matched portion immediately. There is no delay or batching once a valid match is found. However, the unfilled portion of the order remains active in the order book until it is either:
Fully filled by future compatible sell orders.
Cancelled manually by the user.
This ensures that users always receive what’s available right away, without having to re-submit orders or wait for complete fulfillment.
6. Summary: Why This Matters
Initiativ’s matching logic offers the advantages of traditional systems — such as price-time fairness and fast execution — while improving on them through on-chain transparency and simplified infrastructure.
Clients benefit from:
Immediate, traceable execution.
Efficient order management, including partial fills.
Consistency across jurisdictions, including EUAs, EUAAs, and UKAs.
Because matching is handled directly by the infrastructure -- not by third-party engines -- we eliminate many of the complexities found in legacy systems.
Last updated