I logged on, and started filling up my raid chest;
I gained approximately 200 cups during this time, to get to the diamond tier. But when I left the raid page to the main page, the pop up with attacks when you were offline showed up with an attack approximately 15 minutes ago (I didn’t pay attention because I normally don’t care), where I actually won that raid, and got +12 cups.
But since that raid was done before my own raids, my number of cups reverted back to what it was before I did my raids, +12 cups from that enemy raid.
Or at least, that’s how I gathered this worked, because I didn’t actually pay attention to the numbers beforehand, but certainly, I went from 24xx cups to 22xx cups in a few seconds, with no attacks other than that one enemy raid from 15-20 minutes ago.