{"record":{"id":"672a9bdc67b4900e","repo":"nautechsystems/nautilus_trader","slug":"invalid-pool-address","errorCode":null,"errorMessage":"Invalid pool address: {}","messagePattern":"Invalid pool address: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/data/client.rs","lineNumber":757,"sourceCode":"    ) -> anyhow::Result<()> {\n        match command {\n            DefiUnsubscribeCommand::Blocks(_cmd) => {\n                log::debug!(\"Processing unsubscribe blocks command\");\n\n                Self::unsubscribe_block_feed(core_client, BlockFeedOwner::Explicit).await?;\n\n                Ok(())\n            }\n            DefiUnsubscribeCommand::Pool(cmd) => {\n                log::debug!(\n                    \"Processing unsubscribe pool command for {}\",\n                    cmd.instrument_id\n                );\n\n                if let Ok((_, dex)) = cmd.instrument_id.venue.parse_dex() {\n                    let pool_address = validate_address(cmd.instrument_id.symbol.as_str())\n                        .map_err(|_| {\n                            anyhow::anyhow!(\"Invalid pool address: {}\", cmd.instrument_id)\n                        })?;\n\n                    // Unsubscribe from all pool event types\n                    core_client\n                        .subscription_manager\n                        .unsubscribe_swaps(dex, pool_address);\n                    core_client\n                        .subscription_manager\n                        .unsubscribe_burns(dex, pool_address);\n                    core_client\n                        .subscription_manager\n                        .unsubscribe_mints(dex, pool_address);\n                    core_client\n                        .subscription_manager\n                        .unsubscribe_collects(dex, pool_address);\n                    core_client\n                        .subscription_manager\n                        .unsubscribe_flashes(dex, pool_address);","sourceCodeStart":739,"sourceCodeEnd":775,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/data/client.rs#L739-L775","documentation":"Thrown in `handle_unsubscribe_command` when the pool address in an unsubscribe (all pool events) command fails `validate_address`. The symbol portion of the instrument_id must be a valid checksummed Ethereum address to be converted into an `Address`.","triggerScenarios":"Unsubscribing from all pool events with a command whose `instrument_id.symbol` is not a checksummed 0x address.","commonSituations":"Unsubscribe requests built from stale or hand-edited subscription state; symbols that were normalized to lowercase somewhere in the pipeline; placeholder addresses in config files.","solutions":["Pass the same checksummed pool address used at subscribe time into the unsubscribe command.","Fix the address casing/length/hex before unsubscribing.","Validate the address client-side before sending the command.","Check that the instrument_id was constructed in `symbol@venue` form with the address as the symbol."],"exampleFix":"// before\nInstrumentId::from(\"0xb4e16d0168e52d35cacd2c6185b44281ec28c9ed@Uniswap\")\n// after\nInstrumentId::from(\"0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Ed@Uniswap\")","handlingStrategy":"validation","validationCode":"// Rust\nif !Address::parse_checksummed(symbol, None).is_ok() {\n    anyhow::bail!(\"unsubscribe skipped: '{symbol}' is not a checksummed pool address\");\n}","typeGuard":null,"tryCatchPattern":"match Address::parse_checksummed(symbol, None) {\n    Ok(addr) => unsubscribe_all_pool_events(dex, addr),\n    Err(e) => log::warn!(\"Skipping unsubscribe for '{instrument_id}': {e}\"),\n}","preventionTips":["Reuse the exact instrument_id string from the successful subscribe call.","Fix persistence layers that store addresses lowercase — keep checksum form.","Avoid placeholder addresses in config; validate at startup.","Centralize instrument_id construction in one helper that checksums addresses."],"tags":["ethereum","address-validation","unsubscribe"],"backgroundTag":"invalid-argument-format","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"}