Repository navigation
feat: add match-first swap intent - #1547
Open
enthusiastmartin wants to merge 3 commits into
Open
enthusiastmartin wants to merge 3 commits into
enthusiastmartin wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
|
Crate versions that have not been updated:
Crate versions that have been updated:
Runtime version has been increased. |
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.
Adds match-first swap intents: a swap submitted with a match window is offered to the solver only when opposite-direction flow can fill it at the oracle price, so it trades against other users instead of the AMM until the window ends, after which it behaves as a normal swap. Stored as a new
IntentData::MatchFirstSwapvariant and passed to the solver as a plainSwap(like DCA), so the solver, runtime API and node are unchanged and older binaries keep working with no migration. Counter-flow goes to same-side plain swaps first, then waiting intents oldest-first, and any intent without an oracle price is held back.