Roast the Besan:Set a 6 quart Instant Pot to sauté (default medium setting) and allow the pot to heat up for a couple of minutes. Add the besan to the instant pot and dry roast the besan, stirring occasionally, for 20-25 minutes or until it smells toasty and the color slightly darkens by a shade or two. Remove the besan from the pot and set it aside for now (if you’re unsure whether it’s toasted properly, you can taste a pinch of it - if it’s bitter, that means it’s still raw). Wipe down the pot with a dry paper towel, then add sugar and water to the pot and mix well.
Secure the lid and cook for 11 minutes at high pressure.
Quick-release pressure.
Add the roasted besan, ghee, cardamom, and quickly stir until well combined. You’ll need to be quick as this mixture thickens fast, making it tough to stir well.
Spoon the mixture into a greased 8x8 or similar sized pan/dish and spread it out with a spatula. If using nuts, press them into the fudge while it’s still warm (you can use parchment paper to press them in). The fudge sets in minutes - make sure to slice it right away and then let it cool before removing the slices. If you wait too long to make the slices, it'll crumble as you try to slice the hardened burfi.