Melt 40g butter in a large frying pan over medium heat. Add the onion and leek. Season. Cook, stirring occasionally, for 15 minutes or until the onion and leek soften.
Meanwhile, place the potato in a large heatproof bowl. Melt the remaining butter in a saucepan over low heat. Pour the butter over the potato. Add the thyme and season. Toss until well combined.
Preheat oven to 200C/180C fan forced. Grease a 20cm (base size) round cake pan with melted butter. Line with baking paper.
Arrange one-quarter of the potato over base of prepared pan. Top with one-third of the onion mixture then one-third of the cheese. Repeat layering to create 2 more layers. Arrange remaining potato in a spiral pattern on top. Press down firmly. Cover the pan with foil and bake for 45 minutes. Remove foil. Bake for a further 45 minutes or until potato is tender and golden. Set aside in the pan for 20 minutes to cool slightly. Sprinkle with extra thyme to serve.
