PERCOLATOR ENGINE BUG #204: STALE LEDGER.RESIDUAL_REMAINING FIELD NOT UPDATED AFTER PARTIAL LOSS REPAYMENT, CAUSING WINNING TRADERS TO BE CHARGED FOR SETTLED LOSSES AND BLOCKING MARKET FINALIZATION
CURRENT POST (new facts must come from this post): 2/6: #204: the system forgets that a debt was partly repaid When an account blows up, the engine closes it in pieces, and writes down how much loss is outstanding when it starts. If part of that loss gets settled midway, an owner tops up, or a liquidation pays some down: that note is never updated. The next piece charges the original figure again. Effect: the traders on the winning side are charged for losses that no longer exist. The same stale field also gates finalization, so the close can end up unable to finish at all. (stale ledger.residual_remaining booked instead of the fresh residual) https://github.com/aeyakovenko/percolator/issues/204 EARLIER SAME-AUTHOR POSTS (reference only; do not re-report): Root (@PercolatorTrade): 🧵🪡1/6: Our team filed four findings against @toly 's Percolator engine this week, the engine our protocol is built on. All four are verified against current upstream main (8eb7142a), and all four are still open. Here's what each issue actually does, in plain terms: https://github.com/aeyakovenko/percolator