Credit an on-chain deposit exactly once and you have to remember which payments you already reported, and that memory has to outlive the process.