Cut the onion into strips and chop the garlic and ginger.
Remove the skin from the sweet potatoes and eventually the squash and clean the vegetables, then cut them into medium-sized pieces.
Heat a small amount of oil (olive or sunflower) in a casserole or large saucepan. Brown the onion over a low heat and stir from time to time. After 5 minutes, add the garlic and ginger and fry for another 5 minutes.
Meanwhile, prepare about 600 ml of vegetable stock.
Add the tomato paste and turmeric and optionally the chilli. Mix well and heat for 2 minutes.
Add the vegetables, mix again and cover the vegetables with the stock.
Add the bay leaves and simmer uncovered for 20 minutes, stirring occasionally.
Mix the peanut paste with hot water.
After 20 minutes of cooking, add the diluted peanut paste. Stir vigorously and cook again without a lid for a good 20 to 30 minutes.
Check that the vegetables are cooked with the tip of a knife: the flesh should be melting. The sauce should also thicken. It will continue to thicken after cooking if you prepare the maafe in advance and let it cool.