fix(ops): correct the feed-signer burn rate so the alert warns in time - #30
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 was0.0004. Measured against live chain state: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_DAY→0.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_DAYS3→7, 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
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-amd64under 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 singleSIGNER_ADDRESS; extending it to a list is a small change but a separate one.🤖 Generated with Claude Code
https://claude.ai/code/session_01JN98Sjs2zHG8Z6jXkpHX7Q