ticker: defensive ceiling on live-number values - #1258
Merged
Conversation
An upstream corruption on the relay's vol24h feed (observed 8.26e79 today) latched into the LiveNumber snapshot pair and, in monotonic mode, stuck as the displayed value forever because every subsequent healthy tick was smaller and got rejected as a 'down tick'. Add a maxValue prop that rejects any incoming value above a plausible ceiling before it can pollute the snapshot pair, and flushes a previously-poisoned lastRef so a healthy value can seed the ticker on the next push. Ceilings sit 20 to 100x above the real world ATH so plausible growth stays uncapped: vol24h 1e13 (real ATH ~5e11), trades24h 1e10 (real ATH ~5e7), mcap 1e14 (real ATH ~4e12).
Flotapponnier
pushed a commit
that referenced
this pull request
Jul 17, 2026
Follow-up to #1258. The initial fix rejected future ticks above the ceiling but left two paths for the garbage to stick: 1. useState was seeded with the raw value on mount, so the very first render painted 8.26e79 before any effect ran. The monotonic guard then rejected every healthy value that followed as a down tick. 2. Even after flushing lastRef, the display state still held the garbage, and the raf tick was returning early on lastRef=null so setDisplay was never called with a smaller-but-healthy value. Fix: guard the useState seed too, and reset display to undefined when an above-ceiling value arrives. A subsequent healthy push then seeds both lastRef and display fresh.
Flotapponnier
pushed a commit
that referenced
this pull request
Jul 17, 2026
Follow-up to #1258. The initial fix rejected future ticks above the ceiling but left two paths for the garbage to stick: 1. useState was seeded with the raw value on mount, so the very first render painted 8.26e79 before any effect ran. The monotonic guard then rejected every healthy value that followed as a down tick. 2. Even after flushing lastRef, the display state still held the garbage, and the raf tick was returning early on lastRef=null so setDisplay was never called with a smaller-but-healthy value. Fix: guard the useState seed too, and reset display to undefined when an above-ceiling value arrives. A subsequent healthy push then seeds both lastRef and display fresh.
Flotapponnier
added a commit
that referenced
this pull request
Jul 17, 2026
…ng (#1259) Follow-up to #1258. The initial fix rejected future ticks above the ceiling but left two paths for the garbage to stick: 1. useState was seeded with the raw value on mount, so the very first render painted 8.26e79 before any effect ran. The monotonic guard then rejected every healthy value that followed as a down tick. 2. Even after flushing lastRef, the display state still held the garbage, and the raf tick was returning early on lastRef=null so setDisplay was never called with a smaller-but-healthy value. Fix: guard the useState seed too, and reset display to undefined when an above-ceiling value arrives. A subsequent healthy push then seeds both lastRef and display fresh. Co-authored-by: Florent Tapponnier <contact@mobula.io>
This was referenced Jul 17, 2026
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.
Ships direct to main since it fixes a visible bug on openchainbench.com right now ($8.26e79 stuck on the Onchain volume 24h stat). Client-side defence against upstream relay data corruption. See commit body for detail.