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

Chaining Offers #498

Open
stubbrn opened this issue Jul 3, 2023 · 1 comment
Open

Chaining Offers #498

stubbrn opened this issue Jul 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@stubbrn
Copy link
Contributor

stubbrn commented Jul 3, 2023

It might be more practical for makers if their offers would somehow be more akin to liquidity pools that takers can draw from, instead of a one-of operation where 1 offer always incur 1 swap.

A maker may prefer to essentially be able to say to the network: "Here's 25 XMR of liquidity at this rate." once and then let different takers consume arbitrary-sized bites of that offer.

The simplest way to achieve this could be to automatically recreate an offer after a successful swap with a taker (when a new parameter is set to true) if the taker didn't consume all the liquidity.

In the case that the taker didn't consume all the liquidity and that the remaining liquidity is less to the min amount required by the offer, we can automatically create one last offer where both the min and max amounts are the remaining liquidity.

@noot
Copy link
Collaborator

noot commented Jul 3, 2023

I like this idea, I think it shouldn't be too hard to implement like you said - just make a new offer after the swap completes with the remaining liquidity. you could even do this before the swap completes, but then if the swap doesn't complete successfully we'd need to delete the auto-created offer with the leftover liquidity.

@noot noot added the enhancement New feature or request label Jul 3, 2023
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

No branches or pull requests

2 participants