Chemically Talking, it is the attachment of the glycerin molecule towards the fatty acid known as stearic acid. It might be generated from most vegetable oils (in oils a few fatty acid molecules are attached to glycerin rather than just one like below) in a pretty basic, "inexperienced" process that is similar to cleaning soap generating. It tru