Skip to content

fix(ops): correct the feed-signer burn rate so the alert warns in time - #30

Merged
robertleifke merged 1 commit into
mainfrom
fix/signer-balance-alert-burn-rate
Sep 9, 2026
Merged

fix(ops): correct the feed-signer burn rate so the alert warns in time#30
robertleifke merged 1 commit into
mainfrom
fix/signer-balance-alert-burn-rate

Conversation

@robertleifke

Copy link
Copy Markdown
Contributor

The Slack alert existed and still didn't prevent the signer emptying twice. The threshold wasn't the problem — the burn rate it divides by was.

The arithmetic

runway = balance / BURN_ETH_PER_DAY, and that constant was 0.0004. Measured against live chain state:

Spend 2026-09-08 17:50Z → 2026-09-09 13:20Z 0.000977 ETH
Transactions (nonce 61552 → 62735) 1,183
Actual burn 0.0012 ETH/day (8.3e-7 per tx)
Script assumed 0.0004 ETH/day — 3× optimistic

So the "3-day" warning fired at 3 × 0.0004 = 0.0012 ETH, which at the real rate is 24 hours. Overnight, that's a dead feed by morning — which is what happened on 2026-09-01, and it stayed dead for 6.8 days.

The change

  • BURN_ETH_PER_DAY0.0012, measured, with the derivation recorded and a note that it must be re-measured if publish cadence changes. It's the denominator of the runway, so understating it silently shortens every warning.
  • WARN_RUNWAY_DAYS 37, so an alert landing on a Friday evening is still actionable on Monday.

Together these warn at ~0.0084 ETH rather than ~0.0012.

Verified against live state

NUMO FEED-SIGNER LOW GAS
0xC9F1FfdE… has 0.000724 ETH (~0.6 days at 0.0012 ETH/day).
Below the 7-day warn threshold — top it up or the feed will go stale and freeze trading.

The old constants called that same balance "1.8 days".

Two things this does not do

It does not deploy. The script runs on numo-ops-amd64 under a systemd timer, and that host keeps running its own copy until someone updates it. Merging this fixes the source, not the alert.

It does not watch the executor. 0x… executor gas has the same failure shape and nothing monitors it. The script takes a single SIGNER_ADDRESS; extending it to a list is a small change but a separate one.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JN98Sjs2zHG8Z6jXkpHX7Q

The alert existed and still did not prevent the wallet emptying twice. The
threshold was not the problem; the burn rate it divides by was.

BURN_ETH_PER_DAY was 0.0004. Measured between 2026-09-08 17:50Z and
2026-09-09 13:20Z, the signer spent 0.000977 ETH over 1183 transactions
(nonce 61552 -> 62735): 0.0012 ETH/day, 3x the assumption. Runway is
balance/burn, so every warning was 3x longer than reality -- the "3-day"
threshold fired with about 24 hours left, overnight, and the feed was dead
by morning.

Burn is now the measured 0.0012 with a note on how it was derived and that
it must be re-measured if publish cadence changes. Warn days 3 -> 7, so an
alert landing on a Friday is still actionable on Monday. Together these warn
at ~0.0084 ETH instead of ~0.0012.

Run against live state it fires correctly: 0.000724 ETH reported as 0.6 days,
where the old constants called the same balance 1.8 days.

Docstring updated -- this has now happened three times, not once: 2026-07-21,
2026-09-01 (dead 6.8 days, found by accident) and 2026-09-09.

NOTE: this does not deploy. The script runs on numo-ops-amd64 under a systemd
timer; that host keeps running its own copy until someone updates it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JN98Sjs2zHG8Z6jXkpHX7Q
@robertleifke
robertleifke merged commit 4367961 into main Sep 9, 2026
1 of 2 checks passed
@robertleifke
robertleifke deleted the fix/signer-balance-alert-burn-rate branch September 9, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant