Heat the oil in a sauce pot over medium heat. Saute the carrots, celery and onions, followed by the garlic. Cook to lightly caramelize the vegetables. Add the chile flakes and cook for 30 seconds. Deglaze with the wine and cook out the alcohol for about 1 minute.
Add the potatoes, tomatoes and tomato paste. Stir and cook for about 5 minutes. Remove from the heat and add the oregano and basil, and season with salt and pepper.
Transfer to a blender and blend to desired consistency. Return the sauce to the sauce pot and swirl in the butter to level out the acidity of the sauce.
When blending hot liquid, first let it cool for five minutes or so, then transfer it to a blender, filling only halfway. Put the lid on, leaving one corner open. Cover the lid with a kitchen towel to catch splatters, and pulse until smooth.