I think this was an interesting question, even though i have no coca to chew
I found out that
german wikipedia's entry for coca is much more detailed than the english one. I'll translate a small but very relevant part from the section about usage.
https://de.wikipedia.org/wiki/Cocastrauch#Verwendung wrote:...
Die gekauten Blätter bilden, zusammen mit Kalk und anderen Hilfssubstanzen (zum Beispiel Pflanzenasche, Quechua llipt’a), eine sogenannte bola. Zur Herstellung der llipt’a dienen verschiedene Pflanzenarten, darunter Chenopodium quinoa (ilucta), Chenopodium pallidicaule und Baccharis-Arten.
Untersuchungen haben darüber hinaus gezeigt, dass beim Kauen von Coca-Blättern der von der Andenbevölkerung jeweils praktizierte Zusatz von Kalk das ursprünglich in den Blättern vorhandene Alkaloid Kokain durch alkalische Hydrolyse in das Alkaloid Ecgonin umwandelt, ein Alkaloid, dem jedes Suchtpotenzial fehlt.
...
my translation wrote:The chewed leaves, together with calcium hydroxide and other helper substances (eg. plant ashes, Quechua llipt'a), form a so-called bola. Various plant species serve to make the llipt'a, including Chenopodium quinoa (ilucta), Chenopodium pallidicaule and Baccharis species.
Beyond that, studies have shown that the addition of calcium hydroxide, as practiced by the Andean population, by alkaline hydrolysis converts the alkaloid Cocaine originally contained in the leaves into the alkaloid Ecgonine, which lacks any potential for addiction.
From the back of my head, i think the calcium hydroxide typically comes from ground shells.
* edited to correct mistranslated calcium carbonate to calcium hydroxide.