Mix sugar, cornstarch, salt, and cocoa in a medium sauce pan. Whisk in the water. Heat over medium until it gets thick and starts to boil. Boil for 1-2 minutes (make sure you don't boil too long, or it will set like toffee). Remove from heat and stir in oil and vanilla. Cool and spread on cooled cake.
Enjoy!