Heat butter in a large skillet over medium high heat.
Add the sliced onions, a pinch of salt, and sugar if desired. Stir and let cook undisturbed for 5 minutes so the fond can develop.
Stir and add a little water to create steam and scrape any fond at the bottom of the pan. We do not want any burnt onions so keep an eye on it!
Repeat this process for about 25 minutes or until the onions have reached a deep golden brown or your desired doneness.
Once the onions cool, spoon them into silicon ice cube trays and freeze.