Skip to content

fix(BACK-2167): reduce number of state generations#1154

Merged
Ivan011001 merged 14 commits intomasterfrom
fix/fluid-dex-state-generation
Mar 11, 2026
Merged

fix(BACK-2167): reduce number of state generations#1154
Ivan011001 merged 14 commits intomasterfrom
fix/fluid-dex-state-generation

Conversation

@Ivan011001
Copy link
Collaborator

@Ivan011001 Ivan011001 commented Mar 9, 2026

Note

Medium Risk
Changes how FluidDex reserve data is sourced (cached polling vs per-request generation), so stale/missing cache entries can reduce pricing availability or accuracy until the poller runs.

Overview
Reduces on-demand FluidDex reserve state generation by replacing the FluidDexLiquidityProxy event-subscriber/stateful model with a cache-backed polling approach. A master instance now periodically fetches reserves on-chain (RESERVE_REFRESH_INTERVAL_MS = 10s) and writes them to shared cache (10 min TTL + 5s local TTL), while pricing/top-pools reads only from cache and returns null when state is unavailable.

Also increases Balancer V3 pool/rate refresh intervals from 1 to 2 minutes, updates FluidDex event tests’ reference block numbers, adds releaseResources() cleanup for the new polling interval, and bumps package version to 4.8.21.

Written by Cursor Bugbot for commit a03cdf5. This will update automatically on new commits. Configure here.

@linear
Copy link

linear bot commented Mar 9, 2026

BACK-2167

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@Ivan011001 Ivan011001 merged commit 7dffeaf into master Mar 11, 2026
2 checks passed
@Ivan011001 Ivan011001 deleted the fix/fluid-dex-state-generation branch March 11, 2026 10:09
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.

3 participants