delvtech / hyperdrive

An automated market maker for fixed and variable yield with on-demand terms.
Apache License 2.0
33 stars 4 forks source link

`calculate_targeted_long` #864

Closed jalextowle closed 7 months ago

jalextowle commented 8 months ago

We should add a function to the Rust SDK that calculates the long amount that brings the pool to a targeted effective rate (including fees). Traders could use this to calculate the optimal trade to make given their expected future variable rate.

dpaiton commented 8 months ago

duplicate of https://github.com/delvtech/hyperdrive/issues/775