Adderall and modafinil are different chemically, but their effects on cognition are similar, according to some psychiatrists. Adderall, or amphetamine, works by boosting the brain’s levels of norepinephrine and dopamine, two chemicals that are responsible for concentration and alertness.

Scientists are less sure how modafinil works. One pathway is by stimulating the release of histamine, which produces a sensation of wakefulness. (People with allergies may be familiar with histamine because many allergy drugs are antihistamines. Just as Benadryl dampens histamine and puts you to sleep, modafinil boosts it and wakes you up.) But modafinil also works on other neurotransmitter systems in the brain, and the resulting effect is one of allowing users to perform complex cognitive tasks more effectively.

These drugs can have negative health consequences, especially at large doses. The number of ER visits associated with the non-medical use of stimulants among young adults tripled between 2005 and 2011, according to the Substance Abuse and Mental Health Services Administration. Some research has shown that the long-term use of modafinil can affect sleep patterns. In rare cases and at high doses, stimulants like Adderall have been shown to induce psychosis.

Still, some psychiatrists say the health risks of cognitive enhancers are overstated. Millions of adults take these drugs. Not all of them have ADHD or sleep disorders. And yet, investment bankers and corporate lawyers aren’t dropping dead at their desks.

Very few adults “are going to have a horrible effect from using these medicines,” James McGough, a clinical psychiatrist at UCLA, told me. “They're safe.”

The side effects, he says, are no worse than having one too many coffees—jitteriness and stomach aches. According to him, people taking Adderall or modafinil at therapeutic doses don’t get addicted, in the sense that stopping their use doesn’t cause a painful withdrawal.

Adderall and modafinil are about equal when it comes to both their performance-enhancing capacity and side effects, McGough told me. Ruairidh Battleday, one of the authors of the modafinil paper, said the side effects and abuse potential of amphetamine seem worse to him than those of modafinil.

The paper hints at a coming debate over the ethics of smart drugs. Currently, people require psychiatric diagnoses in order to be prescribed any of these pills. But if these medicines are ultimately found to be safe, and they work for almost everyone, should anyone be able to take them?

And if modafinil does become more widespread, where does it end? Will we soon be locked in a productivity arms race, pumping out late-night memos with one hand while Googling for the latest smart-drug advancement with the other? Some sports organizations, for what it’s worth, already ban the use of these drugs without an ADHD diagnosis for the same reasons they ban steroids and other performance enhancers. Will employer drug tests soon screen for off-label modafinil use? Or on the contrary, will CEOs welcome the rise of extra-sharp workers who never need sleep?