fix: add CI verification for AMM constant sync with smart contract#101
Merged
Jaydbrown merged 2 commits intoJun 20, 2026
Merged
Conversation
- Add CI step that fetches the live Smart Contract src/math.rs and compares FEE_NUMERATOR, FEE_DENOMINATOR, and MINIMUM_LIQUIDITY against src/pool/math.rs, failing the build on drift - Add a local pinned unit test (fee_constants_match_known_smart_contract_values) as defense-in-depth for offline/local development - Expand the doc comment to make the sync requirement and CI enforcement explicit - Link to issue Nodus-protocol#61 for the longer-term shared-crate fix (nodus-amm-types), tracked as a follow-up since it requires coordinating a new repo and Cargo.toml changes in both Smart Contract and Core Engine This implements Option 2 from the issue as an immediate, low-risk fix. Option 1 (shared nodus-amm-types crate) remains the proper long-term solution and is out of scope for this PR due to its cross-repo nature. Closes Nodus-protocol#61
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.
This implements Option 2 from the issue as an immediate, low-risk fix. Option 1 (shared nodus-amm-types crate) remains the proper long-term solution and is out of scope for this PR due to its cross-repo nature.
Closes #61
Summary
Brief description of what this PR does.
Closes #
Type of Change
How Was It Tested?
Describe the tests you ran and how to reproduce them.
Checklist
CONTRIBUTING.mdmain(no merge commits)Closes #N)Screenshots (if UI change)