Skip to content

Monerium reintegration - #1359

Open
gianfra-t wants to merge 8 commits into
stagingfrom
monerium-reintegration
Open

gianfra-t wants to merge 8 commits into
stagingfrom
monerium-reintegration

Conversation

@gianfra-t

@gianfra-t gianfra-t commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

This PR reintegrates Monerium as the provider for direct-API EUR onramps.

  • Adds a typed Monerium white-label client with authentication, schema validation, profile/address/IBAN lookup, token caching, retry handling, and contract tests.
  • Introduces a Polygon-based ramp flow that receives EURe from a SEPA transfer, securely moves it from the user’s linked wallet using an ERC-2612 permit, swaps EURe to USDC through Uniswap V3, distributes fees, and routes funds to supported EVM destinations through Squid.
  • Requires an existing approved Monerium profile, Polygon-linked EOA, and IBAN; profile creation, KYC orchestration, and IBAN provisioning remain out of scope.
  • Updates transaction validation, quote configuration, frontend progress messaging, environment configuration, security specifications, and API documentation.
  • Removes the obsolete Monerium OAuth/SDK contract and keeps EUR offramps disabled until a complete redemption flow is available.

@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for vortex-sandbox ready!

Name Link
🔨 Latest commit f53ccaf
🔍 Latest deploy log https://app.netlify.com/projects/vortex-sandbox/deploys/6aa7b6da4aadce0008093416
😎 Deploy Preview https://deploy-preview-1359--vortex-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for vrtx-dashboard canceled.

Name Link
🔨 Latest commit f53ccaf
🔍 Latest deploy log https://app.netlify.com/projects/vrtx-dashboard/deploys/6aa7b6daf24f7a0008b1a2e7

@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for vortexfi ready!

Name Link
🔨 Latest commit f53ccaf
🔍 Latest deploy log https://app.netlify.com/projects/vortexfi/deploys/6aa7b6daa2893400084cf117
😎 Deploy Preview https://deploy-preview-1359--vortexfi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@gianfra-t gianfra-t changed the title [WIP] - Monerium reintegration Monerium reintegration Aug 27, 2026
@ebma

ebma commented Aug 31, 2026

Copy link
Copy Markdown
Member

Field report from the B2B forwarder workstream: our pinned EURe swap route died in six weeks — relevant to this PR's pinned-pool exactInputSingle.

While re-measuring EURe DEX liquidity on Ethereum for the forwarder work (branch vortex-monerium-v2), we found that the pool landscape had rotated out from under our pinned route between 2026-07-17 and today, before we ever deployed:

Pool (Ethereum) July 17 Today (block 25875492)
EURe/EURC 0.05% (our pinned hop) ~$104k TVL, the active pool ~$15k TVL, ~€150–200 in-range depth — a 500 EURe quote collapses to a 0.38 rate
EURe/EURC 0.01% ~$5k TVL $46k TVL, $164k/day volume — all activity moved here; 10k EURe executes at +0.013% impact

Two takeaways that generalize to any pinned EURe route, including the Polygon pool this PR pins:

  1. Pool topology rotates fast. Concentrated-liquidity LPs chase fee tiers; the "obviously right" pool at review time can be the dead one at deploy time. A hard pin turns a liquidity rotation into a redeploy/migration event instead of a config change.
  2. TVL is not executable depth. The dead pool still reports ~$15k TVL because v3 counts out-of-range positions; only quote ladders (QuoterV2 quoteExactInput at real clip sizes) tell the truth. Dashboards watching TVL will not catch this.

Suggestions for this PR before the flow goes live:

  • Prefer an operational route parameter over a hard pin (pool/fee tier from config, bounded to known-good candidates). This is safety-neutral provided the swap enforces an independent, oracle-derived amountOutMinimum (e.g. Chainlink EUR/USD × (1 − slippage)) rather than a quote-derived one: with an oracle floor, a wrong route can only revert, never execute badly. If the current minOut comes from the same quote/pool being traded, that's worth tightening first.
  • Ship quote-based route monitoring with the flow: a periodic job quoting the expected clip size across candidate fee tiers, alerting when (a) the pinned pool's impact breaches the slippage bound, (b) the pinned pool is no longer the best route by more than ~5bps — this is the early signal that fires while the old pool still works, or (c) executable depth at the acceptable-impact threshold falls below the clip size.
  • Re-verify Polygon EURe/USDC executable depth at your expected sizes now. Our July snapshot had Polygon EURe DEX liquidity near-negligible (~$3.5k in the largest pool); if the pinned pool relies on a specific LP arrangement, the monitoring above is what tells you when that arrangement changes.

Resolves conflicts against the Monerium B2B onramp (#1272), routed-token
catalog matching (#1363), oracle-anchored routed subsidy (#1362), the
provider_limit_exceeded rejection type (#1355), and the moved SDK Node
consumer examples (#1357).

- catalog.ts: keep staging's structural isOnChainToken match and reapply the
  dormant-EURe exclusion on top, so Squid discovery can never surface EURe as
  an offramp source.
- vars/preload/.env.example: keep both the MONERIUM_ISSUE_FEE_EUR requirement
  and the MONERIUM_B2B_* configuration.
- SDK examples: the EUR Node consumer examples are removed at their new
  location with their package scripts, matching this branch's deletion (the
  SDK EUR handler does not support the owner-permit flow).
- security-spec/monerium.md: this branch's white-label + active Polygon onramp
  spec, with staging's legacy OAuth onboarding section retained because those
  routes still exist.
- Remaining docs describe the direct-API Polygon EUR onramp as active, keep
  the B2B onramp and managed-profile recipient delegation from staging, and
  keep Mykobo as legacy recovery only.
The EUR register-time kill switch was removed when the Polygon Monerium
onramp was activated, and prepareRampTransactions now reads the persisted
flow's phases to detect legacy Mykobo flows. Both tests still assumed the
previous behavior and failed on this branch before the staging merge.
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