Introducing Swapr: Order Flow Segmentation for Fair-Price Liquidity
The AI-powered DEX aggregator that works for you
Introduction
Order flow is the pulse of every DEX, but not all pulses are healthy. Some are driven by retail users making organic swaps, while others represent sophisticated arbitrage strategies or informed trading. Venues that can distinguish between “clean” and “toxic” flow unlock tighter pricing for desirable swaps and shield liquidity providers from adverse selection.
That’s why we’re building Swapr: a DEX aggregator powered by built‑in order flow segmentation. In real time, Swapr grades each swap via a proprietary AI model, funnels clean flow into purpose-built DEXs for tighter pricing, and diverts toxic flow to venues that can absorb it. As traders and builders we were tired of choosing between fast, safe, or fair. Swapr gives us all three.
First stop: Capricorn. Swapr will route the nontoxic flow into Capricorn’s Private Liquidity Pool, screening every trade and unlocking tighter quotes while safeguarding LPs.
Order Flow Segmentation Framework
Swapr’s real-time segmentation model evaluates every incoming swap along three dimensions:
Trade Characteristics
Source: frontend apps, wallet types, known routers
Microstructure: pair volatility, size, timing patterns
Market Context: recent price moves, liquidity depth, flow imbalances
Historical Patterns
Wallet behavior and transaction history
Success rates of previous classifications
Cross-chain activity and funding sources
3. Custom Preference Functions
DEX developers can supply custom preference functions as part of Swapr integration. For example, if an on-chain oracle lags, the DEX can flag imbalanced trades and steer them elsewhere. These preferences inform the segmentation system so venues handle only the flows they’re built for.
Putting it together gives us flow-aware routing: clean, high-value swaps go to venues optimized for tight pricing; potentially toxic or imbalanced flows route to liquidity pools or AMMs designed to absorb them.
Integrations with Liquidity Venues
Swapr's segmentation framework enables integration with various types of liquidity venues, each optimized for different order flow types:
Private Liquidity Pools: Venues like Capricorn’s Private Liquidity Pools that dynamically offer tighter spreads to verified non-toxic flow. These pools can quote aggressively because they're shielded from adverse selection.
Dynamic Fee Venues: DEXs implementing gradient pricing based on order flow classification, charging higher fees for potentially toxic trades while offering discounted execution to clean flow.
Traditional AMMs: Standard venues designed to absorb informed flow to correct pricing.
Model Stack
Fast path: XGBoost + LightGBM
Deep dive: sequence models with behavior-driven wallet clustering
Labels: 5min / 1 h / 24 h mark-outs
All components are tunable and lightning-fast to meet real-time demands.
Routing Engine
Swapr's routing engine combines real-time data, third-party routing and flow-aware segmentation to deliver superior execution:
Hybrid Liquidity Sourcing combines our native routing engine with integration of other Monad routers, ensuring comprehensive coverage and optimal execution path.
Low-Latency State Streaming maintains up-to-date protocol states across all integrated venues through low-latency on-chain data streaming.
Fast, Flow-Aware Simulation Layer runs lightning-fast swap simulations across all integrated protocols, applying custom spreads and dynamic fees in real time to align with segmentation signals.
Swapr & aPriori MEV Stack: Benefits of Vertical Integration
Swapr serves as the entry point to the same MEV and block‑building infrastructure that underpins aPriori’s validator and staking operations. Here are a few advantages:
Exclusive Flow Data: Segmentation model classifies flow in under 500 ms and forwards each order to the venue that best matches its risk profile. Meanwhile, aPriori’s RPC endpoints receive valuable private txs and MEV bundle submissions that uncover bidding strategies and adversarial trading patterns. This exclusive stream of intents and bundle metadata gives our models a richer dataset, steadily improving toxicity classification accuracy.
MEV‑Infra‑Native Execution: Intent-based swaps submitted through Swapr utilize the same submission paths that power aPriori's MEV infrastructure. Traders enjoy faster confirmation and fortified MEV protection, while the additional order flow boosts validator fee capture in aPriori's block-building economy.
Rich EVM Data on Monad: Monad’s parallel EVM combines high throughput with extensive address history, allowing our models to leverage deep behavioral signals enabled by EVM's network effect.
By unifying order routing, liquidity provision, and block production, we reduce intermediaries, lower execution risk, and align incentives for traders, LPs, and the infrastructure that settles their trades.
What’s Next
Broader datasets: more volatile pairs, cross-chain wallets, new intent relayers.
Time-series wallet embeddings & unsupervised clustering to surface fresh toxicity patterns.
Continuous latency shaving.
We built Swapr to trade the way we want to trade. Capricorn is just the beginning. Our vision is to help every DEX become fast, fair, and safe.
Stay tuned and follow x.com/apr_labs for more updates.
You have done a tremendous and unique job!
The future of DeFi is today with @apr_labs
Congratulations! This is epic! 🎉👏💜
Great