From 7efe665c3f6ee8a8e71e57f6ab34144029a1fe70 Mon Sep 17 00:00:00 2001 From: Witold Date: Mon, 6 Nov 2023 14:41:01 +0000 Subject: [PATCH] refactor: add a note on pseudocode --- protocol/0053-PERP-product_builtin_perpetual_future.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protocol/0053-PERP-product_builtin_perpetual_future.md b/protocol/0053-PERP-product_builtin_perpetual_future.md index 32592a9019..c6df79c666 100644 --- a/protocol/0053-PERP-product_builtin_perpetual_future.md +++ b/protocol/0053-PERP-product_builtin_perpetual_future.md @@ -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: