Heat oven to 160C (140C fan). Season the beef generously with salt and pepper. Sear in a hot pan with a little oil in two batches until browned all over, then transfer to a casserole dish.
Soften the onions in the same pan for 5 minutes, then stir in the flour and crumbled stock cube. Add the boiling water, scraping up the sticky bits, and simmer for a minute until slightly thickened. Pour over the beef and stir in the thyme.
Layer the potato slices over the top in overlapping rows, like fish scales, covering the filling completely. Brush the potatoes with the melted butter and season with a little more salt and pepper.
Cover with a lid and bake for 2 hours, then remove the lid and bake for a further 30 minutes until the potatoes are golden at the edges and a knife slides through them easily.
Rest for 10 minutes before serving, then scoop down through the potato lid so everyone gets potato, beef and gravy in each spoonful.