-
Notifications
You must be signed in to change notification settings - Fork 78
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
Tell the user about the swap limits #255
Comments
In my understanding we touch three different topics in this issue:
I don't think we should invest time into 3. because it is a rabbit hole. I see the biggest problem at our execution_setup, that is tightly coupled to quote request/response. I am not sure we need an entirely new protocol to achieve 1. and 2. - but we will have to separate the swap_execution trigger from the quote request/response. I think the CLI should be able to do a quote request and just get a response without any execution setup. Concerning 1. I think it would be easier to change the ASB's maximum amount acceptable to BTC. By doing so we take the problem of calculating "what is allowed" away from the user, but then have the problem that the ASB has to decide if a trade of max BTC can be fulfilled with the current XMR balance. |
Correct. The problem is that the ASB already kicks of a new swap as part of the quote request. In order to make the rest of the application work, we would need to either:
What I don't like about it is that it is not longer strictly "execution setup". Thoughts?
Agreed. It shouldn't be too hard to validate, whether the XMR amount exceeds the current balance. |
I would decouple the
Agreed. |
Okay, here is my progress: I managed to extract a nice "quote" behaviour that allows Bob to query quotes from Alice and he gets a price + a max quantity. That is what we need on the CLI in order to display it to the user. Several open questions:
|
Instead of instantiating the `EventLoop` within the builder, we only pass in the necessary arguments (which is the `EventLoopHandle`) to the Builder upon `new`. This is work towards #255 which will require us to perform network communication (which implies having the `EventLoop`) before starting a swap.
I think the execution setup will remain the same. The new "quote" behaviour will just be used to get data to feed to our existing behaviour which I think should remain unchanged. |
Instead of instantiating the `EventLoop` within the builder, we only pass in the necessary arguments (which is the `EventLoopHandle`) to the Builder upon `new`. This is work towards #255 which will require us to perform network communication (which implies having the `EventLoop`) before starting a swap.
Yep, @da-kami and I discussed this and came to the following conclusion:
|
Instead of instantiating the `EventLoop` within the builder, we only pass in the necessary arguments (which is the `EventLoopHandle`) to the Builder upon `new`. This is work towards #255 which will require us to perform network communication (which implies having the `EventLoop`) before starting a swap.
257: Allow ASB to be configured with max BTC buy amount r=thomaseizinger a=thomaseizinger This will make it easier to also configure the CLI to display an appropriate max amount the user has to deal with. This is the first step in working towards #255. Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Previously, the user neither knew the price nor the maximum quantity they could trade. We now request a quote from the user and display it to them. Fixes #255.
Previously, the user neither knew the price nor the maximum quantity they could trade. We now request a quote from the user and display it to them. Fixes #255.
257: Allow ASB to be configured with max BTC buy amount r=thomaseizinger a=thomaseizinger This will make it easier to also configure the CLI to display an appropriate max amount the user has to deal with. This is the first step in working towards comit-network/xmr-btc-swap#255. Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
The ASB currently limits the amount we can swap to a specific XMR value.
We should tell the user a max amount of BTC that we can swap while we are waiting for their funds.
We should also display the rate to them and potentially a timeout for how long this rate is valid. To do that, we need more information from the ASB about the rate before the swap even starts.
Suggestion:
The text was updated successfully, but these errors were encountered: