Get the FREE Ultimate OpenClaw Setup Guide →

defi-bridge-route-planner

npx machina-cli add skill auralshin/agent-skills/defi-bridge-route-planner --openclaw
Files (1)
SKILL.md
3.0 KB

DeFi Bridge Route Planner

Purpose

Compare cross-chain transfer options and produce a recommendation with explicit cost/time/risk tradeoffs and quote freshness guarantees.

Is adding a bridge aggregator helpful?

Yes. Aggregators are highly useful as the first discovery layer because they:

  • reveal more route candidates (bridges + solvers) quickly,
  • improve price competition,
  • reduce manual route-by-route querying.

But aggregators should not be the only source. For high-value transfers, cross-check at least one direct bridge quote before final recommendation.

External dependency profile

  • Dependency level: High for live route quality.
  • Primary sources: bridge aggregators and solver quote APIs.
  • Secondary sources: direct bridge quote endpoints.
  • Validation/backfill: chain RPC gas estimates and route status pages.
  • Offline fallback: cost-modeling only on user-supplied route snapshots.

Use this skill when

  • The user wants to bridge assets across chains.
  • The user asks for cheapest, fastest, safest, or balanced route.
  • The user needs route comparison with fees, slippage, ETA, and risk.

Workflow

  1. Capture transfer intent (token, amount, source chain, destination chain, urgency, objective).
  2. Fetch route candidates from aggregators first. See references/aggregator-integration.md.
  3. Cross-check with direct bridge quotes for major candidates.
  4. Score routes with scripts/route_cost_model.py using objective + risk limit.
  5. Apply risk checks from references/risk-checklist.md.
  6. Return ranked options and recommended route, including quote freshness and caveats.

Data quality rules

  • Treat expired quotes as ineligible.
  • Reject routes above user risk tolerance.
  • Always surface canonical vs wrapped destination token behavior.
  • Show total cost decomposition (fees/slippage/gas).

Required output format

{
  "intent": {
    "from_chain": "string",
    "to_chain": "string",
    "token": "string",
    "amount": 0,
    "objective": "cheapest|fastest|safest|balanced"
  },
  "route_options": [
    {
      "route_name": "string",
      "bridge_or_solver": "string",
      "quote_source": "aggregator|direct_bridge",
      "estimated_receive_amount": 0,
      "total_cost_usd": 0,
      "estimated_time_minutes": 0,
      "risk_level": "low|medium|high",
      "quote_age_seconds": 0,
      "quote_valid": true,
      "risk_notes": ["string"]
    }
  ],
  "recommended_route": {
    "route_name": "string",
    "reason": "string"
  },
  "critical_warnings": ["string"]
}

Bundled resources

  • references/aggregator-integration.md
  • references/risk-checklist.md
  • references/route-selection-policy.md
  • scripts/route_cost_model.py
  • assets/route-options-template.csv

Source

git clone https://github.com/auralshin/agent-skills/blob/main/skills/defi-bridge-route-planner/SKILL.mdView on GitHub

Overview

DeFi Bridge Route Planner helps you evaluate cross-chain transfer options from aggregators and direct bridges. It produces explicit cost, ETA, and risk tradeoffs with quote freshness guarantees to inform a final recommendation.

How This Skill Works

Capture the transfer intent (token, amount, source/destination chains, urgency, objective). Then fetch route candidates from bridge aggregators and cross-check major candidates with direct bridge quotes. Finally score the routes using scripts/route_cost_model.py under your objective and risk limits, apply risk checks from risk checklist, and return ranked options with quote freshness and caveats.

When to Use It

  • You want to bridge assets across chains and need a broad set of route options discovered quickly.
  • You want Cheapest, Fastest, Safest, or Balanced route objectives and need a clear ranking.
  • You require route comparison with fees, slippage, ETA, and risk for an informed decision.
  • Quote freshness matters and you need explicit freshness guarantees for the selected route.
  • You should validate top aggregator options with at least one direct-bridge quote before finalizing.

Quick Start

  1. Step 1: Capture transfer intent (token, amount, from_chain, to_chain, urgency, objective).
  2. Step 2: Fetch route candidates from aggregators, then cross-check major candidates with direct bridge quotes.
  3. Step 3: Review ranked options with quote freshness, apply risk checks, and select the recommended route.

Best Practices

  • Start by querying bridge aggregators first to surface a wide set of route candidates quickly.
  • Do not rely on aggregators alone; cross-check the top candidates with direct bridge quotes.
  • Score routes with scripts/route_cost_model.py using objective and risk limits.
  • Apply risk checks from references/risk-checklist.md to filter out high-risk options.
  • Show total cost decomposition (fees, slippage, gas) and surface quote freshness and caveats.

Example Use Cases

  • Example 1: Bridge 10,000 DAI from Ethereum to Polygon. Use aggregator quotes to identify multiple routes, then cross-check a top option with a direct bridge quote and choose the lowest total cost (fees+slippage+gas) while meeting the ETA target.
  • Example 2: Fastest 5-minute transfer of ETH from Ethereum to Solana with low risk. Prioritize routes with the shortest estimated time and acceptable risk, verified against direct quotes.
  • Example 3: Balanced 50,000 USDC from BSC to Avalanche for a medium-risk profile. Compare several routes, balancing cost, speed, and risk to select a reliable option.
  • Example 4: High-value transfer requiring direct-quote validation. After aggregator discovery, obtain direct quotes for the top candidates to confirm pricing and freshness before finalizing.
  • Example 5: Offline fallback scenario. If quotes expire or offline, rely on route_cost_model.py cost modeling using user-supplied route snapshots.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers