coarse candy made from sugar or molasses boiled down and cooled, 1817, related to toffee, but of uncertain origin; perhaps associated with tafia (1763), a rum-like alcoholic liquor distilled from molasses, presumably of West Indian or Malay (Austronesian) origin (perhaps a Creole shortening of ratafia). On this theory, the candy would have been made from the syrup skimmed off the liquor during distillation.
<a href="https://www.etymonline.com/word/toffee">Etymology of toffee by etymonline</a>
Harper, D. (n.d.). Etymology of toffee. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/toffee