The chemistry of whiskey can be influenced by the type of malt and grains used, the distillation and aging processes, and the type of wood in the barrels. Compounds that impact the flavor of whiskey include phenolic compounds, aldehydes, lactones, and esters. Specifically, whiskey lactones originate from oak barrels during aging and contribute coconut flavors, while phenolic compounds like guaiacol contribute smoky flavors. Esters produced during fermentation provide flavors like banana and apple.