ByAUJay
Summary: Intents let users describe outcomes while protocols and solvers do the heavy lifting. This guide shows decision‑makers how to design and ship a production‑grade “intent compiler” that turns business goals into optimal, MEV‑aware, cross‑chain transactions using today’s leading standards (ERC‑7683), execution venues (CoW Protocol, UniswapX, 1inch Fusion+), and privacy‑preserving orderflow (SUAVE/MEV‑Share).
From Outcome to Transaction: Building an “Intent Compiler” for Web3
Intents flip blockchain UX on its head: users say what they want; infrastructure figures out how to get it done. In 2025, this isn’t theoretical—UniswapX, CoW Protocol, 1inch Fusion+, and Across power intent execution at scale, while ERC‑7683 and the Open Intents Framework (OIF) standardize cross‑chain flows. If you’re a startup or enterprise, an “intent compiler” is the missing layer that translates high‑level outcomes (e.g., “rebalance USDC from Ethereum to Base and Arbitrum by 4pm with <10 bps slippage”) into optimal, verifiable transactions. (docs.uniswap.org)
Below is a concrete, implementable blueprint we use at 7Block Labs to design and ship intent compilers that work across chains, reduce cost, minimize MEV exposure, and meet enterprise‑grade SLOs.
Why an intent compiler now?
- Standards are real: ERC‑7683 (Cross‑Chain Intents) defines common structs and interfaces (CrossChainOrder, Settler, fillerData, resolve()) so different systems can interoperate and share solver networks. OIF turns the spec into modular code and reference infra supported by major L2s. (eips.ethereum.org)
- Execution venues matured:
- CoW Protocol: signed “intent to trade,” batch auctions, solver competition, EBBO guarantees, and MEV shielding by internalizing solver risk. (docs.cow.fi)
- UniswapX: off‑chain Dutch auction orders with permit2, chain‑specific auction types, and V2 replacing V1 (V1 support ended July 22, 2025). (docs.uniswap.org)
- 1inch Fusion+: gasless, resolver‑filled, intent‑based cross‑chain swaps with atomic guarantees. (blog.1inch.com)
- Across Settlement: modular settlement layer for cross‑chain intents with optimistic, aggregated verification and relayer repayment on the relayer’s chain of choice. (across.to)
- Privacy and orderflow: SUAVE/MEV‑Share provide private, programmable orderflow auctions and shared sequencing primitives to reduce extractive MEV and redistribute value. (writings.flashbots.net)
What exactly is an “intent compiler”?
An intent compiler ingests a user’s outcome (goal + constraints), compiles it into an intermediate representation (IR), runs optimization passes (pricing, risk, MEV/privacy, routing), targets multiple “backends” (CoW, UniswapX, Fusion+, ERC‑7683 settlers on Across/OIF), and manages execution via solver networks and settlement proofs. Think of it as LLVM for outcomes: parse → optimize → generate execution → verify → settle.
Architecture blueprint
1) Intent schema: typed, signable, and composable
Define intents as EIP‑712 typed data so users and organizations can sign human‑readable structures with replay protection and domain separation. Support both EOA signatures and ERC‑1271 contract signatures (for Safes, treasury policies, and DAO signers). (eips.ethereum.org)
Recommended top‑level fields:
- goal: enum {swap, bridge, crossChainSwap, rebalance, payout, custom}
- assets: {from: token, to: token, chainFrom, chainTo}
- amounts: {input, minOutput | maxCost}
- deadline: unix timestamp
- privacy: {public|private, relay: suave|buildernet|protect}
- MEV: {batch-ok: bool, EBBO: bool, uniformClearing: bool}
- solvableBy: {open|allowlist}, escrow: {permit2|approval}, payFeesIn: {sellToken|sponsor}
- crossChain: {legs[], settler, orderData}
- risk: {maxSlippageBps, maxLatencySec, VaR, counterpartyPolicyId}
For EVM token permissions, use Uniswap’s Permit2 to couple token approval with the order “witness” in a single signature, reducing UX friction and approval risk. (docs.uniswap.org)
Example (pseudo‑DSL):
intent CrossChainSwap { from { token: USDC, chain: Ethereum, amount: 250000 } to { token: USDC, chain: Base, minAmount: 249600 } deadline: 2025-12-01T21:00:00Z privacy: private(suave) mev: { batchOk: true, EBBO: true } fees: payWithSellToken crossChain: ERC7683 { settler: AcrossOriginSettler legs: [ { kind: "bridge", from: Ethereum, to: Base, token: USDC, amount: 250000 } ] orderData: { fillerPrefs: { repayOn: Base } } } risk: { maxSlippageBps: 10, maxLatencySec: 900 } }
This maps cleanly to ERC‑7683’s CrossChainOrder/ResolvedCrossChainOrder and permit2 “witness” signing. (erc7683.org)
2) Intermediate Representation (IR) and validation passes
Normalize intents into an IR your compiler can analyze and transform:
- Static checks: token decimals, chain IDs, deadline > now, solvability hints.
- Signature & auth: EIP‑712 digest, ERC‑1271 verification, permit2 witness cohesion (nonce/deadline parity). (eips.ethereum.org)
- Risk constraints: slippage envelopes, partial‑fillability, and time/latency caps (e.g., UniswapX Dutch decay windows per chain; CoW batch closing cadence). (docs.uniswap.org)
- Policy evaluation: KYC‑gated receivers, sanctioned addresses, portfolio allocation bounds (off‑chain policy engine feeding “allow/deny” into IR).
3) Optimization passes
- Route selection:
- Single‑chain swaps: CoW vs UniswapX vs on‑chain AMMs with protect relays. Use CoW for batch price improvement and EBBO; use UniswapX where exclusive Dutch auctions and fillers can source private inventory. (docs.cow.fi)
- Cross‑chain: prefer ERC‑7683 settlers (Across) to access shared filler liquidity, optimistic batched verification, and relayer repayment on destination chain. (across.to)
- Fusion+: when atomic cross‑chain guarantees and resolver competition are required via Dutch auctions and fee abstraction. (help.1inch.io)
- Privacy & MEV:
- Submit via SUAVE/MEV‑Share when possible to keep order details encrypted until settlement, and to redistribue OFA value to users/wallets. (writings.flashbots.net)
- Use batch auctions to internalize MEV and eliminate ordering advantages (uniform clearing prices on CoW). (docs.cow.fi)
- Cost models:
- Include relayer capital cost (float until repayment), gas inclusion by fillers (gasless UX), and spread captured by solvers. UniswapX V2/V3 Dutch order parameters (nonlinear decay, cosigners) can be tuned to trade off speed vs price. (docs.uniswap.org)
4) Backend targets (codegen)
Your compiler should emit one or more execution targets, each with its own builder:
- CoW Protocol
- Build EIP‑712 CoW orders with appData, EBBO flag, partial‑fillability, programmatic orders (TWAP/conditional) if needed. Batch to leverage “coincidence of wants.” (docs.cow.fi)
- UniswapX
- Emit Dutch orders with chain‑specific auction types (e.g., “Exclusive Dutch” on Ethereum, “Priority Gas Auction” on Base/Unichain). Sign via Permit2; set min/max outputs and decay curve; optionally RFQ warmup. (docs.uniswap.org)
- 1inch Fusion+
- Create resolver‑fillable Dutch orders; for cross‑chain, use Fusion+ atomic flow; gate eligible resolvers via the latest governance policy (note: in Oct 2025, a proposal sought to remove the 5% UP threshold in favor of NFT‑based due diligence). (help.1inch.io)
- ERC‑7683 settlers (Across/OIF)
- Construct CrossChainOrder with legs and fillerData, use resolve() for filler validation, escrow via settler, and optimistic repayment batching (1–2h) to cut per‑fill gas. (eips.ethereum.org)
- SUAVE/MEV‑Share
- Wrap orderflow in OFA preferences, privacy hints, and refund rules to share surplus with users/orderflow providers. (docs.flashbots.net)
5) Solver network orchestration
- Open vs permissioned: CoW solvers are bonded third parties competing in batch auctions; UniswapX fillers run permissionless in V2; 1inch uses verified resolvers and evolving access policies. Build adapters for each and maintain a performance ledger. (docs.cow.fi)
- Health metrics: win‑rate, average surplus delivered vs AMM baseline, fill latency, revert rate, and compliance incidents. Prefer solvers using private relays and refunding OFA value.
- Circuit breakers: fail fast from exclusive RFQ windows to open auction; degrade to EBBO‑only settlement; switch to alternative settler if cross‑chain queues back up.
6) Security model and key management
- Signatures: enforce EIP‑712 across all flows; support ERC‑1271 for smart accounts. (eips.ethereum.org)
- Approvals: minimize token approval risk using Permit2 witness signing and short‑lived nonces/deadlines; explicitly display “who can spend what until when.” (docs.uniswap.org)
- Post‑Pectra AA: if you leverage EIP‑3074 for delegated execution (sponsored gas, batch actions), use audited invokers and strict revocation; 3074 introduces new drains risks if invokers are buggy or malicious (the spec itself calls out this risk). (eips.ethereum.org)
- Settlement risk: with ERC‑7683, evaluate the settler’s verification/finality trust assumptions; your compiler should score settlers on proof model (optimistic, ZK, TEE, native L2 proofs) and repayment guarantees. (eips.ethereum.org)
7) Observability, SLOs, and governance
- Core SLOs: 99% fill < N minutes, 0 failed on‑chain user transactions (gasless UX), price improvement vs on‑chain AMM baseline, cross‑chain completion within deadline.
- Telemetry: per‑venue surplus (CoW batch surplus; UniswapX Dutch slippage saved), per‑settler latency bands, solver reputation and refunds (MEV‑Share).
- Governance inputs: on/off‑ramp wallets, allowlisted tokens, sanction lists, KYC tags for receivers.
Practical examples you can ship this quarter
A) Cross‑chain treasury rebalance in 15 minutes or less
Goal: Move $2.5M USDC from Ethereum to Base and Arbitrum (60/40), targeting <10 bps total cost and 95th percentile completion <15 minutes.
Compiler plan:
- Encode as ERC‑712 intent with crossChain.legs for Base and Arbitrum; sign with Safe (ERC‑1271). (eips.ethereum.org)
- Choose ERC‑7683 + AcrossOriginSettler for shared filler liquidity and optimistic, batched verification with destination‑chain repayment to minimize relayer capital costs. (across.to)
- Privacy hint: SUAVE OFA with user refund split 60/40 user/wallet; fall back to builders with private relay if SUAVE unavailable. (docs.flashbots.net)
- SLA checks: if Base leg hits maxLatencySec, failover to Fusion+ atomic swap for that leg only.
Why it works: ERC‑7683 orders are machine‑readable by any compliant filler; Across’s aggregated verification amortizes gas, consistently delivering sub‑minute median fills at scale. (eips.ethereum.org)
B) Enterprise FX: ETH→USDC on Ethereum with MEV shielding
Goal: Swap 4,000 ETH to USDC on Ethereum by market close, minimize price impact and remove sandwich risk.
Compiler plan:
- Emit CoW order with EBBO guarantee, partial‑fill allowed, and batch auction for coincidence‑of‑wants and solver private inventory. (docs.cow.fi)
- Enforce slippage bps and deadline in intent; solvers take MEV risk, not the user. (docs.cow.fi)
C) Gasless retail checkout across Base
Goal: Convert USDC.e on Base to stable at best price, no native gas required, and settle within 90 seconds.
Compiler plan:
- Generate UniswapX Dutch order with Permit2 witness, Base‑specific “Priority Gas Auction” parameters; fillers pay gas, user pays all‑in in output token. (docs.uniswap.org)
Implementation notes, gotchas, and emerging best practices
- Use standards where possible:
- ERC‑7683 for cross‑chain; implement resolve() to pre‑validate orders off‑chain and keep filler integration thin. (eips.ethereum.org)
- Permit2 for approvals; ensure the witness includes the full order struct so the signature truly binds approval to intent. (erc7683.org)
- Chain‑specific auctions matter:
- UniswapX uses different auction mechanisms per chain (Exclusive Dutch on Ethereum, Dutch on Arbitrum, Priority Gas on Base/Unichain). Your compiler should tune decay curves and exclusivity windows per chain. (docs.uniswap.org)
- Programmatic orders reduce ops toil:
- CoW’s Programmatic Order Framework (ComposableCoW) lets you encode TWAPs, stop losses, and DAO automations with O(1) gas for create/replace/delete and ERC‑1271 validation. Great for treasury runbooks. (docs.cow.fi)
- Keep up with deprecations:
- UniswapX V1 endpoints were sunset on July 22, 2025; integrate V2/V3 (e.g., nonlinear decay, cosigners). (api-docs.uniswap.org)
- Manage solver access and competition:
- CoW solvers are bonded and compete for surplus; 1inch resolvers are verified and governance‑tuned (note the Oct 2025 proposal to remove the 5% UP threshold in favor of NFT‑based due diligence); UniswapX fillers are permissionless. Your compiler should select the best venue per intent and maintain a rolling scorecard. (docs.cow.fi)
- Settlement trust model is a feature:
- With ERC‑7683 the settler defines verification economics. Across’s aggregated optimistic verification cuts gas by repaying relayers in batches; measure the latency/capital tradeoff and expose it as a user‑visible knob. (across.to)
- Privacy budget:
- SUAVE/MEV‑Share let you specify data‑sharing policies and refunds. When unavailable, favor private relays and batch auctions (CoW) to limit information leakage. (docs.flashbots.net)
- Post‑Pectra AA hygiene:
- If you adopt EIP‑3074 for “sponsored” flows, ensure invoker safety, explicit per‑call scopes, and revocation UX. The EIP itself warns about insecure/buggy invokers—build revocation one‑click into your wallet. (eips.ethereum.org)
A reference pipeline (what to build first)
- Parse and validate (Day 1)
- EIP‑712 domain + typed data; ERC‑1271 checks for smart accounts.
- Permit2 approval + witness coupling for any token flow. (docs.uniswap.org)
- Multi‑backend emitters (Week 2–4)
- CoW order emitter (market, limit, TWAP via ComposableCoW). (docs.cow.fi)
- UniswapX Dutch emitter with chain‑specific auction types; V2 parameters. (docs.uniswap.org)
- ERC‑7683 order + Across settler integration; resolve() pre‑flight; repayment destination control. (eips.ethereum.org)
- Privacy & MEV (Week 4–6)
- SUAVE/MEV‑Share OFA integration with refund splits; fallbacks to private relays. (docs.flashbots.net)
- Orchestration (Week 6–8)
- Solver reputation store; venue scoring; circuit breakers and retries.
- SLO dashboards (fill time, surplus vs AMM, failure rate).
- Governance & compliance (parallel)
- Allowlists/denylists; per‑entity policy bundles; auditor hooks.
How this improves KPIs you care about
- Cost: Batch auctions (CoW) and Dutch fillers (UniswapX/Fusion+) deliver price improvement vs naïve AMM routing; ERC‑7683 settlers amortize verification gas across fills. (docs.cow.fi)
- Speed: Cross‑chain fills complete near‑instantly for users while relayers reconcile later (Across repayment on relayer’s chain of choice). (across.to)
- Reliability: Gasless, failure‑free UX (fillers pay gas; failed attempts don’t cost users on UniswapX/CoW/Fusion). (docs.uniswap.org)
- Security: Reduced MEV exposure via private orderflow and batch auctions; minimized approval risk via Permit2 witness. (docs.flashbots.net)
Closing thought: ship the compiler, not another router
“Intent‑centric” isn’t just a buzzword—Anoma and others show intents as the universal app primitive: generalized intents, counterparty discovery, solving, and settlement as first‑class properties. But most teams don’t need a new L1; they need a compiler that speaks the standards and backends that exist today. Build the parsing, optimization, and multi‑backend codegen once—then point it at CoW, UniswapX, Fusion+, and ERC‑7683 settlers, with SUAVE privacy when available. That’s how you turn business outcomes into trustworthy transactions in 2025. (anoma.net)
Appendix: quick links to the moving parts you’ll integrate
- CoW Protocol: intents, EBBO, solvers, programmatic orders (ComposableCoW), SDK. (docs.cow.fi)
- UniswapX: overview, chain‑specific auctions, V1 sunset → use V2; Dutch orders with Permit2 witness. (docs.uniswap.org)
- 1inch Fusion+: cross‑chain, Dutch resolver model, atomic guarantees. (blog.1inch.com)
- ERC‑7683 + OIF: spec, production settlers, open framework. (eips.ethereum.org)
- SUAVE/MEV‑Share: programmable private orderflow auctions and refunds. (writings.flashbots.net)
- EIP‑3074: sponsor/batch via AUTH/AUTHCALL; use safe invokers and revocation UX. (eips.ethereum.org)
If you want a production‑ready implementation plan tailored to your stack, 7Block Labs can help you spec the intent IR, choose venues per use case, and ship the orchestration and observability that make it enterprise‑grade.
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

