feat(perps): add MYX provider Stage 1 implementation#25773
Conversation
Add MYX as a perpetuals trading provider with the following: - MYX SDK integration and provider implementation - Provider selector modal for switching between perps providers - Feature flag support for MYX provider - Controller refactoring for object parameter consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution MetaMask internal reviewing guidelines:
Ignoring alerts on:
|
- Fix ping() timeout timer leak by clearing setTimeout in finally block - Remove duplicate caching layer in MYXProvider (delegate to MYXClientService) - Deduplicate MYX feature flag logic into resolvePerpsMyxProviderEnabled() - Move PROVIDER_DISPLAY_INFO from types to constants file - Remove unnecessary `as never` type assertions in navigation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@SocketSecurity ignore npm/@myx-trade/sdk@0.1.265 |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Per the tag descriptions:
Risk is HIGH because:
Performance Test Selection: |
|





Description
Add MYX protocol as a second perpetuals trading provider (Stage 1 - read-only). MYX is a decentralized perpetuals exchange on BNB Chain that complements the existing HyperLiquid integration, giving users access to MYX-exclusive markets.
Why?
What's included (Stage 1 - Read-Only):
MYXProviderimplementing thePerpsProviderinterface (market data only)MYXClientServicewrapping@myx-trade/sdk(v0.1.265)myxAdapter.ts) for MYX ↔ MetaMask data transformationperpsMYXProviderEnabledwith graceful fallbackStage 1 Limitations (by design):
Changelog
CHANGELOG entry: null
Related issues
Part of MYX integration epic - Stage 1 implementation
Manual testing steps
Screenshots/Recordings
Before
N/A - New feature
After
Simulator.Screen.Recording.-.iPhone16Pro-Alpha.-.2026-02-06.at.21.46.47.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Introduces a new perps provider and provider-switch reinitialization flow, which can impact initialization, caching, and navigation behavior even though MYX is read-only in this stage.
Overview
Adds Stage 1 read-only support for the MYX perps provider (markets + price polling) alongside HyperLiquid, including new
MYXProvider,MYXClientService(wrapping@myx-trade/sdk), MYX config/constants, and MYX↔Perps adapters.Introduces provider enablement and switching: a new hybrid feature flag (
perpsMyxProviderEnabledwithMM_PERPS_MYX_PROVIDER_ENABLEDfallback) controls MYX registration;PerpsController.switchProvidernow performs a guarded full re-init with rollback on failure, and init falls back to HyperLiquid if MYX is selected but disabled.Updates the Perps UI/navigation to show a provider badge in the home header (flagged) that opens a new modal bottom sheet for provider selection, and hardens stream/caching behavior by invalidating/discarding market data when the active provider changes mid-fetch. Tests and mocks are added/updated (including a Jest mock for
@myx-trade/sdk), and ledger update types are generalized toRawLedgerUpdatefor provider-agnostic returns.Written by Cursor Bugbot for commit 7d3f856. This will update automatically on new commits. Configure here.