Richard Holzeis
Richard Holzeis
I opted to finish this PR up to a point where it can be merged and left a couple of todos that need to get addressed when we start implementing...
https://github.com/get10101/10101/assets/382048/8f0f9fad-19a7-4484-ac24-294ab7ca1585
🤔 I don't think this is how we calculate PNL. The payout is already `collateral_reserve + trader_margin +/- pnl`. So to get the PNL you would have to subtract `collateral_reserve`...
These are fair assumptions, given that the `PreClosed` and `Closed` variants are _supposed_ to refer to a force-closed channel if the `attestations` field is set. But looking at the `rust-dlc`...
I think the same applies if the position is expired. I guess the delay comes from the time until the connection is established and the rollover initiated.
Instead the pnl should only be shown on the quantity that is reduced. 