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

feat(perp): add basic clearing house methods #1333

Merged
merged 4 commits into from
May 10, 2023

Conversation

k-yang
Copy link
Member

@k-yang k-yang commented May 10, 2023

Description

  • checkOpenPositionRequirements checks that the quote asset amount and leverage parameters are okay
  • transferFee sends fees to the exchange fee pool and ecosystem fund
  • checkPriceFluctuationLimitRatio checks if the change in mark price is greater than allowed

Tests will follow with #1303.

Purpose

It makes adding the clearing house OpenPosition and ClosePosition functions easier.
See #1310 for more details.

@k-yang k-yang marked this pull request as ready for review May 10, 2023 03:45
@k-yang k-yang requested a review from a team as a code owner May 10, 2023 03:45
@k-yang k-yang self-assigned this May 10, 2023
@Unique-Divine Unique-Divine merged commit 2446e7c into master May 10, 2023
@Unique-Divine Unique-Divine deleted the feat/perp/v2/clearing-house-basics branch May 10, 2023 09:09
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.

None yet

2 participants