-
Notifications
You must be signed in to change notification settings - Fork 13
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
Mock partial swapping #528
Comments
I've initially tried adding yet another expandable list into the table (and to remove all extra rows) Since we want to find the best net profit and the liquidity is different between exchange protocols (and even routes), the prices will also be different per market for each amount. But the there is a complicated question of the connection between Notes:
Next step: find a good place to incorporate the table into the UI. I imagine it can become visible both:
|
Early remarks:
Agree to put this out of scope for now. Given my initial comment we might think about to stick to 100% bidding amount as the default and just provide option for user to change via table (without suggesting anything).
To me it makes sense to reduce complexity and go with the predefined chunks only (as seen in table) in the first place. |
I don't think that we should consider what's best for the protocol, because:
Yes, the idea is to display net profit, since that's what matters, but also add this popup to show more data
It means we can't get the price for whatever reason. Maybe there is not enough liquidity, maybe there is no pool at all, maybe the service is down (in case of 1inch). I suggest to include the exact error message in the popup.
The problem with that is we can't know for sure what percentage will be even tradable. Also, the user might find it very limiting since we provide this information for the other "Bid with DAI" flow. But if it adds too much complexity, I fine with splitting it into two issues. |
Yes this is what I was wrapping my head around. But agree, then by design of the protocol in most of the cases the complete swap will at the same time also be the most profitable one for the auction participant.
Understood, I like it. We just need to ensure to make it clear to the user (e.g. via table heading or by including the number in the popup again with the other details).
Makes sense, agree.
What prevents us from that?
It might be a little constructed argumentation: But one could argue that the fact of bringing own funds to the table (aka bidding with DAI) comes with the upside of higher flexibility in terms of the |
This depends on the amount of liquidity in the specific pool. In case we use automatic routing (or other non-standard tokens), it becomes increasingly hard to calculate since there are multiply pools involved in one transaction.
Yes, if we decide to go with the input, the error case will be handled just like in the Here is the version of the UI with 2D price tables.
General idea of this proposal is to show the same table (and component) two times in case user wants to change bidding amount or the callee but with other values (or maybe even show them both, so the table is exactly the same). In both cases as suggested before, we will "probe" a few proportions per market: 10%, 25%, 50%, 75%(or max minus chost), 100%. |
Ok got it. So we might end up in a situation where we are able to determine the price given a certain amount but the execution itself might fail due to missing liquidity? Or in other words: When determining the price we won't get an error yet in case of not enough liquidity?
I was rather trying to understand the how we would handle this
|
We certainly will get the error (or empty price) in case there is no liquidity. My proposal is that instead of trying to determine the liquidity of a pool (or in any other way try to determine "best" or "maximum" swap amount), we instead
In case of the "probes" approach we don't care about why the exchange fail: network error, not enough liquidity or not tradable pairs, all should result in So it is up to us if we want to include
👍 |
Ok agree. Think we were a little talking past each other. Sounds good... Ready to push to the next stage |
Goal
A user is able to use swapping to partially take collateral auctions.
Context
Currently, we only allow partial bidding on collateral auctions when participating with your own DAI. But it's also possible to do so with swap-like transaction using callee. The only technical problem (and the advantage for the user) is that every time the bid amount is changed, the market unit prices will also change (and we might also need to refetch them in order to display correct numbers).
Note: this feature was first time proposed in #229
Tasks
The text was updated successfully, but these errors were encountered: