To begin, preheat your oven to 200°C (180°C fan). Prick the aubergines several times and place them on a lined tray. Roast for 35 to 40 minutes, turning once, until the skins blister and the flesh collapses fully. Set aside to cool before handling.
Remove and discard the skins, then place the soft flesh into a sieve set over a bowl. Press gently to release excess liquid. This step is essential for a thick, well balanced dip.
If using onions, heat a little olive oil in a pan over low heat. Add the sliced onion with a pinch of salt and cook slowly for 15 to 20 minutes until soft and golden. Avoid browning. Remove from the heat and allow to cool slightly before combining.
Finely chop the drained aubergine with a knife rather than a blender. This preserves texture, which is key to a traditional Borani. Transfer to a mixing bowl.
Warm the olive oil in a small pan over low heat. Add the grated garlic and cook gently for about 30 seconds until fragrant but pale. Remove immediately to prevent bitterness.
Add the yoghurt to the chopped aubergine and mix gently. Pour in the warm garlic oil and season with salt. Stir carefully until smooth but not loose.
Fold in the caramelised onions if using, followed by the dried mint. Taste and adjust seasoning, keeping the flavours soft and balanced.
Cover and refrigerate for at least 20 minutes. This resting period allows the yoghurt and aubergine to settle and develop a unified flavour.
Spoon the Borani Bademjan into a shallow dish. Garnish with walnuts or extra mint if desired, and serve with warm flatbread or alongside other Persian dishes.