fix(feeder): publish USD per USTC for MM2 - #1
Open
lunctoken wants to merge 1 commit into
Open
Conversation
8 tasks
Author
|
@StrathCole, could you please confirm the Oracle price contract expected by MM2? This draft assumes that:
The corresponding on-chain implementation and full validation report are in Market-Module-2-0/core#3. Both PRs are intentionally kept as drafts until this convention is confirmed and the remaining multi-validator tests are complete. |
Owner
Yes this is what the mm was designed like. |
lunctoken
marked this pull request as ready for review
August 11, 2026 08:50
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.
Problem
The MM2 core interprets the Oracle-only
USTmeta-denom as USD per USTC. The feeder currently applies its legacy fiat/LUNC conversion to every denom, soUSTis submitted as USTC per LUNC instead. Both components work independently, but their price contract is incompatible and produces incorrect MM2 swap quotes.Design confirmation
StrathCole confirmed in this review comment that MM2 was designed with:
USTas an Oracle-only meta-denom carrying USD per USTC;uusdas the unchanged on-chain bank denom;Solution
USTmeta-denom;USTsemantics.The on-chain bank denom remains
uusd; this change applies only to the Oracle meta-denom used by MM2.Validation
go test -count=1 ./pkg/feeder/voterpasses, including the existing live Terra Classic RPC integration tests and dry-run prevote construction;go build ./...passes;pkg/feeder/keystoretest compilation errors after the SDK signing API change; this PR does not modify that package;The price contract is now confirmed and the focused validation is complete, so this PR is ready for review.