Skip to content

Commit

Permalink
refactor: add a note on pseudocode
Browse files Browse the repository at this point in the history
  • Loading branch information
witgaw committed Nov 6, 2023
1 parent 2b418d3 commit 7efe665
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protocol/0053-PERP-product_builtin_perpetual_future.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ return numerator / denominator
```

Note that depending on what type of oracle is used for the spot price it may be that the oracle points only become known shortly before or at the funding payment cue time, so the above pseudocode is just an illustration of how these quantities should be calculated and the implementation will need to be able to apply such calculation retrospectively.

#### Funding payment calculation

The next step is to calculate the periodic settlement funding payment. We allow the optional interest rate and clamp component, where $\text{clamp}(a,b;x)=min(b,max(a, x))$. The funding payment then takes the form:
Expand Down

0 comments on commit 7efe665

Please sign in to comment.