Skip to content

feat(BACK-2161): refactor AlegraIntegral integration to use event based #1150

Merged
Ivan011001 merged 49 commits intomasterfrom
feat/back-2161-algebra-integral-event-based
Mar 5, 2026
Merged

feat(BACK-2161): refactor AlegraIntegral integration to use event based #1150
Ivan011001 merged 49 commits intomasterfrom
feat/back-2161-algebra-integral-event-based

Conversation

@Ivan011001
Copy link
Collaborator

@Ivan011001 Ivan011001 commented Feb 25, 2026

Note

Medium Risk
Touches core pricing/state-tracking logic for AlgebraIntegral by introducing event-driven pool state and periodic fee updates, which could affect quote correctness or stability if event decoding/state sync is off. Changes are bounded to specific DEX integrations but include new on-chain multicalls and caching behavior.

Overview
Refactors AlgebraIntegral pricing to prefer event-subscribed pool state (via new AlgebraIntegralEventPool using AlgebraIntegralStateMulticall) and only fallback to RPC quoter when a pool can’t be initialized or yields invalid outputs; also adds slave-side periodic fee polling to keep dynamic fees current.

Updates AlgebraIntegralFactory to be a real stateful subscriber returning a Pool[] state (instead of maintaining an internal list) and adds stateMulticall addresses + new ABIs for Integral/BlackholeCL pools and multicall. Tests are reworked to cover event-driven pricing (new events test suite, integration/e2e updates for QuickSwapV4 Base + BlackholeCL Avalanche + Supernova Mainnet), and a few unrelated maintenance tweaks land (optional GENERIC_RFQ_PATH_TO_OVERRIDE, remove DackieSwapV3 config, update UniswapV3 Base subgraph, and harden ExecutorBytecodeBuilder.findAmountPosInCalldata to search ABI word boundaries).

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

@linear
Copy link

linear bot commented Feb 25, 2026

BACK-2161

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.

commit 8e667ad
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Tue Mar 3 21:14:31 2026 +0200

    chore(test): update tokens storage slots

commit 171efa5
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Tue Mar 3 21:14:11 2026 +0200

    fix(DackieSwapV3): use correct subgraph on Base

commit 6f7e958
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Tue Mar 3 20:24:04 2026 +0200

    fix(SushiSwapV3): use correct subgraph on Base

commit 4f076dd
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Mon Mar 2 21:19:39 2026 +0200

    fix(UniswapV3): include `liquidityField` in the config
commit 3a95f92
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Tue Mar 3 13:20:14 2026 +0200

    Revert "temp(log): add plain firm data logging"

    This reverts commit 3e434b0.

commit afc9d26
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Tue Mar 3 08:49:56 2026 +0200

    4.8.18-alphalab-mainnet.1

commit 523de89
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Tue Mar 3 08:49:40 2026 +0200

    temp(log): add formatted firm data logging

commit 42b6833
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Mon Mar 2 13:01:14 2026 +0200

    4.8.18-alphalab-mainnet.0

commit 3e434b0
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Mon Mar 2 12:58:45 2026 +0200

    temp(log): add plain firm data logging

commit a418cc2
Author: Ivan Nedokhodiuk <nedokhodiukivan@gmail.com>
Date:   Mon Mar 2 12:58:18 2026 +0200

    test(e2e): adjust testing for new types
@Ivan011001 Ivan011001 merged commit 9ed1597 into master Mar 5, 2026
2 checks passed
@Ivan011001 Ivan011001 deleted the feat/back-2161-algebra-integral-event-based branch March 5, 2026 11:29
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