Skip to content

NEAR Intents: tell 1Click about our deposit and never reuse an expired deposit address #296

Backlog

Description

@ezedike-evan

Why

Every transfer into NEAR Intents ends with Circle minting USDC into a 1Click deposit address: the Stellar/Arc → NEAR Intents page (apps/web/lib/near-intents/plan.ts) and the market-maker rebalancer (packages/sdk/src/intents/rebalance.ts). After that, we wait for 1Click to notice the deposit by itself.

On 24 Nov a NEAR Intents user had 499 USDC sitting in a Solana deposit address for 3 days before support moved it. If 1Click misses one of our mints, our user waits the same way, and the transfer looks like ours failed.

1Click has an endpoint for this: POST /v0/deposit/submit ("Optionally notifies the 1Click service that a deposit has been sent to the specified address, using the blockchain transaction hash. This step can speed up swap processing"). It needs our ONECLICK_JWT (already used for quotes in apps/web/lib/near-intents/oneclick.ts).

What to do

  1. Notify 1Click once the mint lands. When Xebra's leg reports the mint tx on the deposit chain, call /v0/deposit/submit with { txHash, depositAddress }, once per transfer. Do it on the server for the web flow, and as an optional step in createRebalancer (it already holds a 1Click credential).
  2. Never send into an old deposit address. Each transfer already asks for a fresh non-dry quote, so new transfers get a new address. Check the resume path in near-intents-client.tsx (saved state restored around line 151): a restored transfer must never build a new burn into a saved address whose quote has expired. If the quote is past deadline, ask for a new one.
  3. Show it to people. If the 1Click status stays PENDING_DEPOSIT well after the mint has landed, tell the user in plain words that NEAR Intents has not picked it up yet, the funds are safe at the deposit address, and what to do next (refund account, support link). Never point them to the console.

Done when

  • A test covers: mint seen → one deposit/submit call; a failed submit does not fail the transfer; an expired restored quote is refused.
  • One real Stellar → NEAR Intents transfer shows the submit call in the logs.

Activity

  1. added
    enhancement
    area: web
    area: sdk
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: sdkarea: webenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions