Solver Development for Intent-Based Protocols
A user of an intent-based protocol does not specify the exact swap route but signs a goal: "get at least 3000 USDC for 1 ETH by tomorrow morning." Execution falls on the solver — an off-chain agent that finds the best path through dozens of DEXes in seconds, considering liquidity, fees, and competitive bids from other solvers. An error in routing or a 200 ms delay, and the order goes to a competitor.
We develop custom solvers for protocols such as CoW Protocol, UniswapX, 1inch Fusion, and ERC-7683 (cross-chain intents) — a standard described in EIP-7683. For example, for one project on UniswapX, we implemented a private RFQ channel with market makers, boosting win rate from 5% to 18% and increasing average surplus by 30%. This allowed the client to take second place by volume among 45 solvers on the protocol.
Solver development includes architecture design, writing the core in Rust with parallel requests to 15+ liquidity sources, testing on forked mainnet, and deploying settlement contracts. Average order processing latency is 250 ms, and win rate after the first week of optimization reaches 10-15%. We guarantee transparent metrics and 99.9% uptime SLA.
How a solver works and what makes it complex
The solver receives a signed EIP-712 order, queries liquidity pools in parallel (Uniswap V3, Curve, Balancer), aggregators (1inch, 0x), and private RFQ channels. Then, within 10–15 seconds (for CoW Protocol batch auction) or without a strict deadline (for UniswapX), it forms a settlement transaction. Competition forces optimization at every step: we use Rust with tokio for parallel RPC (latency ~150 ms per source), cache pool state via WebSocket, and use the in-process EVM simulator revm to check routes without extra on-chain calls.
Why batch auction demands high performance
In CoW Protocol, the auction window is 30 seconds, of which 10–15 seconds remain for computation. During this time, dozens of DEXes must be polled, split routing calculated, transactions simulated, and a settlement formed. We use Rust with tokio async runtime — this enables parallel RPC to sources within 100–200 ms. Cache of pool state (reserves/sqrtPrice) via WebSocket subscriptions yields microsecond latency instead of milliseconds. The in-process EVM simulator (revm) checks routes without on-chain calls.
UniswapX: architecture and execution mechanism
UniswapX uses a Dutch auction: the filler/solver can execute the order at any time before expiry. The initial price is favorable to the user and gradually shifts in favor of the solver. The first solver to execute the order at an acceptable price wins.
UniswapX order structure (ExclusiveFillerOrder):
interface ExclusiveFillerOrder {
info: {
reactor: Address
swapper: Address
nonce: bigint
deadline: bigint
additionalValidationContract: Address
additionalValidationData: Hex
}
exclusiveFiller: Address
exclusivityOverrideBps: number
input: {
token: Address
amount: bigint
}
outputs: Array<{
token: Address
startAmount: bigint
endAmount: bigint
recipient: Address
}>
}
The solver receives input.amount from the user and must return at least currentOutput (value between startAmount and endAmount depending on timestamp).
Reactor contract and settlement
The UniswapX Reactor is an on-chain contract that verifies the user's signature, checks currentOutput over time, and manages transfers. The solver calls execute(order, signature, fillData). The key point: the solver receives input tokens at the beginning of execution and must return output tokens by the end of the same transaction. Between receiving and returning, the solver can use any on-chain protocols — this is the space for optimization.
Finding the optimal execution path
The solver's goal is to maximize surplus for given input/output. Surplus = actualOutput - minRequiredOutput. Better surplus → higher chance of winning the auction in batch systems.
Routing through multiple DEXes
The basic approach is to find the best price via an aggregator. Parallel requests to 10+ DEXes with a 500 ms timeout per source. The best responding route is selected. In production, we poll more than 15 sources, including Uniswap V3, Curve, Aerodrome, Balancer, and aggregators 1inch, 0x.
Split routing
If one DEX is insufficient, we split the order into parts. For orders >500 ETH, split routing into 2-3 parts reduces price impact from 3-5% to 1-2%.
Private liquidity (RFQ)
In addition to on-chain DEXes, the solver can access private market makers via RFQ. The market maker responds with a signed quote — if it beats the on-chain route, the solver uses it. CoW Protocol supports this via GPv2 interaction: the solver includes the signed quote from the market maker as part of the settlement. In one case, the RFQ channel increased surplus by 35% on orders >100 ETH.
Example code for RFQ integration
async function requestRFQ(order: Intent): Promise<SignedQuote> {
const quote = await marketMaker.requestQuote({
tokenIn: order.input.token,
tokenOut: order.output.token,
amount: order.input.amount,
deadline: order.deadline
})
if (quote.amountOut > bestOnChainRoute.amountOut) {
return quote // use RFQ
}
return null
}
CoW Protocol solver: batch auction mechanics
In CoW Protocol, a batch auction proceeds as follows:
- Orderbook: users sign orders (via CoW Swap UI or directly), orders enter the public orderbook API
- Auction call: every ~30 seconds, CoW Protocol calls /solve on registered solvers
- Solver computation: the solver receives the list of orders in the batch, finds the optimal set of executions (including CoW — matching opposing orders without DEX)
- Submission: the solver submits a solution with calldata for on-chain settlement
- Winner selection: the solver with the highest total surplus for the batch is selected
- On-chain settlement: the winning solver executes the transaction via the GPv2Settlement contract
CoW (Coincidence of Wants) is a feature: if the batch contains an order to sell ETH for USDC and an order to sell USDC for ETH — the solver can match them directly. No DEX fees, no price impact. Both parties get a better price.
Registering a solver in CoW Protocol
The solver must be authorized by CoW DAO. To participate in production auctions, a bond is required (DAO governance vote). For testing, a staging environment without bond is available. We facilitate the registration process, including preparation of technical documentation and passing contract audit. Details in the official CoW Protocol documentation.
Comparison of UniswapX and CoW Protocol for solvers
| Parameter | UniswapX (Dutch auction) | CoW Protocol (batch auction) |
|---|---|---|
| Competition mechanism | First to fill at acceptable price | Batch solution every ~30 sec, best surplus wins |
| Computation time | No strict deadline, but earlier is better | Strict 30 sec, effective time 10-15 sec |
| CoW matching | Not supported | Supported, reduces need for DEX |
| RFQ | Via exclusive filler | Via signed quotes in settlement |
| Development complexity | Medium | High (batch optimization) |
| Typical win rate after optimization | 15-25% | 10-20% |
| Average gas savings (vs. regular swap) | 5-10% | 10-20% |
What is included in the work
- Competitive environment analysis — assessment of current solvers, their win rates, typical routes
- Solver development for intent-based protocols — code in Rust/Go, integration with the chosen protocol, routing engine
- Settlement contracts — custom if needed (Solidity 0.8.24, Foundry tests)
- Monitoring and alerts — Prometheus metrics (win rate, avg surplus, latency), Grafana dashboard, Telegram notifications when win rate drops below 5%
- Mainnet registration — documentation preparation, governance passage (for CoW), deployment
- Post-launch support — strategy optimization, adding new DEXes, updates during hard forks
Timeline and savings estimates
A basic UniswapX filler with simple routing — 1 week. A full CoW Protocol solver with CoW matching, split routing and RFQ — 3–4 weeks. Cost is calculated individually, but average transaction savings due to optimization reach 15-20% vs. standard routes. We have 5+ years of experience and have implemented over 50 projects in smart contracts and DeFi infrastructure.
Why order a custom solver?
A ready-made solver does not account for the specifics of your tokens, liquidity, and strategy. A custom solver allows you to configure priority routes, private RFQ channels, optimize latency for your DEX aggregator, and increase win rates in auctions. Get a consultation — we will evaluate your project and offer a turnkey solution. Contact us to discuss the details.







