Traditionally used as a thickening agent in lotion, this vegetable derived waxy substance is also used as a hardening agent in soaps (at a .5% of your oils as a usage rate). Stearic acid is also used as a hardening agent in candles, vegetable or paraffin based.
The mass of a tree is primarily carbon. The carbon comes from carbon dioxide used during photosynthesis. During photosynthesis, plants convert the sun's energy into chemical energy which is captured within the bonds of carbon molecules built from atmospheric carbon dioxide and water.