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

blip-29: add swap_type field to RFQ request message schema #2

Closed
wants to merge 1 commit into from

Conversation

ffranr
Copy link

@ffranr ffranr commented Apr 4, 2024

This commit adds a swap_type field to the RFQ (Request for Quote) request message schema. The purpose of this field is to specify the desired swap type in the request. It enables the sender of the request message to clearly define whether they are seeking to exchange a Tap asset for BTC or vice versa. The addition of the swap_type field enhances the versatility of the RFQ request message.

blip-tap.md Outdated Show resolved Hide resolved
This commit adds a `swap_type` field to the RFQ (Request for
Quote) request message schema. The purpose of this field is to specify
the desired swap type in the request. It enables the sender of the
request message to clearly define whether they are seeking to exchange a
Tap asset for BTC or vice versa. The addition of the `swap_type` field
enhances the versatility of the RFQ request message.
@ffranr
Copy link
Author

ffranr commented Apr 4, 2024

In the future, this new field may enable the signaling of various swap types, such as those allowing for the partial fulfillment of quotes at the agreed rate, among other possibilities.

Copy link

@dstadulis dstadulis left a comment

Choose a reason for hiding this comment

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

To support a more asset-agnostic/extensible way of referring to this direction, how about we modify the field to be: in_asset / out_asset

Comment on lines +943 to +946
* `swap_type` is the type of swap the message sender is requesting. When the
`swap_type` is `1`, the sender is requesting a swap of their Tap asset for
BTC. When the `swap_type` is `2`, the sender is requesting a swap of their
BTC for the subject Tap asset.

Choose a reason for hiding this comment

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

To support a more asset-agnostic/extensible way of referring to this direction, how about we modify the field to be: in_asset / out_asset

Copy link

Choose a reason for hiding this comment

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

@dstadulis But one of the assets is always forced by the blockchain LN runs on, right? Why specify that?

Copy link
Author

Choose a reason for hiding this comment

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

@dstadulis

modify the field to be: in_asset / out_asset

I'm not sure I understand what you mean. Do you mean modify the swap_type field name? Or the asset_id field name? Or the way swap_type is documented?

When generalizing, we need to make sure we have all the necessary fields for it to make sense. Right now, we're only specifying one asset with asset_id and don't have any other field to mention another asset.

Copy link
Author

Choose a reason for hiding this comment

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

PR which takes the in/out asset approach: #3

Choose a reason for hiding this comment

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

This concept continues implementation here #3

@ffranr ffranr requested a review from dstadulis April 5, 2024 11:04
@ffranr ffranr closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants