You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When showing a user's position value after maturity the FE uses our hyperdrive-rs calculate_close_long to estimate the shares returned to the user. This uses the current vault share price and does not account for Hyperdrive auto-closing positions at maturity, which therefore fails to account for zombie interest going to the LPs.
Solution
Ideally we would account for checkpointing, auto-closing positions, and zombie interest in hyperdrive-rs itself (#23).
Until then, you can adjust the value reported to the user pretty easily. Using the share price at maturity (which can be obtained from the corresponding checkpoint event), calculation is user_return_in_shares = rust_shares_returned * maturity_share_price / current_share_price.
If the user wants base back, then you don't do the last conversion: user_return_in_base = rust_shares_returned * maturity_share_price.
The text was updated successfully, but these errors were encountered:
This is also described in delvtech/agent0#1683
Problem
When showing a user's position value after maturity the FE uses our hyperdrive-rs calculate_close_long to estimate the shares returned to the user. This uses the current vault share price and does not account for Hyperdrive auto-closing positions at maturity, which therefore fails to account for zombie interest going to the LPs.
Solution
Ideally we would account for checkpointing, auto-closing positions, and zombie interest in hyperdrive-rs itself (#23).
Until then, you can adjust the value reported to the user pretty easily. Using the share price at maturity (which can be obtained from the corresponding checkpoint event), calculation is
user_return_in_shares = rust_shares_returned * maturity_share_price / current_share_price
.If the user wants base back, then you don't do the last conversion:
user_return_in_base = rust_shares_returned * maturity_share_price
.The text was updated successfully, but these errors were encountered: