Ergosterol is a steroid alcohol made of carbon and hydrogen atoms. It is found in the cell membranes of ergot and fungi and acts as structural support for the cell membrane.
Ergosterol provides structural support in the cell membrane. Since it is very hydrophobic, it interacts with other nonpolar molecules. However, it has been shown to have poor solubility in oils and fats experimentally unless modified. These characteristics help maintain the fungal and ergot cell membrane structure.
That was more than I wanted to know
Additionally, scientists think that ergosterol has anti-inflammatory and antihyperlipidemic effects. Isn't that cool?