It remembers the difference, but it isn't a debt as nothing is considered due or owed.
Isn't that just arguing semantics?
Nowhere in there does it mention "remembering" the difference between the ideal payout and the realized payout.
It mentions it with "TotalMinerWork" and "TotalPaid" which are long-term values, lasting during the existence of your pool. After paying proportionally, TotalPaid increases but not enough to match TotalMinerWork, so the next round it will attempt again to make all the miners whole.
SMPPS and its variations suffer from long-term block withholding attacks, and will never recover from them unless the pool-op uses their fees to re-balance the coffers, or uses Generation Fees if they are enough.
Here's a variation that is at least partially immune to block withholding, and is simple to implement. I'm sure it was already mentioned in this thread:
On Valid Share: Add share to database, with values like (user_id, datetime, round, difficulty, value, paid). Value is the current PPS value (50 / Difficulty if the pool takes no fees). paid is False initially.
round and difficulty are for future-proofing, like handling Generation Fees. If the exact value cannot be determined at time of submittal, it can later (at end of round) be calculated from round and difficulty.
On Round End: Select all shares from the database where paid is False, sorted from oldest to newest. Using available pool funds, pay each share in full from oldest to newest, marking paid as you go, and stop when no more funds are available.
OR: Select all shares from the current round, pay in full from oldest to newest with
half of the available funds. Repeat with all unpaid shares with the remaining funds.
It's simple from a coding perspective, and would result in less chance of making a mistake because you are keeping a log of all paid and unpaid shares (which you could even publish). You could even switch schemes at a later date, and still pay people fairly because you have a record of all their shares.
From a miner's perspective, it's simple: "You earn X amount of BTC per share, and get paid when funds are available."
And for the nosy miners who want more details: "Shares are paid out from oldest to newest, so you eventually get paid no matter what."
The alternative I mentioned above (in OR) might be preferred if people fear that they won't be paid soon enough for the work they are doing during the current round. The downside is that it does not
discourage block withholding attacks, because everyone, including the attackers, get paid eventually. Block withholding will make payments take longer, so it's still affected by them but not in a way that starves the miners of income.