Put powdered sugar in a large bowl. Bring margarine, buttermilk and cocoa to a boil in a saucepan over medium heat; stir constantly. Pour cocoa mix over sugar, stirring until smooth. Mix in vanilla extract.