Preheat your oven to 350°F (175°C).
Prepare a 9x9 inch baking pan by sprinkling with oil or lining it with parchment paper.
Over low heat, melt the butter in a medium saucepan.
Remove from the heat and stir in sugar until it is fully combined.
Add the eggs and vanilla extract to the saucepan, mixing thoroughly to combine.
Mix the dry ingredients in a separate bowl—this includes the flour, cocoa powder, salt, and baking powder.
Combine the wet and dry ingredients.
Then gradually add the dry ingredients to the wet ingredients, mixing until just combined. Avoid overmixing.
Stir in the sourdough and discard until it is evenly distributed throughout the batter.
Add chocolate chips and nuts (if using) and fold them into the batter.
Pour the batter into the prepared pan, spreading it evenly.
Bake for 20 to 25 minutes until a toothpick inserted in the center comes out with a few moist crumbs.
The baking time might vary slightly depending on the moisture content of your sourdough discard.
Before cutting them into squares, let the brownies cool in the pan.
