DeFi
Intent-based trading: how CoW Swap and UniswapX fill orders
An intent is a trade that is signed but not sent. Instead of a transaction that calls a pool along a route fixed in advance, the user signs a message saying what they will give up, the least they will accept and how long the offer stands, and other parties compete for the right to carry it out. CoW Swap and UniswapX are two such designs. Both take gas and most sandwich exposure off the user, and both put something else in their place: a contract that enforces only the signed limits, and an auction, partly run off-chain, that decides whether the user gets anything better.
What is signed instead of a transaction
An ordinary swap on Ethereum is a transaction. It names a router, a route and a
minimum output, and it pays gas whether or not the trade goes through. Uniswap’s
v2 router, described in what MEV is, takes an amountOutMin
and reverts below it, and while the transaction waits in the public mempool
anyone can read that minimum and trade around it, down to the limit. Why a quote
moves between signing and inclusion is the subject of what slippage
is.
An intent changes who builds the transaction. CoW Protocol’s documentation has the user sign an “intent to trade” message in place of a raw transaction, and describes it as a signed statement of trading constraints that cannot be executed on its own. In CoW’s case the constraints form an order (its settlement contract reference lists the fields): the token to sell and the token to buy, the two amounts, a receiver for the proceeds, an expiry given as a Unix timestamp, and whether the order may be filled in part. At settlement the contract checks that the signature matches the owner, that the order has neither expired nor been filled already, and that the price is at least as good as the one signed.
The signed message therefore works much like a limit order with a deadline. The user stops choosing how the trade is filled and chooses only the worst terms they will accept.
CoW Swap: solvers bid for the orders
CoW Swap is the trading front end. The protocol beneath it is CoW Protocol, which CoW DAO supports with development and marketing resources, among them the CoW Swap front end, an explorer and a grants programme, according to the documentation’s welcome page. Its contracts still carry the prefix GPv2, from the protocol’s former name, Gnosis Protocol v2 (the signing schemes page notes the change).
Signed orders are not sent on-chain. The protocol gathers the intents of many users into an auction (flow of an order), and once that auction stops taking new ones, solvers submit proposals for filling them. (The documentation names one exception, a fast-path order, which settles straight after placement without waiting for the competition.) The documentation describes solvers as independent, bonded participants (solvers). A solver can bid on a single order or on a group. The competition rules set out how a winner is picked: the protocol finds the best bid for each token pair in each direction taken alone, throws out any grouped bid that gives a pair less than that, and then picks the winning combination from the bids that remain. The 2025 proposal behind this “fair combinatorial” auction, CIP-67, describes that last step as choosing the combination that maximises surplus, the amount by which orders beat their signed limits, and it replaced a batch auction that allowed a single winner.
Grouping orders produces the effect the protocol is named after. A coincidence of wants is two traders each holding what the other wants. The documentation’s example pairs one trader selling DAI for ether with another selling the same value of ether for DAI in the same auction: the solver swaps them with each other, and neither pays a pool’s liquidity fee. A match can be partial, with the remainder sent to a pool, or run through three or more traders in a ring. Where there is no match, solvers route through on-chain pools or, the documentation says, draw on off-chain liquidity such as their own inventory or market makers’.
Inside each bid, every order trading the same tokens in the same direction must get the same price, which the rules call a uniform directional clearing price. If every such order receives one price, the sequence in which trades land in the block no longer matters, and placing a trade in front of another earns nothing.
UniswapX: a price that falls until someone fills
UniswapX reaches the same idea by another route. The swapper signs an order
stating its outputs, and fillers compete to satisfy it from whatever liquidity
they can reach
(overview).
The signature is a Permit2 message, so the tokens can move only on the order’s
terms. At settlement a reactor contract validates the order, pulls the swapper’s
tokens through Permit2’s permitWitnessTransferFrom with the order attached as
its witness, calls the filler’s contract, and then checks that the promised
outputs arrived
(architecture).
The price comes from a descending, or Dutch, auction. The auction documentation describes two phases. Uniswap Labs first collects quotes from a permissioned group of market makers, called quoters, and its interface offers the UniswapX route only when that beats the quote from Uniswap’s own pools. Once the user signs, a second round of quotes is taken and the best quoter gets a short exclusive window to fill. If that quoter backs out, which the documentation calls fading, the order opens to anyone. Its output starts at or slightly below the faded quote and falls block by block towards the minimum the user signed, and then the order expires. Quoters that fade too often can have their quotes ignored for a time.
The documentation’s timings are current values, not fixed rules. It gives the exclusive window as about 24 seconds (two blocks) on Ethereum and about two to four seconds on the other chains UniswapX runs on, followed by roughly a minute of decay, and it notes that the cosigner sets the window per order, so these values can change.
An illustration with invented numbers. A user signs to sell 1 ether for USDC with a minimum of 1,980. The winning quote is 2,000, but its quoter fades. The open auction starts near 2,000 and steps down; the first filler that finds it worth delivering the current output, gas included, fills, say at 1,991, and the user receives 1,991. No one can fill below 1,980.
Two parties sit between the user and the fill. Fillers are permissionless, but quoters are not. And a cosigner adjusts the auction’s parameters to current prices, within the range the user signed. The RFQ documentation explains why it exists: a user who signs a range of prices could, without safeguards, be given the worst price in it by a malicious auctioneer, so the order names a cosigner the user trusts to run the auction. In Uniswap’s interface and API, that cosigner is currently Uniswap Labs.
What changes for gas and MEV
Neither design has the user pay gas in the chain’s own token for the trade itself. CoW’s intents page lists paying network fees in the token being sold, no fee for an order that fails, and placing several orders at once among the benefits; UniswapX’s says gas is folded into the final price and paid by the filler, and that failed swaps cost nothing. The cost of the transaction is still paid, inside the price rather than beside it, much as a spread is on an exchange (the exchange fees piece makes the same point about quotes). And each system needs a token allowance first. CoW’s orders draw on an ERC-20 approval granted to its vault relayer contract, UniswapX’s on an approval to Permit2, and that approval is an ordinary on-chain transaction, made once per token and paid in gas as what gas is describes.
MEV does not vanish under either design. It moves to the competition among the parties filling the order. CoW’s MEV protection page says that because users do not submit their swaps on-chain themselves, they are not directly exposed to public-mempool MEV in the way ordinary swaps are, and that the winning solver bears the risk of finding a settlement within the signed limits. UniswapX’s list of key terms is plainer about who those parties are: fillers “may also be called market makers, searchers, solvers, or MEV bots”. The firms able to trade around a swap are the ones bidding to fill it, and the user’s protection is that they must outbid one another for the order, not trade against it in the mempool.
What the contract enforces, and what it leaves out
An intent limits what the user can lose to the signed terms and leaves everything above them to the auction. CoW’s competition rules make the division explicit, in three tiers. The contract enforces the limit price, and that the solver submitting the settlement is on an allowlist. CoW’s off-chain infrastructure enforces how bids are scored and winners chosen. A third tier of “social consensus” rules is enforced by governance, among them that solutions be no worse than what a set of baseline on-chain pools would have given, with penalties or slashing at the DAO’s discretion. The minimum is guaranteed by code. The improvement on top of it depends on a competition that cannot be inspected from the signing screen; on UniswapX the same role falls to the permissioned quoters and the cosigner.
Solvers never hold users’ approvals. The vault relayer documentation explains why allowances go to a separate contract that can move tokens only to the settlement contract, and only as part of a trade: solvers reach liquidity through arbitrary calls from the settlement contract, and approvals given to it directly would let a malicious solver drain users through those calls. The calls do reach whatever the settlement contract itself holds, so solvers must be allow-listed and vouched for by a bonding pool. Under the bonding pool rules, a pool is a Safe whose only signer is a CoW DAO Safe, funded with $500,000 in (yield-bearing) stablecoins and 1,500,000 COW tokens. A reduced pool starts at $50,000 in stablecoins or ETH and 500,000 COW and builds over a year to $100,000 and 1,000,000 COW, and a solver in one is still formally vouched for under CoW DAO’s own pool.
Two cases show the bond at work. On 7 February 2023 the Barter solver, whitelisted eleven days earlier, had left an approval in place on an old contract that allowed arbitrary calls, and an attacker used it to take $166,183 from the settlement contract, which the proposal describes as CoW Swap’s accrued fees of the previous seven days. The solver repaid the amount within hours and the DAO voted to slash the bond (CIP-22). On 7 November 2024 a flawed contract deployed by the GlueX solver let bots withdraw $76,783 from the settlement contract’s balances (CIP-55). That proposal says no user funds were at risk, because the settlement contract holds only gas and protocol fees, and only for a while. Both losses fell on the protocol rather than on traders, both came through a solver’s own code, and in both the slashing went through the kind of token-holder vote described in what a DAO is.
The other route goes around the protocol altogether. On 14 April 2026, according to a CoW DAO proposal for discretionary grants to the victims, attackers took control of the cow.fi domain for about four and a half hours through social engineering at its domain registrar, and served a site that asked visitors to sign malicious messages and transactions; the core team estimated that user funds worth about 1.2M USDC were taken (CIP-86). A request to sign is only as sound as the page that produced it, the mechanism wallet drainers sets out.
Intents between chains
The same pattern now carries orders across chains, where a solver may do the work on one chain and be paid on another. A draft standard, ERC-7683, proposes a common way for solvers to read such orders, and states its own limit: it “does not standardize or guarantee the security of the protocol that ultimately settles the order”. Settling across chains needs one chain to accept that something happened on another, which is the decision cross-chain bridge hacks examines. DefiLlama files at least one such system in its Bridge category: NEAR Intents, which held $151.8M as of 22 November 2026, per DefiLlama.
Before signing an intent
A trade signed as a message deserves the reading a transaction would get,
because it moves tokens just the same. Start with the verifying contract. A CoW
order is EIP-712 typed data whose domain is named “Gnosis Protocol”, version
“v2”, with the settlement contract as verifier (signing
schemes), and
CoW’s contracts repository lists that contract at
0x9008D19f58AAbD9eD0D60971565AA8510560ab41 on each network it
records. A
UniswapX order is a Permit2 signature instead.
Then read the receiver. In a CoW order the zero address means the signer, and any other address gets the proceeds. The buy amount, or the floor of the decay, is the worst result the order allows; the expiry is how long a solver may wait for a better one. Behind every order sits a standing allowance to the vault relayer or to Permit2, which outlives the trade, as what a wallet connection approves explains, and which can be revoked.
Once filled, a CoW settlement appears on-chain as one transaction from the solver to the settlement contract, often carrying several users’ trades at once; how to read a block explorer shows how to open one and find the transfers inside it.