Incorrect approach to tracking the PnL of a DV
Let $DV_A$ be a certain destination vault.\\nAssume that at $T0$, the current debt value (currentDvDebtValue) of $DV_A$ is 95 WETH, and the last debt value (updatedDebtBasis) is 100 WETH. Since the current debt value has become smaller than the last debt value, the vault is making a loss of 5 WETH since the last rebalancing, so $DV_A$ is sitting at a loss, and users can only burn a limited amount of DestinationVault_A's shares.\\nAssume that at $T1$, there is some slight rebalancing performed on $DV_A$, and a few additional LP tokens are deposited to it. Thus, its current debt value increased to 98 WETH. At the same time, the `destInfo.debtBasis` and `destInfo.ownedShares` will be updated to the current value.\\nImmediately after the rebalancing, $DV_A$ will not be considered sitting in a loss since the `currentDvDebtValue` and `updatedDebtBasis` should be equal now. As a result, users could now burn all the $DV_A$ shares of the LMPVault during withdrawal.\\n$DV_A$ suddenly becomes not sitting at a loss even though the fact is that it is still sitting at a loss of 5 WETH. The loss has been written off.\\n```\\nFile: LMPDebt.sol\\n        // Neither of these numbers include rewards from the DV\\n        if (currentDvDebtValue < updatedDebtBasis) {\\n            // We are currently sitting at a loss. Limit the value we can pull from\\n            // the destination vault\\n            currentDvDebtValue = currentDvDebtValue.mulDiv(userShares, totalVaultShares, Math.Rounding.Down);\\n            currentDvShares = currentDvShares.mulDiv(userShares, totalVaultShares, Math.Rounding.Down);\\n        }\\n```\\n
Consider a more sophisticated approach to track a DV's Profit and Loss (PnL).\\nIn our example, $DV_A$ should only be considered not making a loss if the price of the LP tokens starts to appreciate and cover the loss of 5 WETH.
A DV might be incorrectly marked as not sitting in a loss, thus allowing users to burn all the DV shares, locking in all the loss of the DV and the vault shareholders.
```\\nFile: LMPDebt.sol\\n        // Neither of these numbers include rewards from the DV\\n        if (currentDvDebtValue < updatedDebtBasis) {\\n            // We are currently sitting at a loss. Limit the value we can pull from\\n            // the destination vault\\n            currentDvDebtValue = currentDvDebtValue.mulDiv(userShares, totalVaultShares, Math.Rounding.Down);\\n            currentDvShares = currentDvShares.mulDiv(userShares, totalVaultShares, Math.Rounding.Down);\\n        }\\n```\\n