Pour the beans onto a sieve, rinse with cold water and drain. Peel and roughly dice the onion. Peel garlic and chop finely. Clean and wash the leek and cut into rings.
Wash the thyme, dab dry and put 2-3 stems aside for garnishing, pluck the leaves from the remaining stems. Heat the oil in a pan, fry the onion, garlic and leek in it while turning, add the beans and thyme and fry briefly.
Add the tomato paste. Deglaze with stock and ketchup, bring to the boil and simmer at low heat for about 5 minutes. Season to taste with salt, pepper, paprika, cayenne pepper and sugar. In the meantime, put bacon in a hot pan without fat and skip.
Remove from the pan. Add the fat to the pan, heat it up, break the eggs and let them slide into the pan. Fry over medium heat. Season with salt and pepper. Garnish bean pan with thyme and serve with eggs and bacon.