Constrained Policy Optimization for Provably Fair Order Matching
About
Automated matching engines execute millions of orders per session, yet systematic asymmetries in latency, order size, and market access compound into persistent execution disparities that erode participant trust. We formulate provably fair order matching as a Constrained Markov Decision Process and propose CPO-FOAM (Constrained Policy Optimization with Feedback-Optimized Adaptive Margins). An inner loop computes an analytic trust-region step on the Fisher information manifold; a PID-controlled outer loop dynamically tightens safety margins, suppressing the sawtooth oscillations endemic to Lagrangian methods under non-stationary dynamics. Group fairness (demographic parity, equalized odds) enters the CMDP cost vector while individual Lipschitz fairness is enforced deterministically via spectral normalization. We prove BIBO stability and that the integral term drives steady-state violations to zero. On LOBSTER NASDAQ data across six market regimes, CPO-FOAM recovers 95.9% of unconstrained throughput at 2.5% constraint violation frequency; on crypto-asset LOB data under MEV injection it captures 98.4% of the reward envelope at 3.2% CVF. The method scales sub-linearly to M=8 constraints, settles on-chain within one Ethereum block, and yields a 2.1X reward improvement on Safety-Gymnasium, confirming domain-agnostic generalization.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Fair Order Matching | DeFi crypto-asset LOB BTC, ETH, SOL (500,000 held-out steps) | MQS0.968 | 21 | |
| Fair Order Matching | LOBSTER NASDAQ | Spread0.95 | 17 | |
| Continuous Control | Safety-Gymnasium SafetyPointGoal1 (generalization) | Episodic Reward24.5 | 6 | |
| Continuous Control | Safety-Gymnasium SafetyCarGoal1 (generalization) | Episodic Reward26.8 | 6 | |
| Continuous Control | Safety-Gymnasium SafetyAntVelocity (generalization) | Episodic Reward45.5 | 6 | |
| Fair Order Matching | DeFi-specific scenarios under Hawkes-process MEV injection | MEV Delta DP (p=0.20)0.038 | 4 | |
| Policy Verification | Layer-2 (L2) Blockchain | Verification Cost (USD)0.009 | 4 | |
| Safety Validation | Safety Gym | Safety Gym Cost Rate0.014 | 3 |