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

Estimated market impact #284

Closed
jalextowle opened this issue Jul 25, 2023 · 3 comments
Closed

Estimated market impact #284

jalextowle opened this issue Jul 25, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jalextowle
Copy link

Is your feature request related to a problem? Please describe.
I'm always frustrated when I open a long to see that it pushed the rate further down than I expected. I guess I'm really frustrated by the fact that I don't know what the ending rate will be and I have to guess (using "frustrated" since it's a user story).

Describe the solution you'd like
I'd like to see the estimated market rate and the impact on the market (i.e. how much did the rate change). Seeing this compared to my slippage tolerance would be a good way to estimate revert likelihood and is generally a nice feature.

Describe alternatives you've considered
Slippage tolerances do serve a similar purpose. We could also show similar impact estimations for the spot price.

With MEV in mind, we may have to be more sophisticated to give users a realistic estimation of impact. If MEV bots always bring users trades to the minOutput, the minOutput would be a more reasonable guess than the simulation. My guess is that reality will be somewhere in between, but it's a real question.

Additional Context
In the trading competition, I opened a large short at 1.47% because I thought I was seizing a great opportunity. The variable rate is 5%, and my short brought the rate to 16%. With this in mind, I made a terrible trade, but there was nothing that showed me that I was making a bad decision. Even with slippage tolerance, it would be nice to see an estimated impact so that I can set reasonable expectations.

@jackburrus
Copy link
Contributor

jackburrus commented Jul 31, 2023

Given what we have today on the FE, is this calculation possible? ie. Open Long currently only returns the number of open bonds you get back. Can it also include the rate impact? If not, how could we calculate this on the frontend?

@ryangoree ryangoree added the enhancement New feature or request label Aug 1, 2023
@DannyDelott
Copy link
Contributor

If the new Preview contract can include the new bondReserves and shareReserves, then this can be done easily with the feature proposed here: delvtech/hyperdrive#464

@ryangoree ryangoree added this to the Frontend: Trading UI MVP milestone Aug 2, 2023
@ryangoree
Copy link
Member

@jalextowle Can we implement this in the SDK?

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

4 participants