Skip to content

Conversation

@danrobinson
Copy link
Collaborator

This changes how DEX pairs are keyed so that a pair that uses token A as a base token and token B as a quote token would be keyed differently from a pair that uses token B as a base token and token A as a quote token. This would be a breaking change that affects storage layout and cannot be implemented in a hard fork without a regenesis.

@vercel
Copy link

vercel bot commented Dec 30, 2025

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

Project Deployment Review Updated (UTC)
tempo-docs Ready Ready Preview, Comment Dec 31, 2025 4:33pm

@jenpaff jenpaff added the C-audit Related to audit findings label Dec 30, 2025
Copy link
Member

@fgimenez fgimenez left a comment

Choose a reason for hiding this comment

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

lgtm, maybe for a follow up would be good to add a >2 hop routing test

// or "down" (parent -> child). We start with the natural direction from
// `tokenIn` towards the LCA and flip once when we cross the LCA so that
// at most one hop has to check both orientations.
bool isBaseForQuote = true;
Copy link
Member

Choose a reason for hiding this comment

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

nit, looks like isBaseForQuote is used for two purposes now:

  • loop state (are we still going up)
  • per-hop output (is this hop spending base to get quote)

these coincide bc paths are all up, then all down, but maybe we could use two separate variables to make it more clear?

This PR updates the stablecoin exchange precompile to reflect the spec
changes introduced in `dr/dex-order-sensitive-keys`.
@0xKitsune 0xKitsune added this pull request to the merge queue Dec 31, 2025
Merged via the queue into main with commit c8705a2 Dec 31, 2025
23 checks passed
@0xKitsune 0xKitsune deleted the dr/dex-order-sensitive-keys branch December 31, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-audit Related to audit findings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants