PR: #29 (feat/04-toml-config-loader)
File: crates/charon-core/src/config.rs, line 38 (BotConfig.max_gas_gwei)
Gas ceiling in whole gwei. EIP-1559 priority fee on BSC often sub-gwei (0.1, 0.5). Gas oracle in PR #43 returns wei; comparison against max_gas_gwei * 1e9 loses precision. Operator cannot express "cap at 0.5 gwei."
Impact: Cannot tune bot for low-fee periods on BSC where tight gas caps are competitive advantage. Coarse truncation lowers hit rate.
Fix:
TOML via decimal string + custom serde deser (alloy already provides from_str on U256). Or keep gwei but switch to f64 — rejected per money-float rule. Preferred:
max_gas_wei = "3000000000" # 3 gwei
with serde deserialize_with parsing decimal or hex.
PR: #29 (feat/04-toml-config-loader)
File: crates/charon-core/src/config.rs, line 38 (BotConfig.max_gas_gwei)
Gas ceiling in whole gwei. EIP-1559 priority fee on BSC often sub-gwei (0.1, 0.5). Gas oracle in PR #43 returns wei; comparison against
max_gas_gwei * 1e9loses precision. Operator cannot express "cap at 0.5 gwei."Impact: Cannot tune bot for low-fee periods on BSC where tight gas caps are competitive advantage. Coarse truncation lowers hit rate.
Fix:
TOML via decimal string + custom serde deser (alloy already provides
from_stron U256). Or keep gwei but switch tof64— rejected per money-float rule. Preferred:with serde
deserialize_withparsing decimal or hex.