The consensus mechanism serves two distinct purposes. The first is to keep global monotonic time (which is what you call "protect from attacks"). The second is as an inflation protocol. Any time you create value where there previously wasn't you have inflation.
> a failed attack resulting in massive slashings
That's not a good mental model for adverse actors in blockchain systems. Failed attacks are normally not published, so they won't exist unless the conditions are right.