Description
On the merge of a liquidator position following a liquidation, the realizedPnl from the previous position is not added to the marginToRemove() variable, but it is removed from the openNotional, leading to loss of yield for the liquidator.
Recommendation
Add the = symbol to the operation marginToRemove += params.rpnl;.
Status
Addressed in the AMMRouter