ByAUJay
Summary: Intents help users articulate their desired outcomes, while protocols and solvers handle the complex tasks. This guide is here to help decision-makers create and launch a solid “intent compiler” that transforms business goals into efficient, MEV-aware, cross-chain transactions using the latest standards (ERC-7683), top execution venues (CoW Protocol, UniswapX, 1inch Fusion+), and privacy-friendly order flow (SUAVE/MEV-Share).
From Outcome to Transaction: Building an “Intent Compiler” for Web3
Intents are really shaking up the blockchain user experience. Instead of figuring out the nitty-gritty, users simply state what they want, and the infrastructure takes care of the rest. Fast forward to 2025--this isn't just some far-off idea anymore. Platforms like UniswapX, CoW Protocol, 1inch Fusion+, and Across are making intent execution a reality at scale. Plus, with ERC‑7683 and the Open Intents Framework (OIF) setting the stage for standardized cross-chain flows, it’s a game changer.
If you’re running a startup or part of a larger enterprise, what you really need is an “intent compiler.” This tool acts as that vital link, turning broad goals (like “rebalance USDC from Ethereum to Base and Arbitrum by 4pm with <10 bps slippage”) into smooth, verifiable transactions. Check out more details over at (docs.uniswap.org).
Here’s a solid, actionable guide we follow at 7Block Labs to create and launch intent compilers that are cross-chain compatible, cost-efficient, and designed to minimize MEV exposure--all while hitting those enterprise-grade SLOs.
Why an intent compiler now?
- Standards are here to stay: ERC‑7683 (Cross‑Chain Intents) lays out some essential structures and interfaces like CrossChainOrder, Settler, fillerData, and resolve() so different systems can work together and share solver networks. OIF is taking this spec and turning it into modular code and reference infrastructure that major L2s are backing up. You can check it out here: (eips.ethereum.org).
- Execution venues are leveling up:
- CoW Protocol: This one’s all about the signed “intent to trade,” featuring batch auctions, solver competition, EBBO guarantees, and even MEV shielding by bringing solver risk in-house. Learn more at (docs.cow.fi).
- UniswapX: They’ve got off‑chain Dutch auction orders using permit2, with chain-specific auction types. Plus, V2 is taking over from V1 (which officially retired on July 22, 2025). Don’t miss out on the details at (docs.uniswap.org).
- 1inch Fusion+: This one’s all about gasless, resolver-filled, intent-based cross‑chain swaps that come with atomic guarantees. Curious? Check out the scoop at (blog.1inch.com).
- Across Settlement: Here you’ve got a modular settlement layer for those cross‑chain intents. It features optimistic, aggregated verification and lets relayers get paid back on the chain they choose. More info is available at (across.to).
- Privacy and order flow: With SUAVE/MEV‑Share, we’re seeing private, programmable order flow auctions and some shared sequencing tools that aim to cut down on extractive MEV while redistributing value. Dive deeper into this topic at (writings.flashbots.net).
What exactly is an “intent compiler”?
An intent compiler takes in what a user wants to achieve (that's their goal plus any constraints they have), processes it into an intermediate representation (IR), and then goes through a bunch of optimization steps (like pricing, risk assessment, MEV/privacy concerns, and routing). It’s designed to target several different “backends” such as CoW, UniswapX, Fusion+, and ERC‑7683 settlers on Across/OIF. When it comes to execution, it works with solver networks and settlement proofs. You can think of it like LLVM, but for outcomes: parse → optimize → generate execution → verify → settle.
Architecture blueprint
1) Intent schema: typed, signable, and composable
Define intents using EIP‑712 typed data to allow users and organizations to sign structures that are easy to read, while ensuring replay protection and separating domains. This approach works for both EOA signatures and ERC‑1271 contract signatures, making it perfect for Safes, treasury policies, and DAO signers. Check out the full details on 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}
When it comes to EVM token permissions, you can leverage Uniswap’s Permit2. This nifty tool allows you to combine token approvals with the order “witness” in just one signature. It really helps to cut down on user experience friction and lowers the risk involved in approvals. Check it out here: (docs.uniswap.org).
Example (pseudo‑DSL):
# Sample syntax structure
function greetUser(name) {
print("Hello, " + name + "!")
}
# Using the function
greetUser("Alice")
In this example, we’ve got a simple function called greetUser that takes a name as a parameter and prints out a friendly greeting. When we call greetUser("Alice"), it’ll display “Hello, Alice!” on the screen.
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 fits perfectly with the CrossChainOrder/ResolvedCrossChainOrder from ERC‑7683 and the “witness” signing from permit2. Check it out here: (erc7683.org).
2) Intermediate Representation (IR) and validation passes
Normalize Intents into an IR Your Compiler Can Analyze and Transform
Normalizing intents is a key step in making sure your compiler can effectively analyze and transform code. Here’s how to go about it:
- Understand Your Intents: Before you dive into normalization, take some time to clearly define what each intent means. Knowing the purpose will guide you through the normalization process.
- Standardize Formats: Make sure all your intents follow a consistent format. Whether you're working with JSON, YAML, or something else, keeping it uniform helps your compiler do its job effectively.
- Identify Common Patterns: Look for recurring themes or patterns in your intents. Grouping similar intents can simplify things down the line and make your IR (Intermediate Representation) cleaner.
- Create a Mapping: Develop a mapping strategy for how each intent translates into your IR. This will help your compiler understand how to handle the various intents during analysis.
- Implement Normalization Logic: Now it’s time to code! Write the logic that takes your intents and normalizes them according to the rules you've set. This usually means creating functions or modules that can handle the transformations.
- Test Your Normalization: Once you've got your normalization logic in place, run some tests to see if it’s working as expected. You want to ensure that all intents are correctly converted into the desired IR format.
- Refine and Iterate: Based on your tests, refine your normalization process. Sometimes it takes a few rounds of adjustments to get it just right.
By following these steps, you’ll create a normalized set of intents that your compiler can easily analyze and transform, making the entire process smoother and more efficient.
For more detailed information, you might want to check out some resources on compiler design and intent mapping. Happy coding!
- Static checks: Keep an eye on token decimals, chain IDs, and make sure deadlines are set after the current time. Also, look out for solvability hints.
- Signature & auth: We’re talking EIP‑712 digest, verification via ERC‑1271, and making sure the permit2 witness ties in with nonce/deadline parity. You can find more info here.
- Risk constraints: Think about slippage envelopes, partial-fillability, and capping on time/latency. For example, check out how UniswapX has its Dutch decay windows set up by chain, and the batch closing cadence for CoW. More details are available here.
- Policy evaluation: Don’t forget to consider KYC-gated receivers, any sanctioned addresses, and the limits on portfolio allocations. This is all powered by an off-chain policy engine that feeds “allow/deny” status into the IR.
3) Optimization passes
- Route selection:
- Single‑chain swaps: When you're choosing between CoW, UniswapX, and on-chain AMMs with protect relays, think about using CoW for batch price improvements and EBBO. If you're leaning towards exclusive Dutch auctions and fillers for sourcing private inventory, UniswapX is your go-to. Check out more details here: (docs.cow.fi).
- Cross‑chain: For cross-chain transactions, it's best to go with ERC‑7683 settlers (Across). This way, you can tap into shared filler liquidity, make use of optimistic batched verification, and ensure relayer repayment on the destination chain. More info can be found at (across.to).
- Fusion+: If you're in need of atomic cross‑chain guarantees and want to bring in resolver competition using Dutch auctions and fee abstraction, Fusion+ has got your back. Dive deeper into it here: (help.1inch.io).
- Privacy & MEV:
- Whenever you can, make your submissions through SUAVE/MEV‑Share. This keeps your order details encrypted until the settlement is complete and helps to redistribute OFA value back to users and wallets. Find out how this works at (writings.flashbots.net).
- Consider using batch auctions to take care of MEV and level the playing field by eliminating ordering advantages. This results in uniform clearing prices on CoW. Check it out here: (docs.cow.fi).
- Cost models:
- Don't forget to factor in relayer capital costs (floating until repayment), gas costs that fillers cover (for that gasless user experience), and the spread that solvers manage. For UniswapX V2/V3 Dutch order parameters, you can tweak nonlinear decay and cosigners to find the right balance between speed and price. More details can be found at (docs.uniswap.org).
4) Backend targets (codegen)
Your compiler needs to generate one or more execution targets, and each of these targets should come with its own builder:
- CoW Protocol
- You can create EIP‑712 CoW orders with appData, an EBBO flag, and even partial-fillability or programmatic orders (like TWAP/conditional) when needed. Don’t forget to batch them up to take advantage of the “coincidence of wants.” Check out more info here.
- UniswapX
- Generate Dutch orders that suit chain-specific auction types (think “Exclusive Dutch” on Ethereum, and “Priority Gas Auction” on Base/Unichain). You’ll sign with Permit2, set your min/max outputs and decay curve, and you can even include RFQ warmup if you want. Dive into the details here.
- 1inch Fusion+
- Make resolver‑fillable Dutch orders. If you're doing cross-chain stuff, use the Fusion+ atomic flow. Just remember to gate eligible resolvers according to the latest governance policy. As a side note, there was a proposal back in October 2025 aiming to drop the 5% UP threshold and lean towards NFT‑based due diligence. More on this here.
- ERC‑7683 Settlers (Across/OIF)
- Build a CrossChainOrder with legs and fillerData. For validation, use resolve(), manage escrow through the settler, and implement optimistic repayment batching (1-2 hours) to help cut down on gas costs per fill. You'll find additional info here.
- SUAVE/MEV‑Share
- Wrap your order flow in OFA preferences, add some privacy hints, and set up refund rules to share any surplus with users and order flow providers. If you want to know more, check the details here.
5) Solver network orchestration
- Open vs Permissioned: So, when it comes to CoW solvers, think of them as bonded third parties that are all about competing in batch auctions. On the flip side, you've got UniswapX fillers that operate in a permissionless manner in V2. Then there's 1inch, which relies on verified resolvers and is constantly updating its access policies. It’s a good idea to build adapters for each type and keep track of a performance ledger. Check out more details in the docs.
- Health Metrics: Keep an eye on key metrics like win-rate, the average surplus delivered compared to the AMM baseline, fill latency, revert rate, and any compliance incidents. It’s best to stick with solvers that use private relays and do a solid job of refunding OFA value.
- Circuit Breakers: You want to make sure things fail fast, right? Start with exclusive RFQ windows and shift to open auctions as needed. If things get dicey, downgrade to EBBO-only settlements. And if those cross-chain queues get too backed up, don’t hesitate to switch to an alternative settler.
6) Security model and key management
- Signatures: Let's make sure we're enforcing EIP‑712 across all processes and giving a nod to ERC‑1271 for smart accounts. Check it out here: (eips.ethereum.org).
- Approvals: To cut down on token approval risks, we can use Permit2 for witness signing along with short-lived nonces and deadlines. Don’t forget to clearly show “who can spend what until when.” More details are available here: (docs.uniswap.org).
- Post‑Pectra AA: If you're tapping into EIP‑3074 for delegated execution (like sponsored gas or batch actions), be sure to use audited invokers and keep a strict eye on revocation. Remember, 3074 could introduce new drain risks if those invokers aren't up to snuff or turn out to be malicious (the spec gives a heads-up about this risk). More info can be found here: (eips.ethereum.org).
- Settlement risk: With ERC‑7683 in play, it's crucial to assess the settler’s verification and finality trust assumptions. Your compiler should be scoring settlers based on the proof models (optimistic, ZK, TEE, native L2 proofs) and repayment guarantees. Dive into it here: (eips.ethereum.org).
7) Observability, SLOs, and governance
- Core SLOs: We’re aiming for a 99% fill rate in under N minutes, ensuring that there are no failed on-chain user transactions (thanks to our gasless user experience), improving prices compared to the on-chain AMM baseline, and wrapping up cross-chain tasks within the deadline.
- Telemetry: We’ll be keeping an eye on the surplus per venue (like CoW batch surplus and the slippage saved from UniswapX Dutch), tracking latency bands for each settler, and monitoring solver reputation along with any refunds (shoutout to MEV-Share!).
- Governance inputs: We’ve got to consider our on/off-ramp wallets, the tokens that are allowlisted, any sanction lists, and KYC tags for those receivers.
A) Cross‑chain treasury rebalance in 15 minutes or less
Goal
We're aiming to transfer $2.5M USDC from Ethereum to Base and Arbitrum, split 60/40. Our targets? Keep the total cost under 10 basis points and ensure that 95% of the transactions are wrapped up in under 15 minutes.
Compiler Plan
- First up, we're going to encode as an ERC‑712 intent using
crossChain.legsfor both Base and Arbitrum. We’ll sign this with Safe (ERC‑1271). You can find more about it here. - Next, let’s go with ERC‑7683 and the AcrossOriginSettler to handle our shared filler liquidity. This way, we can do optimistic, batched verification. Plus, the repayment to the destination chain helps keep those relayer capital costs down. Check it out here.
- For privacy, we’re looking at SUAVE OFA with a user refund split of 60/40 between the user and the wallet. If SUAVE isn’t available, we’ll fall back on builders with a private relay.
- Finally, we’ll do some SLA checks: if the Base leg hits
maxLatencySec, we’ll switch to a Fusion+ atomic swap just for that leg.
Why it works
ERC‑7683 orders can be easily read by any compliant filler. What’s cool is that Across’s aggregated verification spreads out the gas costs, which means it can consistently provide median fills in less than a minute, even when handling a large volume of transactions. You can check out more details here.
B) Enterprise FX: ETH→USDC on Ethereum with MEV shielding
Goal: Swap 4,000 ETH to USDC on Ethereum
Hey there! The plan here is to swap 4,000 ETH for USDC by the end of the trading day. We want to make sure we keep the price impact as low as possible and avoid any sandwich attack risks.
Compiler Plan
- We're gonna emit a CoW order with an EBBO guarantee. It's cool because partial fills are allowed, plus we’ll have a batch auction to handle the coincidence-of-wants and the solver's private inventory. Check out more details here.
- We’ll be enforcing slippage bps and deadlines in the intent. Here’s the deal: solvers will take on the MEV risk, so you won’t have to worry about it! More info can be found here.
C) Gasless retail checkout across Base
Goal:
Convert USDC.e on Base to stable at the best price, without needing any native gas, and wrap it all up within 90 seconds.
Compiler Plan:
- Create a UniswapX Dutch order that uses the Permit2 witness, along with Base-specific "Priority Gas Auction" settings. In this setup, fillers will cover gas fees, while the user will take care of the all-in payment using the output token. Check out the details here.
Implementation notes, gotchas, and emerging best practices
- Stick to the standards when you can:
- Check out ERC‑7683 for cross‑chain stuff; it's smart to use
resolve()to pre‑validate orders off-chain, so your filler integration stays light. (eips.ethereum.org) - For approvals, go with Permit2; make sure the witness has the full order struct. This way, the signature really ties the approval to the intent. (erc7683.org)
- Check out ERC‑7683 for cross‑chain stuff; it's smart to use
- Don’t forget about chain-specific auctions:
- UniswapX has different auction setups depending on the chain (like Exclusive Dutch on Ethereum, Dutch on Arbitrum, and Priority Gas on Base/Unichain). Your compiler should adjust decay curves and exclusivity windows based on the chain. (docs.uniswap.org)
- Programmatic orders are a game-changer for cutting down operational hassle:
- CoW’s Programmatic Order Framework (ComposableCoW) is the way to go. It allows you to set up TWAPs, stop losses, and DAO automations with just O(1) gas for creating, replacing, or deleting orders and validating with ERC‑1271. Perfect for treasury runbooks. (docs.cow.fi)
- Stay on top of deprecations:
- Just a heads-up: UniswapX V1 endpoints were retired on July 22, 2025. Make sure to integrate V2/V3 (think nonlinear decay and cosigners). (api-docs.uniswap.org)
- Manage solver access and keep an eye on competition:
- CoW solvers are bonded and in a competition for surplus. 1inch resolvers are verified and governance-tuned (and don’t forget about the Oct 2025 proposal to drop the 5% UP threshold in favor of NFT-based due diligence); UniswapX fillers are open for anyone. Your compiler should pick the best venue based on intent and keep a running scorecard. (docs.cow.fi)
- Settlement trust model is a cool feature:
- With ERC‑7683, the settler is the one defining the verification economics. Across’s aggregated optimistic verification saves gas by paying relayers in batches; just measure the latency/capital tradeoff and make it user-friendly. (across.to)
- Privacy budget is key:
- SUAVE/MEV‑Share give you control over data-sharing policies and refunds. When those aren’t available, lean towards private relays and batch auctions (CoW) to minimize info leaks. (docs.flashbots.net)
- Keep your post-Pectra AA hygiene in check:
- If you’re going for EIP‑3074 for “sponsored” flows, make sure to prioritize invoker safety, have explicit scopes for each call, and create a smooth revocation experience. The EIP itself sounds a warning about insecure or buggy invokers--so definitely make revocation one-click easy in your wallet. (eips.ethereum.org)
A reference pipeline (what to build first)
- Parse and Validate (Day 1)
- EIP-712 domain and typed data; plus, ERC-1271 makes those smart account checks.
- Permit2 approval and witness coupling are set up for any token flow. (docs.uniswap.org)
2) Multi-backend Emitters (Week 2-4)
- CoW Order Emitter: This one's all about CoW orders--whether you're looking at market, limit, or TWAP through ComposableCoW. You can dive into the details here: docs.cow.fi.
- UniswapX Dutch Emitter: This emitter features chain-specific auction types and V2 parameters. For more info, check out the full rundown: docs.uniswap.org.
- ERC-7683 Order + Across Settler Integration: We’ve got resolve() set up for a smooth pre-flight check and you’ll have control over repayment destinations too. Get the specifics here: eips.ethereum.org.
3) Privacy & MEV (Weeks 4-6)
- We’ve got the SUAVE/MEV-Share OFA integration rolling out, complete with refund splits and backup options to private relays. Check it out for more details! (docs.flashbots.net)
4) Orchestration (Weeks 6-8)
- Setting up a solver reputation store, scoring venues, and implementing circuit breakers and retry mechanisms.
- Creating SLO dashboards to monitor fill times, compare surplus to AMM, and track failure rates.
5) Governance & Compliance (Parallel)
- Allowlists and denylists
- Policy bundles tailored for each entity
- Auditor hooks
How this improves KPIs you care about
- Cost: When it comes to saving some bucks, batch auctions (CoW) and Dutch fillers (like UniswapX/Fusion+) really shine, offering better prices than your usual AMM routing. Plus, ERC‑7683 settlers help spread out the verification gas costs across different fills. Check out the details here.
- Speed: Users can enjoy near-instant cross-chain fills, while relayers take care of the reconciliation part later on (you know, across repayment on whatever chain the relayer prefers). Find out more about it.
- Reliability: Say goodbye to gas fees and failed transactions! With UniswapX/CoW/Fusion, fillers cover the gas costs, so you won't be left hanging if something goes wrong. Here's more info for you.
- Security: Your exposure to MEV risks is lower thanks to private order flow and batch auctions. Plus, with the Permit2 witness, you can minimize approval risks. Dive into the security details here.
Closing thought: ship the compiler, not another router
“Intent‑centric” isn’t just some trendy term--Anoma and others are showing us that intents can be the go-to foundation for our apps. We’re talking about stuff like generalized intents, discovering counter-parties, and handling solving and settlement as key features. But let’s be real: most teams don’t need to reinvent the wheel with a new layer 1. What they really need is a compiler that can work with the existing standards and backends.
Think about it: build the parsing, optimization, and multi-backend code generation once, then just direct it towards CoW, UniswapX, Fusion+, and ERC‑7683 settlers, and throw in SUAVE privacy whenever it’s available. That’s the secret sauce for transforming business outcomes into reliable transactions by 2025. Check it out for more at anoma.net.
Appendix: quick links to the moving parts you’ll integrate
- CoW Protocol: Dive into intents, EBBO, solvers, and programmatic orders (ComposableCoW). Check out the details here.
- UniswapX: Get the lowdown on an overview, chain-specific auctions, and the sunset of V1--time to switch to V2! Plus, learn about Dutch orders featuring Permit2. More info available here.
- 1inch Fusion+: Explore cross-chain capabilities, the Dutch resolver model, and atomic guarantees. You can read all about it in this blog post.
- ERC‑7683 + OIF: Discover the spec, production settlers, and an open framework. Details are waiting for you here.
- SUAVE/MEV‑Share: Check out programmable private orderflow auctions and the refund process. Learn more in this write-up.
- EIP‑3074: Understand how to sponsor/batch using AUTH/AUTHCALL, along with safe invokers and revocation UX. Get the scoop right here.
If you're looking for a solid implementation plan that's ready to roll for your setup, 7Block Labs has got your back. They can help you define the intent IR, pick the right venues based on your use case, and deliver the orchestration and observability that take things to an enterprise level.
Like what you're reading? Let's build together.
Get a free 30-minute consultation with our engineering team.
Related Posts
ByAUJay
Building a Donation-Based Crowdfunding Platform That Gives Tax Receipts
**Summary:** Donation-based crowdfunding that includes tax receipts has become quite the complex puzzle across different regions. You've got to navigate IRS Pub 1771/526 rules, UK Gift Aid declarations, Canada’s CRA receipting, and the new eIDAS/OpenID4VCI wallets--all while keeping everything running smoothly.
ByAUJay
Why 'Full-Lifecycle Advisory' Beats Just Coding
**Summary:** Engineering teams that focus solely on “writing Solidity” often find themselves caught off guard by shifts in protocols, the need for composable security, and the procurement hurdles that are now impacting real ROI. Our full-lifecycle advisory service bridges the gap by connecting EIP-7702 smart accounts, modular decentralized applications (DA), and ZK-based compliance solutions.
ByAUJay
Why Your Project Could Really Use a 'Protocol Economist
Summary: A lot of Web3 teams are missing a crucial player: the “protocol economist.” And you can really see the impact--value slips away through MEV routing, token incentives that are all out of whack, and those sneaky changes to wallets after Pectra that end up messing with the unit economics. In this playbook, we’ll explore what a protocol economist can do to tackle these issues head-on.

