-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chainsync safe closeout #1616
chainsync safe closeout #1616
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1616 +/- ##
==========================================
+ Coverage 81.52% 81.55% +0.03%
==========================================
Files 98 98
Lines 7263 7265 +2
==========================================
+ Hits 5921 5925 +4
+ Misses 1342 1340 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but this is assuming the equation itself is correct in estimating PNL.
Chainsync uses
calc_close_*
for estimating closeout value, which could fail if the pool is in a situation where positions cannot be closed. We ware working on a general solution for this here: delvtech/hyperdrive-rs#153This PR is a temporary solution that approximates the closeout value using spot price.