Skip to content

fix(feeder): publish USD per USTC for MM2 - #1

Open
lunctoken wants to merge 1 commit into
StrathCole:mainfrom
lunctoken:mm2-ust-price
Open

fix(feeder): publish USD per USTC for MM2#1
lunctoken wants to merge 1 commit into
StrathCole:mainfrom
lunctoken:mm2-ust-price

Conversation

@lunctoken

@lunctoken lunctoken commented Aug 8, 2026

Copy link
Copy Markdown

Problem

The MM2 core interprets the Oracle-only UST meta-denom as USD per USTC. The feeder currently applies its legacy fiat/LUNC conversion to every denom, so UST is 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:

  • UST as an Oracle-only meta-denom carrying USD per USTC;
  • uusd as the unchanged on-chain bank denom;
  • all legacy fiat/LUNC conversions unchanged.

Solution

  • publish the raw USTC/USD value for the UST meta-denom;
  • keep the existing fiat/LUNC conversion unchanged for every legacy Oracle denom;
  • add unit and integration assertions that pin the special UST semantics.

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/voter passes, including the existing live Terra Classic RPC integration tests and dry-run prevote construction;
  • go build ./... passes;
  • the repository-wide short test suite is currently blocked by pre-existing pkg/feeder/keystore test compilation errors after the SDK signing API change; this PR does not modify that package;
  • the corresponding core work is tracked in Market-Module-2-0/core#3;
  • specification: MM2 no-mint proposal.

The price contract is now confirmed and the focused validation is complete, so this PR is ready for review.

@lunctoken

Copy link
Copy Markdown
Author

@StrathCole, could you please confirm the Oracle price contract expected by MM2?

This draft assumes that:

  • UST is an Oracle-only meta-denom carrying USD per USTC;
  • uusd remains the on-chain bank denom;
  • all legacy fiat/LUNC conversions remain unchanged.

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.

@StrathCole

Copy link
Copy Markdown
Owner

@StrathCole, could you please confirm the Oracle price contract expected by MM2?

This draft assumes that:

* `UST` is an Oracle-only meta-denom carrying USD per USTC;

* `uusd` remains the on-chain bank denom;

* all legacy fiat/LUNC conversions remain unchanged.

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.

Yes this is what the mm was designed like.

@lunctoken
lunctoken marked this pull request as ready for review August 11, 2026 08:50
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.

2 participants