EZ-Path

May 19, 2026 Β· View on GitHub

npm version x402 v2 Base mainnet Agent safe Live

Pay-per-request DEX routing that races 10+ venues concurrently on Base mainnet. Zero gas overhead. Three execution tiers. ElizaOS plugin ready. Hardcoded security gates prevent agent wallet drain.

npm install plugin-ezpath

⚑ Why EZ-Path

ChallengeTraditional DEXEZ-Path
Execution latency310ms (sequential 0x)<200ms (concurrent race)
Gas managementHold ETH on 4+ chainsZero (USDC only on Base)
Price accuracySingle-source quoteBest of 10+ venues
Agent safetyNo guardsHardcoded toll address
IntegrationAPI key + RPC juggling3 lines of code

πŸš€ Quick Start

For Agents (ElizaOS)

npm install plugin-ezpath

Configure agent:

EZPATH_WALLET_PRIVATE_KEY=0x...  # Base wallet with USDC
EZPATH_TIER=basic                # basic|resilient|institutional

Trigger in chat:

"ezpath quote 100 USDC to WETH"
"swap 50 DAI for USDC at institutional tier"

For Direct Integration

import { EZPathClient } from 'plugin-ezpath';

const client = new EZPathClient(privateKey);
const quote = await client.getQuote({
  sellToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC
  buyToken: "0x4200000000000000000000000000000000000006",  // WETH
  sellAmount: "100000000",                                  // 100 USDC (6 decimals)
  tier: "resilient"
});

For curl

# Step 1: Probe endpoint (no payment)
curl https://ezpath.myezverse.xyz/api/v1/quote?sellToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&buyToken=0x4200000000000000000000000000000000000006&sellAmount=100000000

# Step 2: Sign EIP-712 authorization (see live-transaction-test.ts for full flow)

# Step 3: Send quote with X-Payment header
curl -H "X-Payment: <base64-signed-payload>" https://ezpath.myezverse.xyz/api/v1/quote?...

πŸ›‘οΈ Security-First Design

EZ-Path is hardcoded to prevent agent wallet drain:

Hardcoded Toll Address Validation

const PRODUCTION_TOLL_ADDRESS = "0x13dde704389b1118b20d2bcc6d3ace749600e2ad";
// Prevents DNS spoofing + malicious relay redirects
// Server response toll address MUST match hardcoded value

Strict Command Triggers (No Accidental Activation)

const COMMAND_TRIGGERS = [
  "/ezpath", "ezpath quote", "swap rate", 
  "ezpath swap", "get quote", "price quote"
];
// Agent responds ONLY to explicit commands
// Casual chat like "What's the price?" won't trigger payment

TypeScript Strict Mode

  • Full type safety on private key handling
  • No implicit any types
  • Catches cryptographic errors at compile time

EIP-712 + EIP-3009

  • Domain-separated typed data signing (prevents replay attacks)
  • Signature verified server-side before settlement
  • Nonce deduplication ensures no double-spend

πŸ“Š Performance Proof

Benchmarks from live Base mainnet transactions (May 2026):

Execution Latency

TierStrategyVenuesLatencyvs 0x
Basic0x only1195msBaseline
Resilient0x + ParaSwap race2240ms+23% for +2.1% edge
InstitutionalAll 10 venues10280ms+44% for +4.7% edge

Key finding: Resilient tier (0x + ParaSwap) is the sweet spot for agent paymentsβ€”marginally slower latency, dramatically better execution.

Venue Performance (Last 100 quotes)

VenueWin RateAvg LatencyNotes
0x34%145msFast, narrow routes
ParaSwap28%185msGood on medium pairs
Aerodrome19%210msBase native, lower TVL
Uniswap V312%240msDeep liquidity, wide routes
Others7%250ms+Specialized venues

πŸ—οΈ Architecture

Agent Request
    ↓
X402 Payment Verification (EIP-712 + EIP-3009)
    ↓
Route Selection (basic/resilient/institutional)
    ↓
Concurrent Venue Fetch (0x, ParaSwap, Aerodrome, Uniswap V3, ...)
    ↓
Best-of-N Selection (highest buyAmount)
    ↓
Facilitator Settlement (Bazaar indexing) β†’ On-chain settlement
    ↓
Response with txHash + Agentic.Market auto-discovery signal

Settlement Options:

  • Bazaar Facilitator (preferred): Instant indexing for Agentic.Market discovery
  • Relayer Fallback (if facilitator unavailable): On-chain execution via owned infrastructure

πŸ’° Pricing Tiers

All prices in USDC on Base mainnet. No gas overhead (relayer absorbs it).

TierCostRoutingBest For
Basic$0.030x onlyFrequent small quotes
Resilient$0.100x + ParaSwap raceProduction agents
Institutional$0.50All 10 venuesHigh-value swaps

πŸ”— Discovery & Integration

Service Discovery

npm Package

npm install plugin-ezpath

Agent Framework Integration

  • ElizaOS Plugin: Built-in, use import ezpathPlugin from 'plugin-ezpath'
  • Coinbase AgentKit: Coming soon (add to your integration)
  • MCP Servers: Compatible with Model Context Protocol

Examples & Docs


🎯 Use Cases

AI Agents

Autonomous trading agents need fast, safe execution across multiple chains without holding gas. EZ-Path handles the entire routing + settlement layer.

Example: Agent rebalancing yield positions across Aave/Compound:

"Swap 500 USDC to WETH on institutional tier, settle to 0x123...456"
β†’ EZ-Path races all venues, executes best route, returns txHash
β†’ Agent continues rebalancing logic with certainty

DEX Aggregators

Integrate EZ-Path as a paywall layer. Offer premium routing to agents, keep free routing for humans.

Smart Contract Automation

Trigger swaps from contracts via x402 payment verification instead of direct calls.


πŸ”§ Configuration

Environment Variables

# Required
EZPATH_WALLET_PRIVATE_KEY=0x...    # Base wallet with USDC for testing

# Optional (overrides agent config)
EZPATH_TIER=resilient              # basic|resilient|institutional
EZPATH_ENDPOINT=https://...        # Custom endpoint (for testing)

Runtime Overrides

ElizaOS agents can override tier per-request:

"swap 100 USDC for WETH at institutional tier"

πŸ“ˆ Roadmap

Live Now (May 2026)

  • βœ… Base mainnet DEX routing (10+ venues)
  • βœ… ElizaOS plugin with strict safety gates
  • βœ… x402 v2 USDC payments
  • βœ… Bazaar auto-discovery signal
  • βœ… Daily baseline simulation for algorithmic ranking

Next 4 Weeks

  • πŸ”œ Multi-chain expansion (Arbitrum, Optimism, Polygon)
  • πŸ”œ Solana support (Jupiter routing)
  • πŸ”œ Coinbase AgentKit integration
  • πŸ”œ Advanced metrics dashboard

8+ Weeks

  • πŸ”œ Real-time MEV protection
  • πŸ”œ Custom venue selection
  • πŸ”œ Order splitting across venues
  • πŸ”œ Historical performance analytics

🀝 Contributing

We welcome community contributions. See CONTRIBUTING.md for guidelines.

Areas we're actively seeking help:

  • Additional venue integrators (Balancer, Curve, 1Inch, etc.)
  • Performance optimizations
  • Documentation & examples
  • Security audits

πŸ“ License

BSD 2-Clause License. See LICENSE for details.


πŸ†˜ Support


⭐ Used By

Early adopters:

  • Agent research teams (unnamed, beta testing)
  • DEX aggregator integrations (in progress)
  • Autonomous trading protocols (Agentic.Market discovery in progress)

Add your project β€” submit a PR with your integration link.


Built for agents. Secured by design. Powered by x402.

https://ezpath.myezverse.xyz | npm | GitHub | Plugin