Skip to content

spec: Add Near Intents exact scheme#2102

Open
IkerAlus wants to merge 2 commits intox402-foundation:mainfrom
IkerAlus:main
Open

spec: Add Near Intents exact scheme#2102
IkerAlus wants to merge 2 commits intox402-foundation:mainfrom
IkerAlus:main

Conversation

@IkerAlus
Copy link
Copy Markdown

@IkerAlus IkerAlus commented Apr 22, 2026

Description

The exact payment scheme for Near Intents uses the NEAR Intents 1Click Swap API as the settlement backend. This scheme facilitates cross-chain payments where a client pays a specified amount of a source asset on any supported origin chain, and the resource server (merchant) receives an exact amount of a destination asset on any supported destination chain, with the NEAR Intents solver network executing the cross-chain swap in between.

Core Design: payTo = Deposit Address

The key architectural insight of the scheme is that the payTo field in PaymentRequirements is set to the 1Click Swap API deposit address — a unique, one-time address generated by the 1Click Swap API backend when the resource server requests a quote (POST /v0/quote with dry: false). This means:

  • The resource server generates the quote at 402 response time, embedding the live depositAddress as payTo.
  • The client's only obligation is to transfer the exact required amount to that payTo address on the origin chain — identical in spirit to how the EVM exact scheme asks the client to authorize a transfer to a payTo address.
  • The client's payload contains the origin-chain transaction hash (txHash) as proof-of-deposit — analogous to the EIP-3009 signature in the EVM scheme.
  • The facilitator verifies the deposit and polls the 1Click status API for settlement.

Key Properties

  • Cross-chain native: Client pays in any supported asset on any origin chain (ETH, BTC, SOL, USDC on Arbitrum, etc.); the merchant receives the destination asset on any supported chain.
  • Gasless for the merchant: The resource server receives destination tokens without submitting any on-chain transaction.
  • Competitive pricing: Market makers compete on the 1Click solver network to provide the best swap rate.
  • Automatic refunds: If the swap cannot be completed, the 1Click API automatically returns funds to the refund address.

Open Questions

  • CAIP-2 network id convention: "near:mainnet" for the settlement network vs "nearintents:mainnet" for the crosschain protocol
  • Role of the Facilitator: The "Quote Generation" step of the Facilitator can be assigned to the resource server.
  • Facilitator statefulness: It is not a hard requirement for the scheme to work. Delay and stateful constraints can be delegated to the resource server.

Add documentation for the `exact` payment scheme for NEAR Intents, detailing protocol flow, payment requirements, and facilitator behavior.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

@IkerAlus is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the specs Spec changes or additions label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

specs Spec changes or additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant