Heat oil (or ghee) in a medium (20cm base measurement) frying pan on medium.
Add onion and sauté for a few minutes until they start to soften and caramelize (approximately 4-5 minutes). Add tomato, salt, sugar, ketchup and chilli flakes. Mix well and cook for another 3-4 minutes until tomatoes are softened and the mixture starts to look jammy. Spread mixture evenly around the frying pan.
Reduce heat to medium-low. Carefully crack both eggs on top of the tomato mixture, letting the whites slide everywhere to cover as much of the tomato mixture as possible. Cover the pan with a vented lid (if you don't have a vented lid, place your lid askew so that there is a bit of gap around the edges to let the steam escape. This is important in order to avoid having watery eggs.)
Cook for a maximum of 2 minutes until the yolks are just set. Remove from heat. Sprinkle with black pepper. Scatter green chilli and coriander. Serve hot with sourdough.