Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_dex_aggregator_split_routing

Calculate optimal trade splits across multiple DEX liquidity pools to minimize price impact on large token swaps. Returns allocation ratios and dollar slippage saved.

Instructions

Multi-Route DEX Aggregator Optimal Trade Split Calculator. Calculate optimal trade splitting across multiple liquidity pools (Uniswap, Curve, Balancer) to minimize price impact on large token swaps. Discipline: CRYPTO. Governing mathematical model / formula: Optimal Split: Allocate trade proportional to pool liquidity depths (x_i / Σ x).

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for deterministic calculation of split_allocation_ratio (Optimal Order Split), aggregate_price_impact (Aggregated Blended Price Impact), single_route_impact (Worst Single-Route Impact (No Split)), dollar_slippage_saved (Value Preserved via Split Routing) using total_swap_size_usd (Total Swap Size ($ USD)), pool1_liquidity_usd (Pool A Reserve Liquidity ($)), pool2_liquidity_usd (Pool B Reserve Liquidity ($)). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.

  • WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.

  • SIBLING ROUTING: Use this dedicated specialist tool for 'Multi-Route DEX Aggregator Optimal Trade Split Calculator' rather than generic dispatchers like omni_universal_query. For cross-discipline dynamic dispatch, see omni_universal_query.

BEHAVIOR & SAFETY:

  • Pure deterministic computation with machine floating-point precision.

  • Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.

  • Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.

RETURNS:

  • Structured JSON object containing:

    • status (string): "success" on valid execution or "error" if validation fails

    • calculator (string): "dex-aggregator-split-routing"

    • category (string): "crypto"

    • name (string): "Multi-Route DEX Aggregator Optimal Trade Split Calculator"

    • formula (string): Governing mathematical formula string

    • inputs (object): Echoed input parameter dictionary with applied defaults

    • metrics (object): Dictionary of computed outputs:

      • metrics.split_allocation_ratio (Optimal Order Split): Formatted display string (e.g. '61.5% Pool A / 38.5% Pool B')

      • metrics.aggregate_price_impact (Aggregated Blended Price Impact): Formatted display string (e.g. '13.3%')

      • metrics.single_route_impact (Worst Single-Route Impact (No Split)): Formatted display string (e.g. '20.0% Impact (Pool A only)')

      • metrics.dollar_slippage_saved (Value Preserved via Split Routing): Formatted display string (e.g. '$6,700.00 Saved')

    • execution_time_ms (number): Latency in milliseconds.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "omni_dex_aggregator_split_routing"
  }
}

Input Schema

NameRequiredDescriptionDefault
pool1_liquidity_usdNoPool A Reserve Liquidity ($). Uniswap v3 primary pool. Default: 400000. Min: 25000. Max: 20000000.
pool2_liquidity_usdNoPool B Reserve Liquidity ($). SushiSwap / Curve secondary pool. Default: 250000. Min: 25000. Max: 20000000.
total_swap_size_usdNoTotal Swap Size ($ USD). Large token trade amount. Default: 100000. Min: 5000. Max: 10000000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

Score is being calculated.

Deploy Server

Other Tools