Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update developer portal for swap #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tsouchon-ledger
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Apr 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
developer-portal-v2 ❌ Failed (Inspect) May 15, 2024 8:42am

@tsouchon-ledger tsouchon-ledger added the enhancement New feature or request label Apr 15, 2024
pages/docs/exchange/swap/flow/transaction-status.mdx Outdated Show resolved Hide resolved
@@ -254,6 +264,9 @@ components:
nonce:
type: string
description: value to use for `device_transaction_id_ng` field in the protobuf payload. It will be an hex format of the byte array nonce received by the user.
slippage:
type: string
description: Value between 0 to 1 (0.1 => 10%) to describe the difference between the quote and the real value of the exchange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to describe the difference between the quote and the real value of the exchange"
-> "maximum difference between the amount the user has seen in his quote and the amount he might finally receive, as a ratio of the quoted amount. Otherwise, the user should be asked for his consent to the new trade or reimbursed in original coin."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not be a mandatory field

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in required section ^^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use "Value between 0 to 1 (0.1 => 10%). Maximum difference between the amount the user has seen in his quote and the amount he might finally receive, as a ratio of the quoted amount. Otherwise, the user should be asked for his consent to the new trade or reimbursed in original coin."
Here and on defaultSlippage field bellow.

@@ -307,6 +320,9 @@ components:
maxAmountFrom:
type: string
description: maximum valid `amount` for this pair (optional, only required if amount is too large)
slippage:
type: string
description: Value between 0 to 1 (0.1 => 10%) to describe the difference between the quote and the real value of the exchange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same slippage description than above)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should have 2 fields :

  • defaultSlippage -> default slippage value (will be used as a default setting to the user)
  • slippageRange -> the user will be able to change slippage in this range. Ex : 0.01-0.3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This leaves too much room for interpretation actually... Let's replace slippageRange with 2 fields, minSlippage (string, ex "0.01") and maxSlippage (string, ex "0.3") instead. sorry...

@@ -307,6 +320,9 @@ components:
maxAmountFrom:
type: string
description: maximum valid `amount` for this pair (optional, only required if amount is too large)
slippage:
type: string
description: Value between 0 to 1 (0.1 => 10%) to describe the difference between the quote and the real value of the exchange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This leaves too much room for interpretation actually... Let's replace slippageRange with 2 fields, minSlippage (string, ex "0.01") and maxSlippage (string, ex "0.3") instead. sorry...

@@ -254,6 +264,9 @@ components:
nonce:
type: string
description: value to use for `device_transaction_id_ng` field in the protobuf payload. It will be an hex format of the byte array nonce received by the user.
slippage:
type: string
description: Value between 0 to 1 (0.1 => 10%) to describe the difference between the quote and the real value of the exchange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use "Value between 0 to 1 (0.1 => 10%). Maximum difference between the amount the user has seen in his quote and the amount he might finally receive, as a ratio of the quoted amount. Otherwise, the user should be asked for his consent to the new trade or reimbursed in original coin."
Here and on defaultSlippage field bellow.

public/exchange/openapi/swap-provider-openapi.yml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants