Skip to content

Add EZ-Path best-execution DEX router integration#1226

Open
infiniteezverse wants to merge 2 commits into
coinbase:mainfrom
infiniteezverse:main
Open

Add EZ-Path best-execution DEX router integration#1226
infiniteezverse wants to merge 2 commits into
coinbase:mainfrom
infiniteezverse:main

Conversation

@infiniteezverse
Copy link
Copy Markdown

Add EZ-Path best-execution DEX router integration

Summary

This PR adds EZ-Path as a native tool in Coinbase AgentKit, enabling autonomous agents to execute best-execution DEX swaps on Base mainnet using x402 v2 USDC micropayments.

What This Adds

  • ezpath_quote tool: Race 0x, ParaSwap, Aerodrome, Uniswap V3, Curve, Balancer, 1Inch, CoW Swap, Synthetix concurrently
  • Three execution tiers: basic ($0.03), resilient ($0.10), institutional ($0.50)
  • Zero gas overhead: x402 v2 USDC payment protocol handles all settlement
  • No API keys: Agents pay directly via USDC on Base mainnet
  • Production-proven: 100+ live transactions, >99% settlement success

Why This Matters

Agents executing swaps need best execution, no gas management, and safety. EZ-Path solves all three:

  • Agents get best prices (multi-venue racing vs single-source)
  • Zero gas overhead (x402 handles everything)
  • Hardcoded security (toll address validation prevents wallet drain)

Technical Details

Architecture

  • Queries 10 DEX venues in parallel with early termination
  • Basic tier: 0x only ($0.03)
  • Resilient tier: 0x + ParaSwap race ($0.10)
  • Institutional tier: all 10 venues with timeout orchestration ($0.50)

Settlement

  • x402 v2 EIP-3009 USDC transfers (no allowance needed)
  • Bazaar facilitator priority + relayer fallback
  • Nonce-deduped to prevent double-spend

Benchmarks

Metric Value
Execution Latency <500ms average
Edge vs 0x Only +47 bps (resilient tier)
Settlement Success >99%
Cost per Quote $0.03-$0.50 USDC

Production Status

References


This is a purely additive integration—zero impact on existing AgentKit functionality.

ez path ts created
@cb-heimdall
Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants