epic: swaps via NEAR Intents #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
A swap module built on NEAR Intents' 1Click API: quote, one-time deposit address, deposit, status, persisted as an order the user can come back to. Built and verified end to end against chains Intents already lists, with Quantus as a registry entry that activates when the bridge does.
Facts the design rests on
GET /v0/tokens,POST /v0/quote(returnsdepositAddress),POST /v0/deposit/submitwith the tx hash,GET /v0/statuswith a terminal enum. OpenAPI athttps://1click.chaindefuser.com/docs/v0/openapi.yaml. A partner JWT drops the fee from 25 bps; it lives in the relay, not the binary.near-mpcfork (threshold ML-DSA-87, derived keys needing a DKG each, signing with an empty FIPS 204 context, no inbound attestation, unmerged since July) cannot yet sign a mainnet extrinsic. Do not plan a Quantus leg for v1 of this epic.qz…account under an MPC key, and a fresh address per quote is unlikely (one DKG per derived key). Expect a shared address and reliance ondeposit/submit, possibly autility.batchwith asystem.remarkmemo. Raise with Quantus and NEAR before building.Operator-owned decisions
Definition of done
From the wallet, quote USDC on Base to NEAR, receive a deposit address, pay it from an external wallet, watch the order through to
SUCCESS, and see the order survive an app restart. A Quantus asset added to the registry in a test environment flows through the same state machine unchanged.Children, in dependency order: #38 (1Click client) → #39 (orders state machine) and #40 (wallet-api relay) → #41 (swap UI, preview) → #42 (the Quantus leg: spike and the memo question). #40 needs the NEAR Intents partner registration first.