A caffeinated bee is a busier bee. It’ll work harder to find food, and to communicate the location of said food to other bees. It will, however, misjudge the quality of the food it finds, and so make its colony less productive. The irony of writing about this as I sip an unwisely strong espresso at 10 pm is not lost on me.

The caffeine in coffee might give me a mental kick, but many plants rely on its bitter taste to deter plant-eating animals. Others, however, seem to bait themselves with caffeine, doping their nectar with low concentrations of the stuff. Why add a bitter deterrent to a liquid that’s meant to entice and attract pollinators?

Geraldine Wright from Newcastle University found one possible answer in 2013, when she showed that caffeine can improve a honeybee’s memory. Wright fed the insects with caffeine at concentrations that would affect their bodies, but that wouldn’t register as a bitter taste. She found that these bees were three times more likely to remember a floral scent. So, by providing caffeine, plants ensure that their pollinators are more likely to learn the link between their distinctive scents and the tasty nectar they provide.

What about the bees? Do they benefit from being drugged like this? One might think so, because they can more efficiently find the food they need. But Margaret Couvillon from the University of Sussex thinks otherwise.

She trained honeybees to forage from two feeders full of sugar water, one of which had been laced with a small amount of caffeine. She found that the caffeinated bees made more visits to the feeders. Once back in the hive, they were more likely to perform the distinctive waggle dance that tells other bees where to find food, and they performed the dance more frequently. And this means that a hive which exploits a caffeinated flower will send out about four times as many workers to that flower.

That wouldn’t be bad if this newly energised armada of workers was behaving more efficiently. But they’re not. Couvillon’s team showed that they’re more likely to persist with a caffeinated food source, even when that source no longer becomes useful. They also become faithful to their chosen feeder and become less likely to stray to a different host plant.

So, there’s the rub. Even though caffeine improves bee memory, it also causes them to overvalue caffeinated plants over decaffeinated ones that offer the same amount of energy. As the team writes, “The effects of caffeine in nectar are akin to drugging, where the pollinator’s perception of the forage quality is altered, which in turn changes its individual behaviours.”

By simulating these effects, Couvillon showed that if 40 percent of plants in the environment produce small amounts of caffeine—a realistic proportion—bee colonies would produce around 15 percent less honey every day.

They still need to test this prediction in real-world experiments. But if the results check out, it suggests that plants use caffeine as more than a deterrent against undesirable animals, but also as a way of manipulating desirable ones.