Skip to content

docs: fix funding rate clamp, payment formula, and market order clearing price#217

Open
GeorgeTsimos wants to merge 1 commit into
mainfrom
docs/fix-markets-formulas
Open

docs: fix funding rate clamp, payment formula, and market order clearing price#217
GeorgeTsimos wants to merge 1 commit into
mainfrom
docs/fix-markets-formulas

Conversation

@GeorgeTsimos
Copy link
Copy Markdown

  • `perpetuals.md`: Funding rate clamp lower bound corrected from `0` to `−max_funding_rate` — the formula contradicted the text below it which already described negative rates.
  • `perpetuals.md`: Funding payment formula now includes `× (elapsed / funding_window)` — the proration factor was missing, making the formula independent of batch duration.
  • `orderbook.md`: Added a paragraph after the clearing algorithm explaining that market orders don't influence the clearing price, and what happens when only one side has a limit order at the margin or no limit orders were matched at all.

…ing price

- funding_rate clamp lower bound was 0; corrected to −max_funding_rate so
  negative rates (shorts pay longs) are represented accurately
- funding_payment formula was missing the (elapsed / funding_window) proration
  factor; without it the formula implied a fixed per-batch charge independent
  of batch duration
- added a paragraph to the orderbook clearing section explaining that market
  orders do not influence the clearing price, and what happens in the one-sided
  and all-market-order degenerate cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants