divaprotocol / diva-monorepo

Diva Monorepo
https://diva.finance
4 stars 4 forks source link

Fix break-even calc #795

Closed Walodja1987 closed 1 year ago

Walodja1987 commented 1 year ago

The break even price was incorrectly calculated because the price variable in calcBreakEven function was not scaled to 18 decimals as all the other variables (gradient, inflection, floor and cap).

This PR fixes this.