The difference between cocaine and crack cocaine is almost entirely one of pH, the relative scale of acidity or alkalinity. Regular cocaine in its original plant form, coca leaf, is commonly consumed by people across the mountainous parts of South America and has been for millennia, much as caffeine has been used through drinking tea in parts of Asia. It causes little to no harm; people can drink coca tea with no more impact than the caffeine from a soft drink.

But when you concentrate and tweak the compound just slightly to make it more alkaline (called “base” in chemistry), that increases its “stickiness,” the speed and tenacity with which it binds to blood and brain tissue (which is slightly more acidic), increasing the speed with which it’s transported to the nervous system and thus “hits” the user producing the cocaine “high.”

The more sudden and intense the “high,” the more addictive the substance. It is why most American cigarette manufacturers add ammonia to tobacco: it changes the pH of nicotine and thus converts the nicotine in the cigarette from “normal nicotine” into free-base “crack nicotine.”

Similarly, when we are confronted by novel or shocking stimuli, it causes a release in our brain of certain chemical neurotransmitters (particularly dopamine) that give us a weak “high” by increasing our alertness while stimulating the reward centers of our brains.

Evolution wired this into us to help us survive: the shocking encounter with the tiger living over in one particular part of the forest will have a much greater mental and emotional impact and thus be remembered far longer than a similar encounter with a squirrel. The more vividly we react to and remember the tiger (and where he lives), the less likely we are to be eaten by him.

This is the essence of how social media algorithms work: when you view certain content online, the algorithm chooses what other, associated content to “push” toward you. If you see a diary with a picture and story of Uncle Ralph at the beach with Aunt Sally and Sally’s wearing an old “Bush/Cheney” T-shirt, the computer algorithm has multiple data points to choose from as it decides what it is going to show you next.

Is it another page about Uncle Ralph in a different context, like having lunch with an old army buddy a few years earlier? It it pictures of beaches and people vacationing on them? Is it a page written by a friend of Aunt Sally’s about how she and a dozen friends got together and visited a jazz concert last month?

Or is it a page about the Bush/Cheney administration, particularly one offering a shocking take or bit of information? Telling you, for example, that Bush was the one who led America when we were “attacked by Muslims” who might be coming next for your city and you?

This is the tiger instead of the squirrel. You can’t look away. Every instinct you have, honed by million of years of evolution, tells you that you must learn more about this particular tiger.

So you click through that one and discover that there are Democrats who are making common cause with those evil Muslims, and in addition to respecting an evil religion they go even further: they drink the blood of Christian children. Now you are really getting high.

“But wait,” the algorithm says: “There’s more!” They are also trying to steal an election and hand the nation over to those terrible “other” people, and, if you really care about America and those poor children and the integrity and future of our elections, YOU MUST DO SOMETHING!

And throughout the entire process — every step of the way, every next little-more by little-more-intense jolt of adrenaline and dopamine you get — is delivered to you along with an advertisement that somebody paid the social media company a few pennies to put in front of you.

Those pennies add up, of course, for the social media company, just as does the progressively more intense alarm, fear, and ultimately outrage for your brain. Pretty soon Uncle Ralph and Aunt Sally are long forgotten and you wake up from your social media high standing on the floor of the U.S. Capitol with a bloodied flagpole in your hand and an unconscious police officer on the floor.

In making those “what’s next” decisions, social media algorithms push us deeper and deeper into progressively more “sticky” and “engaging” content, guaranteeing the social media company that we stay longer and dive deeper, seeing more and more ads and thus delivering more and more pennies to the company.

What started out as a nice vicarious visit to Uncle Ralph and Aunt Sally’s summer vacation narrative has turned into a raging, fulminating stew of our most primitive and primary emotions and the neurochemicals associated with them. We are addicted.

Just like cocaine dealers add baking soda to make it into crack, just like food manufacturers add sugar to kids’ cereals, just like tobacco companies add ammonia to make their cigarettes more addictive, social media adds “jolts” to our recommended views or the things we see next to get us hooked, keep us hooked, and make more money.

This is why social media companies are so secretive about their algorithms. The algorithms are like the formula for Coca-Cola: they are the companies’ ultimate and vastly profitable trade secret (ironically, the big mystery to Coke’s formula back in the day when it first came out was that it contained cocaine, later replaced by caffeine).

More to the point of serious and destructive addiction, they are like the list of additives in cigarettes that the tobacco companies have successfully spent millions over the years fighting to keep off an ingredient list on their cigarette packs. It is also why, like the tobacco companies, social media companies are looking for ways to bring in a new generation of addicts. Social media sites targeting children are the “Joe Camels” of this era.

A social media site that makes it easy for us to keep track of and in touch with friends and family is a nice, sweet, and… boring… part of cyberspace. People would check it regularly, but they won’t spend hours diving deeper and deeper into “engagement.” It will make tons of money, but will not make its founders into the world’s richest people any more than the Sackler family would have become multi-billionaires if they had only sold effective but milder painkillers instead of the Oxycontin they chose to push on Americans.

The algorithm is the key to both the profitability and the societal damage of social media. Like the contents of other things we consume that can alter our brain chemistry, from the alcohol levels of beer and spirits to the sugar content of foods, disclosure and regulation of social media algorithms are the key to reducing, minimizing or even eliminating the addictive and destructive consequences of engaging in social media platforms.

But because they are also the difference between a useful, boring and only normally profitable social media site and one that is full-blown addictive and thus mind-mindbogglingly profitable, we can expect the social media companies themselves, just like the tobacco companies, to do everything they can to fight the release or regulation of their “secret formulas.”

© Thom Hartmann, used with permission. Originally published on The Hartmann Report as It’s the Algorithm, Stupid!

Subscribe to The Hartmann Report directly and read the latest views about U.S politics and other fascinating subjects seven days a week.