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(perp)!: funding payments #975

Merged
merged 10 commits into from
Oct 3, 2022
Merged

fix(perp)!: funding payments #975

merged 10 commits into from
Oct 3, 2022

Conversation

NibiruHeisenberg
Copy link
Contributor

@NibiruHeisenberg NibiruHeisenberg commented Sep 23, 2022

Description

  • rename funding rate to premium fraction
  • update field names in tests, Events, and Position struct
  • fix premium fraction calculation in perp epoch hook

Purpose

See https://www.notion.so/nibiru/Funding-Payments-5032d0f8ed164096808354296d43e1fa for a detailed description of the funding payment calculation fixed by this PR.

BREAKING CHANGE: changes the way premium fractions and positions are stored in state

@NibiruHeisenberg NibiruHeisenberg requested a review from a team as a code owner September 23, 2022 22:08
@NibiruHeisenberg NibiruHeisenberg changed the title fix(perp): funding payments fix(perp)!: funding payments Sep 23, 2022
@NibiruHeisenberg NibiruHeisenberg self-assigned this Sep 23, 2022
@NibiruHeisenberg NibiruHeisenberg added this to the Testnet V1 milestone Sep 23, 2022
@jgimeno jgimeno enabled auto-merge (squash) September 28, 2022 16:35
@jgimeno
Copy link
Contributor

jgimeno commented Sep 29, 2022

@NibiruHeisenberg there are conflicts

@jgimeno jgimeno merged commit f6db99a into master Oct 3, 2022
@jgimeno jgimeno deleted the fix/funding-rate branch October 3, 2022 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(perp): funding rate payments should be computed as a fraction of open notional
4 participants