Skip to content

Exclude expired event markets from cached basket quotes - #3

Merged
Ay-obami merged 1 commit into
mainfrom
audit/market-expiry-cache
Sep 29, 2026
Merged

Ay-obami merged 1 commit into
mainfrom
audit/market-expiry-cache

Conversation

@Ay-obami

Copy link
Copy Markdown
Owner

Finding

Discovery caches markets for 15 seconds and sentiment for 10 seconds. A market can expire during either TTL or during order-book reads, leaving an expired probability in the basket and stale time remaining in the UI.

Fix

Filter cached discovery results by current expiry and recalculate countdowns. Recompute cached sentiment when any constituent expires; discard markets that expire during order-book reads. Recheck expiry at basket pricing and prevent aggregate sentiment from resurrecting an expired window. Document that this only addresses event expiry, not upstream feed freshness.

Verification

New deterministic regressions cover cached expiry, countdown refresh, aggregate recomputation, expiry during order-book reads and explicit/implicit basket fallback. npm test: 42/42 pass. git diff --check passes. Independent scoped review found no important issue.

No live feed quality or trading profitability claim.

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
crossodds Ready Ready Preview Sep 29, 2026 11:00am UTC

@Ay-obami
Ay-obami merged commit 2e6e2d1 into main Sep 29, 2026
4 checks passed
@Ay-obami
Ay-obami deleted the audit/market-expiry-cache branch October 2, 2026 07:41

This branch was successfully deployed

1 active deployment
Preview — 77453c7f Deployed Sep 29, 2026 by vercel[bot]
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