delvtech / hyperdrive-rs

Rust SDK for the Hyperdrive AMM.
https://docs.rs/crate/hyperdrive-math/latest
Apache License 2.0
2 stars 0 forks source link

fix calculate_implied_rate to exclude the backpaid interest from the cost basis #120

Closed MazyGio closed 5 months ago

MazyGio commented 5 months ago

Resolved Issues

119 Implied rate (Short ROI) is negative in some cases where fixed > variable

Description

This excludes the short's backpaid interest from implied_rate calc

Review Checklists

Please check each item before approving the pull request. While going through the checklist, it is recommended to leave comments on items that are referenced in the checklist to make sure that they are reviewed.