Multi-Checkpoint Verification
The wallet debugging case required four sources to agree: the derived EOA from the key, the configured expected wallet, the on-chain USDC.e balance, and the CLOB-reported balance. Any mismatch is a red flag. The discipline of cross-checking independent sources before trusting any single one.
The Hermes wallet mismatch was diagnosed by comparing four independent sources for the same fact: "what address holds the Hermes USDC.e?"
- Source 1:
Account.from_key(private_key).address— cryptographic derivation from the Doppler secret. - Source 2:
os.environ["EXPECTED_WALLET"]— the intended address, set by operators. - Source 3: Direct Polygon RPC call to the USDC.e contract's
balanceOf()for each candidate address. - Source 4: Polymarket CLOB
/balance-allowanceendpoint.
All four should agree. The bot was healthy if and only if source 1 matched source 2, and the balance on source 3 matched the balance on source 4 for that agreed address. In the actual bug, source 1 and source 2 disagreed — the derived EOA was 0x081c…0115 while the expected wallet was 0xCF56…0aD. The moment that comparison was run, the bug was diagnosed.
The Pattern
Identify the fact you are verifying. Then list every independent source that should agree on that fact. Query all of them. Compare. Any mismatch is a red flag that must be explained before proceeding.
| Fact | Source 1 | Source 2 | Source 3 | Source 4 |
|---|---|---|---|---|
| Bot wallet address | Key derivation | EXPECTED_WALLET env var | Wallet-UI screenshot | Deploy config |
| USDC.e balance | On-chain balanceOf | Polymarket CLOB | Explorer UI | Portfolio tracker |
| Order status | CLOB GET /orders | On-chain settlement event | CLOB trade history | UI dashboard |
Each row is a fact worth cross-checking at startup or during debugging. Each column is a potential independent source. The more high-stakes the fact, the more sources deserve a checkmark.
Inline Diagram — Four-Source Agreement
When to Apply It
Multi-checkpoint verification is worth running at three moments:
- Startup — before any production action, run the critical cross-checks (wallet, balance, config hash). Fail loudly on mismatch.
- Investigation — when debugging any "something is zero" or "something is missing" complaint, list the independent sources and cross-check them before assuming the primary source is correct.
- Pre-deploy — when shipping a config change, verify the new config matches expectations across every environment it touches.
The Rule
One source is a guess. Four sources is a verification. For every high-stakes fact, list the independent sources and cross-check them. The Hermes wallet mismatch cost an hour because this discipline was not yet baked into startup. Now it is.