Refs #52
File: config/fork.toml
Problem
fork.toml lowers profit threshold for demo (per PR description). If operator accidentally runs charon --config config/fork.toml with mainnet env vars (BNB_WS_URL pointing at mainnet), bot operates on mainnet with lowered profit gate. Unprofitable liquidations attempted.
Fix
Add runtime assertion in main.rs that refuses to start if:
- config rpc_url ≠ localhost AND config profile_name = 'fork'
- OR config profile_name contains 'fork' AND chain_id matches mainnet
Add profile_tag = "fork" field to fork.toml. Validate on startup.
Refs #52
File: config/fork.toml
Problem
fork.toml lowers profit threshold for demo (per PR description). If operator accidentally runs
charon --config config/fork.tomlwith mainnet env vars (BNB_WS_URL pointing at mainnet), bot operates on mainnet with lowered profit gate. Unprofitable liquidations attempted.Fix
Add runtime assertion in main.rs that refuses to start if:
Add
profile_tag = "fork"field to fork.toml. Validate on startup.