Skip to content

Split MoonPay Trade and Houdini reporting - #241

Open
j0ntz wants to merge 3 commits into
deployfrom
jon/reports-provider-splits
Open

j0ntz wants to merge 3 commits into
deployfrom
jon/reports-provider-splits

Conversation

@j0ntz

@j0ntz j0ntz commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

EdgeApp/edge-exchange-plugins#517 for the Houdini mode partner ids. The MoonPay Trade split has no dependency.

Description

Splits two providers in reports: MoonPay Trade centralized vs DeFi, and Houdini by app mode.

MoonPay Trade. The app sends Solana-to-Solana swaps through its mptradedefi plugin and every other route through mptrade, both on one API key. queryMptrade now takes a route and keeps only that route's orders, using the same rule as the app (both chains Solana means DeFi). A new mptradedefi partner plugin reports the DeFi orders, and each order lands in exactly one partition. A replay of 1,786 live orders (2026-09-01 to 2026-10-27) gave 27 DeFi orders, all Solana-to-Solana, zero overlap, and a union equal to the full set.

Houdini. No plugin code: Houdini scopes orders to the partner account that created them, and the exch PR places each mode's orders on its own account. Each account reports as its own partner id with pluginId: houdini in the app's partner config. This PR adds dashboard colors for houdinisend, houdinistealth, and houdinistealthsend.

Ops after merge:

  • MoonPay Trade: add a mptradedefi entry to the app's reports_apps partnerIds with the same apiKeys as mptrade. Then clear the existing mixed partition and re-query both from the start of MoonPay Trade reporting: rmPartition on edge_mptrade, then rewindProgress 2026-09-01 mptrade mptradedefi --apply.
  • Houdini: once the three Houdini partner accounts exist (see the exch PR), add houdinisend, houdinistealth, and houdinistealthsend entries with pluginId: houdini and each account's apiKey/apiSecret. They must be separate Houdini partners: keys under one partner share one order list, and every order would land in every partition.

Testing:

  • test/mptrade.test.ts covers route classification and the per-route filter; the full suite passes (205) and verify-repo passes against deploy.
  • Live order replay through both routes (numbers above).
  • Local dashboard (frame below): a local CouchDB seeded with the replayed live MoonPay Trade orders through the branch's queryMptrade, plus fixture orders for the four Houdini partner ids (no per-mode Houdini accounts exist yet), then the real cache engine, v1 API, and built dashboard. All six partners render with their own colors; mptradedefi shows its 27 orders apart from mptrade. The seed data was removed afterward.

Test evidence

86d908c
Add dashboard colors for the Houdini modes
2026-10-28
🪓 seeded a local CouchDB: replayed live MoonPay Trade orders plus fixture orders for the four Houdini partner ids

4. 🪓 dashboard provider split

j0ntz added 3 commits October 27, 2026 17:06
The app sends Solana-to-Solana swaps through its mptradedefi plugin and
every other route through mptrade, both on one API key. queryMptrade now
takes the route and keeps only that route's orders, so a mptradedefi
partner entry with the same key reports the DeFi orders and mptrade
reports the rest. Each order lands in exactly one partition.
Houdini scopes orders to the partner account that created them, so each
app mode (swap and send, stealth swap, stealth swap and send) reports
from its own account as its own partner id, with pluginId houdini in the
partner config. These ids need dashboard colors to chart.
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