spec: Add Near Intents exact scheme#2102
Open
IkerAlus wants to merge 2 commits intox402-foundation:mainfrom
Open
spec: Add Near Intents exact scheme#2102IkerAlus wants to merge 2 commits intox402-foundation:mainfrom
IkerAlus wants to merge 2 commits intox402-foundation:mainfrom
Conversation
Add documentation for the `exact` payment scheme for NEAR Intents, detailing protocol flow, payment requirements, and facilitator behavior.
|
@IkerAlus is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
exactpayment 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 AddressThe key architectural insight of the scheme is that the
payTofield inPaymentRequirementsis 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/quotewithdry: false). This means:depositAddressaspayTo.payToaddress on the origin chain — identical in spirit to how the EVMexactscheme asks the client to authorize a transfer to apayToaddress.payloadcontains the origin-chain transaction hash (txHash) as proof-of-deposit — analogous to the EIP-3009signaturein the EVM scheme.Key Properties
Open Questions