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

Mid price #121

Merged
merged 7 commits into from
Sep 30, 2023
Merged

Mid price #121

merged 7 commits into from
Sep 30, 2023

Conversation

atvanguard
Copy link

Why this should be merged

  • Use mid price instead of last price for determining pnl. Corresponding contracts PR.

plugin/evm/orderbook/liquidations.go Outdated Show resolved Hide resolved
plugin/evm/orderbook/memory_database.go Outdated Show resolved Hide resolved
plugin/evm/orderbook/memory_database_test.go Outdated Show resolved Hide resolved
plugin/evm/orderbook/service.go Show resolved Hide resolved
@atvanguard atvanguard merged commit 6906227 into main Sep 30, 2023
@atvanguard atvanguard deleted the mid-price branch September 30, 2023 07:31
atvanguard added a commit that referenced this pull request Sep 30, 2023
* calcMarginFraction -> hu.GetMarginFraction

* lastPrice -> midPrice in precompile

* LastPrices -> MidPrices

* fix e2e tests

* review/safer code

* Add margin_math tests

* review comments

---------

Co-authored-by: Shubham Goyal <[email protected]>
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.

3 participants