Skip to content

Supernova AMO#2800

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

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

Conversation

@sparrowDom
Copy link
Member

@sparrowDom sparrowDom commented Feb 14, 2026

Supernova AMO

TODO:

  • the sonic deploy script should be removed once fork testing Swapx amo is not needed anymore
  • the various scenarioConfig should be consolidated into less cases
  • ~18 tests of the supernova AMO are still failing

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

A couple of files have been moved still they should be compared with their old versions:

  • StableSwapAMMStrategy with the SonicSwapXAMOStrategy
  • algebraAmoStrategy.js with the swapx-amo.sonic.fork-test.js

@sparrowDom sparrowDom marked this pull request as draft February 14, 2026 12:46
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 94.00922% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 7.72%. Comparing base (7a2c767) to head (6cda7e3).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
...racts/strategies/algebra/StableSwapAMMStrategy.sol 94.44% 11 Missing and 1 partial ⚠️
...ts/strategies/algebra/OETHSupernovaAMOStrategy.sol 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #2800       +/-   ##
==========================================
- Coverage   43.88%   7.72%   -36.16%     
==========================================
  Files         133     133               
  Lines        6189    5888      -301     
  Branches     1655    1571       -84     
==========================================
- Hits         2716     455     -2261     
- Misses       3469    5432     +1963     
+ Partials        4       1        -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Comments