Feature/dos mitigation


This is the rough draft we talked about.
I don't know what branch you want this merge into...