Heat the oil in a wok until just smoking (180°C/350°F), and deep-fry the crab in batches until bright red and cooked through, then drain on paper towel.
Pour all but 3 tablespoons of oil from the wok, and reheat the wok until just below smoking point. Add the coconut cream and stir-fry until it ‘splits’, then add the lime leaves and chilli paste, stir-fry for 2 minutes more, then finally add the fish sauce and palm sugar, and cook for another minute for the flavours to mingle. Add the crab to the wok and toss together. Stir in the basil and spoon onto a large plate to serve.