Skip to content

Router

Preview

Build browser-owned RP1-local conversions with executable quotes, local signing, and conservative recovery.

Updated View as Markdown

The Router MVP is a non-custodial TanStack application and typed API boundary for RP1-local DEX and StableSwap conversion.

What Router does

  • Discovers assets, executable pools, and issued-stable reserve coverage from configured RP1 endpoints.
  • Compares successfully quotable DEX AMM and StableSwap routes.
  • Prepares an unsigned COSMOS_DIRECT instruction.
  • Lets a compatible wallet sign in the browser.
  • Persists quote digest, configuration, amount, recipient, transaction hash, and lifecycle in browser-local storage.
  • Re-queries retained RP1 transaction bytes and verifies the returned message before declaring COMPLETED.

What Router does not do

  • It never receives a mnemonic or private key.
  • It never creates liquidity or fabricates a quote when no matching pool exists.
  • It does not promise IBC, InstaWrap, or RFQ execution in the MVP.
  • It does not provide durable server-side webhooks or multi-device reconciliation.
  • EVM_TRANSACTION, IBC_TRANSFER, and DEPOSIT_ADDRESS are typed future boundaries, not executable MVP variants.

Flow

discover live pool
  → quote exact base-unit amount
  → prepare unsigned instruction
  → wallet signs locally
  → same-origin adapter broadcasts
  → retained tx observation verifies raw message match
  → completed or recovery-required

StableSwap quoting currently mirrors the keeper’s integer invariant and rounding rules because the generated query cannot encode one custom integer parameter. That is a temporary compatibility boundary with parity tests, not a second source of truth for chain execution.

Recovery and observation

An accepted broadcast with no matching observation stays SUBMITTED. A successful transaction with mismatched raw message bytes becomes RECOVERY_REQUIRED. Clearing browser storage removes local activity, not the chain transaction; the hash remains independently queryable.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close