Saute the tofu in a bit of oil until slightly browned. Remove from heat and set aside.
Heat a pot over medium heat and add the coconut milk. Stir in the curry paste and simmer for a couple of minutes until nicely fragrant.
Add the bay leaves, sugar, fish sauce, cinnamon stick, tamarind paste, and water and stir to mix well. Taste and add the soy sauce if using. Keep in mind that the flavors will develop as the dish cooks so don’t be overly eager with the salty condiments to start with, you can always add more at the end.
Add the potatoes, carrots, sauteed tofu, and peanuts and simmer, covered, for 15-20 minutes until the potatoes are cooked through. Be careful it doesn’t boil over as this can happen quickly if the curry gets too hot too fast.
Add the onions and continue simmering for about five minutes until the onions become soft but still keep their shape. Adjust seasoning and serve!