Combat lag compensation Idea/feedback

Hello,

I started getting into the concept of advanced combat system which include client-side prediction and lag compensation. The method of lag compensation I used in this images compares the client time of activation and the server receive time if its above the threshold ill delay all actions for the lag time (Attacks, skills…).

Now I’m not sure if this is good or is there a better way to do this please let me know I’m looking for feedback

One more thing if the lag time is over lets say 2 seconds should I completely deny the action

Thanks!