Preheat the oven to 350 degrees F. Grease and line with parchment paper two 9-inch cake pans, then grease again. Set aside. Sift together the flour, baking soda, baking powder, cinnamon, and salt together in a large mixing bowl. Set this aside.
280 grams all-purpose flour, 10 grams baking soda, 6 grams baking powder, 4 grams cinnamon, 1 grams salt
In a separate bowl, mix the sugar and oil together in a stand mixer or with a hand mixer. Beat well. 400 grams sugar, 155 grams oil
Add the sourdough discard and mix until blended. Then add the eggs one at a time and beat until well combined.
120 grams sourdough discard, 4 large eggs
Fold in the shredded carrots with a wooden spoon or spatula.
330 grams carrots, freshly shredded
Now, add the dry ingredients to the wet mixture a little bit at a time. Mix on low speed until the flour is just combined. Be careful not to over mix, otherwise this can lead to a dense cake. Lastly, fold in the chopped pecans, if desired.
80 grams pecans, chopped (optional)
Split the cake batter evenly between the two prepared pans and bake for 26-28 minutes or until golden brown and a toothpick comes out clean.
Place on a cooling rack and cool completely before topping with frosting.