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

Seperate offers from libp2p #108

Open
binarybaron opened this issue Oct 10, 2024 · 0 comments
Open

Seperate offers from libp2p #108

binarybaron opened this issue Oct 10, 2024 · 0 comments
Labels
asb Related to the ASB (maker side) cli Related to the CLI (taker side) crate: swap Related to the "swap" crate refactoring Related to refactorings. No new features are added.

Comments

@binarybaron
Copy link

Currently the Offer returned by Alice to Bob is bound to the network channels. This introduces two major issues:

  1. It's not really designed to be able to "just request an offer" without taking the other party up on it. If Bob does so, Alice sees it as "Bob closed the channel unexpectedly"
  2. The offer duration (i.e. how long is the offer valid for) is integrated into the timeout of the libp2p channel. This is not ideal.

It'd be better to:

  1. Have a protocol that can be called to request an offer. Alice returns a struct that contains the price, minimum amount, maximum amount, id of the offer and for how long the offer is valid (either relative or absolute time). This protocol can then also be used for the when list-sellers is called (where we don't intend to take anyone up on the offer directly)
  2. Have another protocol for Bob to actually take Alice upon on her offer.
@binarybaron binarybaron added refactoring Related to refactorings. No new features are added. cli Related to the CLI (taker side) asb Related to the ASB (maker side) crate: swap Related to the "swap" crate labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asb Related to the ASB (maker side) cli Related to the CLI (taker side) crate: swap Related to the "swap" crate refactoring Related to refactorings. No new features are added.
Projects
None yet
Development

No branches or pull requests

1 participant