fix(pricing): widen FIRO cross-check tolerance to 2%#4223
Open
Danswar wants to merge 1 commit into
Open
Conversation
The 1% deviation check against the reference exchange rejects the price refresh whenever the sources drift apart, which happens routinely for this thinly traded pair - the stored price then ages past its validity window and dependent lookups fail every cycle. 2% matches the pair's typical cross-venue spread while still rejecting clearly wrong quotes.
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.
Why
The FIRO price rule cross-checks its primary source against a reference exchange with a 1% deviation limit. For this thinly traded pair the two sources routinely drift further apart than 1%, so the refresh gets rejected, the stored price ages past its validity window, and every dependent price lookup fails — recurring
No valid price found for FIROerrors on prod since 07-14 (~570/day at peak).Both sources are healthy; they just disagree by more than the configured tolerance (observed 1.1–1.7% during the failure windows).
What
Data migration, same shape as
EnablePhilippinesOnboarding: widenscheck1Limitfrom 0.01 to 0.02 for the FIRO rule, with an idempotency guard. 2% covers the pair's observed cross-venue spread while still rejecting clearly wrong quotes. Deliberately emptydown— restoring the tighter limit would re-break the refresh; a future tightening should be its own reviewed change.If the check trips again at 2%, the next question should be whether the current reference exchange is the right check source for this pair, rather than widening further.
Test plan
AssetPricesJobServiceFIRO errors stop; rule refreshes hold across deviation spikes