Preheat the oven to 350°F (175°C). Line a 9-inch round cake pan with parchment paper and lightly grease the sides with coconut oil.
In a large mixing bowl, combine the almond flour, erythritol, cinnamon, baking powder, and salt. Whisk until well blended and the mixture appears uniform.
2 cups finely grated carrots
In a separate bowl, beat the eggs until slightly frothy. Add the melted coconut oil and vanilla extract, then mix until combined. The mixture should look smooth and slightly thickened.
2 cups finely grated carrots
Gradually pour the wet mixture into the dry ingredients, stirring gently with a spatula or spoon. Once incorporated, fold in the grated carrots and chopped nuts if using. The batter will be thick and slightly chunky from the carrots.
2 cups finely grated carrots
Pour the batter into the prepared cake pan. Smooth the top with a spatula, ensuring even distribution. Tap the pan lightly on the counter to remove air bubbles.
Bake in the preheated oven for about 30 minutes, or until the top is golden and a toothpick inserted into the center comes out clean. The edges should slightly pull away from the pan, indicating doneness.
Allow the cake to cool in the pan for 10 minutes, then transfer to a wire rack to cool completely before frosting or serving. The cake will be moist and dense with visible shredded carrots throughout.