Combine cocoa and the boiling water, stirring until cocoa has dissolved.
With an electric mixer on medium-high speed, beat butter, confectioners' sugar, and salt until pale and fluffy. Reduce speed to low. Add melted and cooled chocolate, beating until combined and scraping down sides of bowl as needed.
Beat in vanilla (if using)
Beat in the cocoa mixture. If not using immediately, frosting can be refrigerated up to 5 days, or frozen up to 1 month, in an airtight container. Before using, bring to room temperature, and beat on low speed until smooth again.