nautechsystems/nautilus_trader · error
Unsupported DEX type {dex_type}; only UniswapV3 is supported
Error message
Unsupported DEX type {dex_type}; only UniswapV3 is supported What it means
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.
Source
Thrown at crates/adapters/blockchain/src/execution/client.rs:814
.ok_or_else(|| {
anyhow::anyhow!(
"No registered Uniswap V3 deployment for chain {}",
self.chain.name
)
})
}
fn resolve_pool(&self, instrument_id: &InstrumentId) -> anyhow::Result<Pool> {
let (blockchain, dex_type) = instrument_id.venue.parse_dex()?;
if blockchain != self.chain.name {
anyhow::bail!(
"Pool venue chain {blockchain} does not match the client chain {}",
self.chain.name
);
}
if dex_type != DexType::UniswapV3 {
anyhow::bail!("Unsupported DEX type {dex_type}; only UniswapV3 is supported");
}
let pool_identifier = PoolIdentifier::new_checked(instrument_id.symbol.as_str())?;
if !pool_identifier.is_address() {
anyhow::bail!(
"Pool identifier {pool_identifier} is a pool ID; only address identifiers are supported"
);
}
let pool = self
.core
.cache()
.pool(instrument_id)
.cloned()
.ok_or_else(|| {
anyhow::anyhow!(
"Unknown pool {instrument_id}; not found in the shared engine cache"
)View on GitHub (pinned to 18893faf8b)
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.
Example fix
// before
let id = InstrumentId::from("ethereum/uniswap_v2:0x...-ETH-USD");
client.preflight(&id, ...).await?;
// after
let id = InstrumentId::from("ethereum/uniswap_v3:0x<eth_usdc_pool>");
client.preflight(&id, ...).await?; Defensive patterns
Strategy: validation
Validate before calling
let (_chain, dex_type) = instrument_id.venue.parse_dex()?;
if dex_type != DexType::UniswapV3 {
anyhow::bail!("{dex_type} unsupported by this client; route to a matching adapter");
}
// safe to call client.prepare_swap(...).await? Type guard
fn is_uniswap_v3(instrument_id: &InstrumentId) -> anyhow::Result<bool> {
Ok(instrument_id.venue.parse_dex()?.1 == DexType::UniswapV3)
} Try / catch
match client.preflight(&instrument_id, quote, slippage).await {
Err(e) if e.to_string().contains("only UniswapV3 is supported") => {
warn!("non-V3 instrument routed to V3 client; skipping");
}
other => other?,
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Dex {dex_id} doesn't exist for chain {}
- Pool identifier {pool_identifier} is a pool ID; only address
- Finalized transaction {} emitted {} Swap logs; expected exac
- DEX {dex_id} is not registered in the data client
- HyperSync parsing of pool created event is not defined in th
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/758f5412d527a014.
Report an issue: GitHub.