Skip to content

Supernova AMO#2800

Draft
sparrowDom wants to merge 6 commits intomasterfrom
sparrowDom/supernovaAMO
Draft

Supernova AMO#2800
sparrowDom wants to merge 6 commits intomasterfrom
sparrowDom/supernovaAMO

Conversation

@sparrowDom
Copy link
Member

@sparrowDom sparrowDom commented Feb 14, 2026

Supernova AMO

What was done

  • Refactored the Sonic SwapXAMO strategy into a generalized Algebra-based strategy.
  • Updated strategy behavior to accept pool tokens in any order, removing token-order assumptions.
  • Kept strategy behavior consistent while improving flexibility and reuse across Algebra-style pools.

Test fixes and updates

  • Fixed existing Sonic fork tests that were broken or outdated after the refactor.
  • Adjusted fork test setup and assertions to match the new generalized strategy interface/flow.
  • Updated test cases to validate compatibility with the refactored format and token-order handling.

Why this change

  • The prior SwapXAMO implementation was too specialized and was expecting ws / OS tokens in specific order. Also the strategy was named SwapX even though the pool engine underneath was Algebra
  • Ensuring token-order-agnostic handling prevents integration issues across pools with varying token ordering.

What isn't done

  • The strategy still expects both tokens to have 18 decimal format. Additional work is required to make strategy support non 18 decimal tokens.

Code review suggestions

  • The swapXAMO is refactored to a new location. A diff tool should be used diffing the new StableSwapAMMStrategy with the old SonicSwapXAMOStrategy

@sparrowDom sparrowDom marked this pull request as draft February 14, 2026 12:46
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.

1 participant