Preheat oven to 350 degrees. Butter and flour two 8 in cake pans. (Or you can use 9x13 baking pan.)
Cream together butter and sugars on medium/high speed with paddle attachment in bowl of a stand mixer. Mix for about 2-3 minutes, until light and fluffy.
Add eggs, vanilla extract, and sourdough starter discard and blend on medium speed.
Add dry ingredients and mix to combine. Mix on low speed, just until the flour mixture is combined with wet ingredients. Scrape down sides and bottom of the bowl to make sure that all the dry ingredients are mixed in properly.
Fold in grated carrots.
Pour batter into two 8 inch greased cake pans and bake in preheated oven for 35-40 minutes or until the toothpick comes out clean when poked into the center of the cake.
Let cake cool in pans for about 5 minutes. Then turn them out of the pans onto a wire rack to cool completely.