{"record":{"id":"55ffced02c67c0cf","repo":"nautechsystems/nautilus_trader","slug":"deployment-manifest-pool-fee-is-invalid","errorCode":null,"errorMessage":"Deployment manifest pool fee is invalid","messagePattern":"Deployment manifest pool fee is invalid","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":4985,"sourceCode":"            .verify_gas_estimate(&wallet, &weth, U256::ZERO, &balance_call, block)\n            .await,\n        \"Blockchain explicit-height gas capability\",\n    )?;\n\n    let mut decisions = vec![\n        verification_decision(&storage, Some(block), Some(block)),\n        verification_decision(&gas, Some(block), Some(block)),\n    ];\n\n    for pool in &manifest.pools {\n        let quote_contract = Address::from_str(&pool.quote_contract)\n            .with_context(|| \"Deployment manifest quote capability target is invalid\")?;\n        let token_in = Address::from_str(&pool.token0)\n            .with_context(|| \"Deployment manifest quote input token is invalid\")?;\n        let token_out = Address::from_str(&pool.token1)\n            .with_context(|| \"Deployment manifest quote output token is invalid\")?;\n        let fee = U24::try_from(pool.fee)\n            .map_err(|_| anyhow::anyhow!(\"Deployment manifest pool fee is invalid\"))?;\n        let quote = required_verification(\n            verification\n                .verify_quote_exact_input_single(\n                    &quote_contract,\n                    token_in,\n                    token_out,\n                    U256::from(1u64),\n                    fee,\n                    block,\n                )\n                .await,\n            \"Blockchain explicit-height quote capability\",\n        )?;\n        decisions.push(verification_decision(&quote, Some(block), Some(block)));\n    }\n\n    let trace = required_verification(\n        verification.verify_call_trace_capability().await,","sourceCodeStart":4967,"sourceCodeEnd":5003,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L4967-L5003","documentation":"Thrown when the deployment manifest's pool fee tier cannot be converted into a U24 (24-bit unsigned integer) fee value for a Uniswap V3 quote call. The library validates every manifest field before issuing on-chain calls, and a fee outside 0..16,777,215 (e.g. negative or > U24::MAX) fails this conversion. It aborts verification before any RPC request is made.","triggerScenarios":"Parsing a deployment manifest whose pool.fee is negative or exceeds U24::MAX (16,777,215) during exact-input-single quote verification in verify_deployment/verification flow.","commonSituations":"Manifest typo'd fee tiers (e.g. 5000000 instead of 500000, or 3000000 for 0.3%), fees entered in basis points or as floats, JSON hand-edited with a value above 16,777,215, or a manifest generated for a non-V3 fee convention.","solutions":["Check pool.fee in the deployment manifest; valid Uniswap V3 tiers are 100, 500, 3000, or 10000","Ensure the fee is a non-negative integer encoded as a string or integer, not a float","Verify the manifest generator/writer uses U24-compatible fee values (0..=16777215)","Regenerate the deployment manifest from the pool address on-chain if the fee is unknown"],"exampleFix":"// before\n\"pool\": { \"token0\": \"0xA0b8...\", \"token1\": \"0xdAC1...\", \"fee\": 0.003 }\n// after\n\"pool\": { \"token0\": \"0xA0b8...\", \"token1\": \"0xdAC1...\", \"fee\": 3000 }","handlingStrategy":"validation","validationCode":"const U24_MAX: u32 = 16_777_215;\nfn validate_pool_fee(fee: &str) -> Result<(), String> {\n    let v: u32 = fee.parse().map_err(|_| \"fee must be a non-negative integer\")?;\n    if v > U24_MAX { return Err(format!(\"fee {v} exceeds U24 max {U24_MAX}\")); }\n    Ok(())\n}","typeGuard":"fn is_valid_fee(fee: u32) -> bool { fee <= 16_777_215 }","tryCatchPattern":null,"preventionTips":["Keep fee tiers as canonical integers (100/500/3000/10000) in the manifest","Never encode fee as float or basis points","Schema-validate the manifest before deployment verification","Regenerate manifests from on-chain pool state rather than hand-editing"],"tags":["config","validation","uniswap-v3","integer-overflow"],"backgroundTag":"invalid-config-value","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"}