Conversation
…eferring) CI was red because `cargo clippy -- -D warnings` tripped on dead fields in the UniswapXOrder/OrderInput DTOs, an unused import in solver/engine, a let-and-return in the surplus_usd calc, an implicit_saturating_sub in Intent::time_remaining, and an unused `raw` arg in the UniswapX decode stub. All fixed surgically — no behavioural change. On top of the CI fix, add the Across Protocol V3 intent decoder the README promised (`src/intents/across.rs`). The decoder: - Implements the shared `IntentDecoder` trait so it drops into the existing `SolverEngine` alongside UniswapX. - Exposes a pure `decode_deposit_event` path that turns a V3 FundsDeposited-shaped JSON payload into our normalised `Intent`, making it unit-testable without network. - Exposes `RoutingPreferences` with Arbitrum as the default preferred destination — this is the agent-economy hook. When agents settle in a stablecoin (CR8-USD-style), Arbitrum is today's low-fee / deep- liquidity landing chain, so the solver now has a knob to express that preference. - Ships with 5 offline unit tests covering ETH→Arbitrum decoding, default + overridden preferences, unknown-chain rejection, and the raw-bytes `decode()` path via serde_json. Also wires the CLI so `resolver scan --protocol across --chain ethereum` and `resolver solve --protocol across --chain arbitrum` route to the new decoder. — [kcolbchain](https://kcolbchain.com) / [Abhishek Krishna](https://abhishekkrishna.com)
This was referenced Apr 21, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause of CI break
cargo clippy -- -D warningsrejected six things the initial scaffold left behind:ResolverErrorimport insrc/solver/engine.rs.raw: &[u8]parameter inUniswapXDecoder::decode(stub impl).UniswapXOrder(order_status,swapper) and onOrderInput(end_amount) — these are real API fields we'll want for audit/risk/Dutch-decay work, so they're kept with#[allow(dead_code)]and a comment explaining why, rather than deleted.clippy::implicit_saturating_subinIntent::time_remaining— replaced withsaturating_sub.clippy::let_and_returnon thesurplus_f64binding inSolverEngine::evaluate— inlined.rustfmtdrift (import ordering, block bracing). Fixed by runningcargo fmt.All fixes are surgical — no behaviour changes.
What's new
src/intents/across.rs— Across Protocol V3 decoder that the README promised as "Planned". It:IntentDecoder, so it drops into the existingSolverEnginenext to UniswapX.decode_deposit_event— a pure, network-free parse of a V3FundsDeposited-shaped JSON payload into our normalisedIntent. That's what the engine and tests both go through.RoutingPreferenceswithpreferred_dest: Chain::Arbitrumas the default. Solvers that want to prefer Base or Optimism can.with_preferences(...).decode()via serde_json).fetch_open_intentsagainstapp.across.to, but returns an empty list on error rather than propagating, so the engine's cycle loop stays healthy when the API flakes.CLI wired too:
Why it matters for the agent-economy thesis
Agents that settle across chains need intent-based bridging with a preferred landing chain. Across V3 is the protocol for that today; Arbitrum is the landing chain for stablecoin-denominated (CR8-USD-style) agent settlement — cheap gas, deep USDC/USDT liquidity, and the ecosystem the AI-agent economy is building on. This decoder is the first step: every Across deposit flowing Ethereum→Arbitrum now becomes a normalised
Intentthe solver can reason about, with a preference knob that says "this one lands where agents want to be."Next steps (separate PRs):
decode()fallback with real ABI decoding of the V3 event log.SolverEngine::evaluateto weight quotes byRoutingPreferences::prefers.— kcolbchain / Abhishek Krishna