Melt the coconut oil in a heavy pan. Add the onions, fennel seeds, and a big pinch of salt. Cook for 15 to 20 minutes until the onions are caramelized and jammy.
Meanwhile, pound together the chiles, garlic, and ginger in a mortar and pestle - alternatively, grate or finely chop them.
Add the chile-garlic mixture to the pan and cook for 5 minutes until fragrant.
Add the tomatoes and spices and cook for another 20 minutes until the sauce is very thick.
Add the coconut milk and bring to a simmer.
Make some wells in the sauce and crack the eggs into the holes.
Put a lid on the pan and allow it to gently bubble for 6 to 7 minutes until the whites are set but the yolks are still a bit runny.
Serve with crusty bread, a squeeze of lime, and a final sprinkling of garam masala over the top.
