{"record":{"id":"b2e74b7b0eeeeb9e","repo":"nautechsystems/nautilus_trader","slug":"pool-instrument-id-has-no-fee-tier","errorCode":null,"errorMessage":"Pool {instrument_id} has no fee tier","messagePattern":"Pool (.+?) has no fee tier","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":1573,"sourceCode":"            );\n        }\n\n        if !matches!(order.order_side(), OrderSide::Buy | OrderSide::Sell) {\n            anyhow::bail!(\n                \"Unsupported order side {}; only Buy and Sell are supported\",\n                order.order_side()\n            );\n        }\n\n        if order.is_quote_quantity() {\n            anyhow::bail!(\n                \"Quote-denominated quantities are not supported; quantity must be denominated in the base token\"\n            );\n        }\n\n        let fee = pool\n            .fee\n            .ok_or_else(|| anyhow::anyhow!(\"Pool {instrument_id} has no fee tier\"))?;\n        let fee = U24::try_from(fee)\n            .map_err(|_| anyhow::anyhow!(\"Pool {instrument_id} fee {fee} exceeds uint24\"))?;\n\n        let base_token = pool.get_base_token();\n        let quote_token = pool.get_quote_token();\n        let quote_currency = Currency::new_checked(\n            &quote_token.symbol,\n            quote_token.decimals,\n            0,\n            &quote_token.name,\n            CurrencyType::Crypto,\n        )?;\n        let (token_in, token_out) =\n            swap_token_pair(order.order_side(), base_token.address, quote_token.address)?;\n\n        if !self\n            .transaction_limits\n            .allowed_token_pairs","sourceCodeStart":1555,"sourceCodeEnd":1591,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L1555-L1591","documentation":"prepare_swap looked up the pool for the instrument and its fee tier is None; the cached Pool record lacks the Uniswap-style fee necessary to route the swap, so the swap request is rejected before amount calculations.","triggerScenarios":"`submit_order()` -> `prepare_swap()` on an instrument whose cached pool object lacks a fee tier (fee not yet discovered, or pool type without tier populated).","commonSituations":"Pool metadata fetched from a source that does not expose fee tier; subscribing to a V2-style or non-tiered pool through a V3 swap path; stale/partial pool cache after restart before pool metadata refresh.","solutions":["Ensure the pool's fee tier is discovered/persisted before submitting orders (complete the data subscription so pool metadata loads)","Verify the instrument maps to a fee-tiered (V3-style) pool; route V2/other pool types through the correct executor","Refresh/rebuild the pool cache entry so `pool.fee` is populated","If adding the pool definition manually, set the correct fee tier in configuration"],"exampleFix":"// before\nlet pool = load_pool(instrument_id); // fee: None\n// after: wait for metadata then validate\nlet pool = load_pool(instrument_id);\nassert!(pool.fee.is_some(), \"pool fee tier missing for {instrument_id}\");","handlingStrategy":"validation","validationCode":"if pool.fee.is_none() {\n    return Err(format!(\"pool {instrument_id} fee tier not loaded; refresh metadata before trading\"));\n}","typeGuard":"fn has_fee_tier(pool: &Pool) -> Option<u64> {\n    pool.fee\n}","tryCatchPattern":"match client.submit_order(order).await {\n    Err(e) if e.to_string().contains(\"has no fee tier\") => {\n        refresh_pool_metadata(&instrument_id).await?;\n        client.submit_order(order).await\n    }\n    r => r,\n}","preventionTips":["Verify pool metadata (fee tier) loads fully before enabling the instrument for trading","Confirm the instrument maps to a V3-style tiered pool","Refresh pool cache after restarts before submitting orders"],"tags":["blockchain","uniswap","pool-metadata","swap"],"backgroundTag":"missing-required-argument","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}