{"record":{"id":"a86dfef2a43e8c93","repo":"nautechsystems/nautilus_trader","slug":"invalid-pool-flash-subscribe-address","errorCode":null,"errorMessage":"Invalid pool flash subscribe address: {}","messagePattern":"Invalid pool flash subscribe address: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/data/client.rs","lineNumber":713,"sourceCode":"                } else {\n                    anyhow::bail!(\n                        \"Invalid venue {}, expected Blockchain DEX format\",\n                        cmd.instrument_id.venue\n                    )\n                }\n\n                Ok(())\n            }\n            DefiSubscribeCommand::PoolFlashEvents(cmd) => {\n                log::debug!(\n                    \"Processing subscribe pool flash command for address: {}\",\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!(\n                                \"Invalid pool flash subscribe address: {}\",\n                                cmd.instrument_id\n                            )\n                        })?;\n                    core_client\n                        .subscription_manager\n                        .subscribe_flashes(dex, pool_address);\n                    Self::update_rpc_pool_event_subscriptions(core_client, dex).await?;\n                    Self::update_hypersync_pool_event_stream(core_client, dex).await?;\n                } else {\n                    anyhow::bail!(\n                        \"Invalid venue {}, expected Blockchain DEX format\",\n                        cmd.instrument_id.venue\n                    )\n                }\n\n                Ok(())\n            }","sourceCodeStart":695,"sourceCodeEnd":731,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/data/client.rs#L695-L731","documentation":"Thrown in `handle_subscribe_command` when the pool address for a flash-loan/flash event subscription fails `validate_address`. Validation requires a `0x`-prefixed, 42-character, hex, EIP-55-checksummed address.","triggerScenarios":"A flash subscribe command where `instrument_id.symbol` is not a well-formed checksummed pool address.","commonSituations":"Hand-typed addresses with casing mistakes; addresses generated with `to_lowercase()` in preprocessing code; wrong-chain addresses used for the configured venue.","solutions":["Use the correct checksummed pool address as the instrument symbol.","Fix casing to EIP-55 checksum form (e.g. via ethers `Address::parse_checksummed` or viem `getAddress`).","Validate the address format before issuing the command.","Ensure the address corresponds to a pool on the configured chain/DEX."],"exampleFix":"// before\npool_symbol.to_lowercase()\n// after\nAddress::from_str(pool_symbol)?.to_checksum(None)","handlingStrategy":"validation","validationCode":"// Rust\nfn checksum_or_none(s: &str) -> Option<String> {\n    Address::parse_checksummed(s, None).ok().map(|a| a.to_checksum(None))\n}","typeGuard":null,"tryCatchPattern":"let Some(checksummed) = checksum_or_none(symbol) else {\n    anyhow::bail!(\"flash subscribe requires a checksummed pool address, got '{symbol}'\");\n};","preventionTips":["Never call to_lowercase() on address strings used as instrument symbols.","Checksum-normalize once at the ingestion boundary and pass the result everywhere.","Verify addresses belong to the configured chain/DEX before subscribing.","Add CI validation that all configured pool addresses pass checksum verification."],"tags":["ethereum","address-validation","flash-events","subscribe"],"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-14T05:17:10.506Z"}