feat(ekubo-v3): support new TWAMM extension - #1196
Open
die-herdplatte wants to merge 1 commit into
Open
Conversation
A new version of the TWAMM extension was deployed, with the only noticeable change being that the cancellation fee for TWAMM orders was removed. As this doesn't affect any logic in this integration, the required change is minimal.
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.
A new version of the TWAMM extension was deployed, with the only noticeable change being that the cancellation fee for TWAMM orders was removed.
As this doesn't affect any logic in this integration, the required change is minimal.
Pair / Pool TVLs changed and certain E2E tests don't pass any longer due to the decreased liquidity in these cases.
A similar "state-dependency" issue came up with
TWAMMpools.At quoting time, the system time is used to guess a likely on-chain execution time.
Depending on active sale rates, already small differences between the actual and the estimated execution time can cause the tiny tolerance of 10 wei to be exceeded.
Ideally, you could pass a block number to
testE2Eand pass through an override timestamp to theTWAMM(andBoostedFees) instances somehow.Note that none of the issues was introduced in this PR, they just surfaced now because pool states have changed.
Note
Medium Risk
Changes TWAMM quoting and on-chain event/state sync paths; mis-wiring v1/v2 addresses or pool-id parsing could break TWAMM pool tracking or quotes.
Overview
Adds dual TWAMM extension support for Ekubo V3: the former single
TWAMM_ADDRESSis split into v1 and v2 contract addresses, each with its own quote/data fetcher, while sharing the same TWAMM ABI interface.TwammPoolnow selects v1 vs v2 from the pool key’s extension and uses that deployment’s data fetcher and event emitter address. The pool manager subscribes to both TWAMM contracts for log routing, subgraph extension filters, andOrderUpdatedpool-id parsing (extension in the reconstructedPoolKeymatches the log’s contract).extensionTypetreats both addresses asTwamm.Event integration tests are updated for v1 naming, a new v2 ETH/EKUBO TWAMM pool, and TWAMM order lifecycle cases grouped under
VirtualOrdersExecutedAndOrderUpdated.Reviewed by Cursor Bugbot for commit bac9a42. Bugbot is set up for automated code reviews on this repo. Configure here.