Skip to content

fix(pricing): widen FIRO cross-check tolerance to 2%#4223

Open
Danswar wants to merge 1 commit into
developfrom
data/widen-firo-price-check-limit
Open

fix(pricing): widen FIRO cross-check tolerance to 2%#4223
Danswar wants to merge 1 commit into
developfrom
data/widen-firo-price-check-limit

Conversation

@Danswar

@Danswar Danswar commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

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 FIRO errors 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: widens check1Limit from 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 empty down — 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

  • Migration loads, passes the psql-dialect check spec
  • Full local suite green (pre-push hook)
  • Post-deploy: AssetPricesJobService FIRO errors stop; rule refreshes hold across deviation spikes

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.
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