{"record":{"id":"758f5412d527a014","repo":"nautechsystems/nautilus_trader","slug":"unsupported-dex-type-dex-type-only-uniswapv3-is","errorCode":null,"errorMessage":"Unsupported DEX type {dex_type}; only UniswapV3 is supported","messagePattern":"Unsupported DEX type (.+?); only UniswapV3 is supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":814,"sourceCode":"            .ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"No registered Uniswap V3 deployment for chain {}\",\n                    self.chain.name\n                )\n            })\n    }\n\n    fn resolve_pool(&self, instrument_id: &InstrumentId) -> anyhow::Result<Pool> {\n        let (blockchain, dex_type) = instrument_id.venue.parse_dex()?;\n        if blockchain != self.chain.name {\n            anyhow::bail!(\n                \"Pool venue chain {blockchain} does not match the client chain {}\",\n                self.chain.name\n            );\n        }\n\n        if dex_type != DexType::UniswapV3 {\n            anyhow::bail!(\"Unsupported DEX type {dex_type}; only UniswapV3 is supported\");\n        }\n\n        let pool_identifier = PoolIdentifier::new_checked(instrument_id.symbol.as_str())?;\n        if !pool_identifier.is_address() {\n            anyhow::bail!(\n                \"Pool identifier {pool_identifier} is a pool ID; only address identifiers are supported\"\n            );\n        }\n\n        let pool = self\n            .core\n            .cache()\n            .pool(instrument_id)\n            .cloned()\n            .ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"Unknown pool {instrument_id}; not found in the shared engine cache\"\n                )","sourceCodeStart":796,"sourceCodeEnd":832,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L796-L832","documentation":"resolve_pool() only supports Uniswap V3 pools. After the venue parses into `(blockchain, dex_type)`, any dex_type other than `DexType::UniswapV3` bails immediately. This execution client implements swap logic, quoter calls, and pool resolution exclusively against Uniswap V3 deployments.","triggerScenarios":"Calling `preflight`, `restore_swap_plan`, or `prepare_swap` with an `InstrumentId` whose venue encodes a non-V3 DEX — e.g. `ethereum/uniswap_v2`, `base/sushiswap`, or any other registered DEX type. The venue must still parse successfully via `parse_dex()` for this error (not a parse error) to occur.","commonSituations":"Reusing instruments defined for a V2 strategy against the V3-only execution client; generic swap tooling that accepts arbitrary venues but was pointed at this adapter; migrating a strategy from Uniswap V2 to V3 without updating instrument venue strings; automated venue generation enumerating all registered DEXes.","solutions":["Use an instrument whose venue specifies `uniswap_v3` (e.g. `ethereum/uniswap_v3:0x<pool_address>`), recreating it against the V3 deployment if needed.","Route the non-V3 instrument to an execution client/adapter that supports its DEX type instead of this one.","If you must trade V2, check the adapter's supported DEX registry (`exchanges::get_dex_extended`) before wiring instruments, and only register instruments for supported types."],"exampleFix":"// before\nlet id = InstrumentId::from(\"ethereum/uniswap_v2:0x...-ETH-USD\");\nclient.preflight(&id, ...).await?;\n\n// after\nlet id = InstrumentId::from(\"ethereum/uniswap_v3:0x<eth_usdc_pool>\");\nclient.preflight(&id, ...).await?;","handlingStrategy":"validation","validationCode":"let (_chain, dex_type) = instrument_id.venue.parse_dex()?;\nif dex_type != DexType::UniswapV3 {\n    anyhow::bail!(\"{dex_type} unsupported by this client; route to a matching adapter\");\n}\n// safe to call client.prepare_swap(...).await?","typeGuard":"fn is_uniswap_v3(instrument_id: &InstrumentId) -> anyhow::Result<bool> {\n    Ok(instrument_id.venue.parse_dex()?.1 == DexType::UniswapV3)\n}","tryCatchPattern":"match client.preflight(&instrument_id, quote, slippage).await {\n    Err(e) if e.to_string().contains(\"only UniswapV3 is supported\") => {\n        warn!(\"non-V3 instrument routed to V3 client; skipping\");\n    }\n    other => other?,\n}","preventionTips":["Filter the instrument universe to Uniswap V3 venues before subscribing or scheduling swaps.","Keep separate instruments/registries per DEX type and bind each to its adapter.","Assert venue DEX type in config validation at startup."],"tags":["blockchain","uniswap-v3","unsupported","dex","instrument-id"],"backgroundTag":"unsupported-enum-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}