In a medium saucepan melt butter. Add in chocolate chips and cocoa powder. Stir until chocolate chips are melted. Set aside to cool.
In a separate bowl combine sugar, brown sugar, vanilla and eggs. Mix on medium speed with a hand or stand mixer for at least 5 minutes. This helps get the crackly crust.
Add the chocolate mixture and sourdough discard to the egg and sugar mixture. Mix until combined.
Fold in flour and salt. Don’t overmix.
In a 9×9 pan lined with parchment paper pour in the mixture.
Bake at 350 for 35-40 minutes. You want the middle to still be a little undercooked, but not raw.