squeeth-monorepo icon indicating copy to clipboard operation
squeeth-monorepo copied to clipboard

Change historical funding to be compounded

Open alexisgauba opened this issue 2 years ago • 0 comments

Please describe the problem you're having. Squeeth has funding in kind, but the current funding graph does a simple annualization calculation corresponding to cash funding. This is more similar to other perp platforms, but can be confusing to users as it does not have the funding in kind dynamic of never being able to lose more than 100% due to funding. Funding in kind / compound is more accurate but does differ from other platforms

The current version users simple annualization. Here we should create a version of the funding graph that is compounded

We should have a tooltip or some description that specifies how it is being calculated and that it is compounded

Additional context https://opyn.slack.com/archives/C02QMRTJX5J/p1645722223283949

https://opyn.slack.com/archives/CG0MDTWJ1/p1648745853110139

Can sync with alpinechicken for exact calculations

Take the initial amount you start with with and add the below for short or subtract for long

  • exp(-annualized rate)-1

alexisgauba avatar Mar 04 '22 05:03 alexisgauba