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

fix: Calculate liquidation price from opposite direction if the position is reduced #2459

Merged
merged 10 commits into from
Apr 23, 2024

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Apr 22, 2024

fixes #2403

Additionally I reworked the confirmation screen a bit. Nothing fundamental, but tweaked a little bit what information is shown depending on the corresponding trade action.

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-04-22.at.16.45.18.mp4

@holzeis holzeis self-assigned this Apr 22, 2024
@holzeis holzeis force-pushed the fix/liquidity-price-calculation branch from 9c0a78d to 39a194a Compare April 22, 2024 15:05
Copy link
Contributor

@luckysori luckysori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't thoroughly review the diff, but I love the changes.

Copy link
Contributor

@bonomat bonomat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it works but I don't understand it. Maybe you can explain how openQuantity works?

@holzeis holzeis force-pushed the fix/liquidity-price-calculation branch from 59eafde to 63cd49e Compare April 23, 2024 06:56
@holzeis holzeis force-pushed the fix/liquidity-price-calculation branch from 63cd49e to 2e5552d Compare April 23, 2024 06:56
@holzeis holzeis enabled auto-merge April 23, 2024 06:57
@holzeis holzeis added this pull request to the merge queue Apr 23, 2024
Merged via the queue into main with commit f3a221d Apr 23, 2024
21 checks passed
@holzeis holzeis deleted the fix/liquidity-price-calculation branch April 23, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Liquidation price on resize is calculated wrongly
3 participants