The raccoon butterflyfish was dead, that much was clear. What Ethan Kocak wanted to know was what killed it.

Kocak had bought the bandit-masked, yellow-and-black fish to get rid of the anemones that had taken over his 40-gallon coral reef aquarium. With any luck, he hoped, it would live the five to seven years these tropical fish are expected to live in captivity. But by day three, the butterflyfish was dead. Kocak awoke to find it lying on the floor of the aquarium, being eaten by hermit crabs.

Kocak is no novice when it comes to aquariums. He’s kept fish since he was a toddler, worked for an aquarium shop for a spell, and is now internet-famous for his drawings of axolotls, cuttlefish and other tank-creatures he keeps. (He’s also a freelance artist who has created more than 250 avatars for the scientists of Twitter.) Baffled by the fish’s quick demise, he went back to the aquarium shop to see if they had any theories.

It’s possible the butterflyfish just up and died, said the shop. They do that sometimes. But given the species of fish and the speed with which it expired, the aquarium shop thought it seemed likely that something else was afoot. Specifically: cyanide.

Yes, cyanide—the same chemical compound that spies put in their worst-case-scenario capsules and millipedes emit to keep predators away. Fsherman also use this poison to quickly and cheaply stun ornamental fish, so they can bag them and sell them into the aquarium trade. The practice can be deadly for individual fish, which can die on contact or even several weeks after being exposed to the cyanide. But it’s also incredibly destructive to coral and other inhabitants of the reefs these fish live on.

“I now know that raccoon butterflies are pretty much universally wild caught animals and that my scenario plays out all the time, in aquaria all over the world,” says Kocak. “I mean, that's pretty awful.”

Sadly, butterflyfish are just one of hundreds of species affected by this illegal practice, a market estimated to be worth $200 million a year. But a partnership between a biologist and a chemist may be close to producing a solution: The pair is proposing a handheld sensor that could detect when cyanide is being used in any step in the supply chain.

In the future, they imagine, aquarium fish could even come with a label similar to the ones we use for organic produce, grass-fed beef or cage-free chickens. But in this case, they’ll say “Cyanide Free”—and they could help aquarium enthusiasts and fishermen make the more ethical choice.

Of the 20 to 30 million marine fish traded globally each year, the U.S. is the world’s largest importer, bringing in 10 to 12 million creatures annually. And while it's impossible to say just how many might have been caught with poison, about 90 percent of the fish we buy for our tanks are sourced from places like the Philippines, Indonesia and Vietnam—countries known to have historic problems with cyanide fishing.

Cyanide fishing is illegal in many of these countries, but that doesn’t do much to discourage the practice. That’s because, from an illegal fisherman’s perspective, it’s still the best option.

First of all, cyanide is effective. The fishermen drop tabs of the substance into water bottles, which are then used to squirt clouds of the toxin into the coral crevices fish like to hide in. Some fish die on contact, but most are stunned for a period of about 20 minutes. That's more than enough time for the fishermen to scoop them up or even break apart the coral to get at any fishies hiding within.

It’s also cheap. “Any time you have mining you’ll have cyanide around,” says Andrew Rhyne, a biologist at Roger Williams University in Rhode Island. What’s more, the middlemen who buy fish off of the fishermen often supply the cyanide tabs at little or no cost to the fishermen themselves.

But the biggest problem with cyanide is that it’s difficult to detect. If you or I were to take a look at a cooler full of blue tangs fresh off the coral reef, there’d be no immediate way to know whether the fish were caught with cyanide.

The doesn’t mean the poison is untraceable. It’s just that our current methods are pretty cumbersome. According to Rhyne’s colleague at Roger Williams University, a chemist named Clifford Murphy, the Philippines has six labs dedicated to cyanide testing, but it takes about an hour and half to run one sample. For this reason, fish hauls are selected at random for screening, which means the vast majority of ornamental fish are never tested.

Murphy and Rhyne are trying to change that, by developing a handheld test that would be both cheap to produce and easy to use in the field. And the way it works is pretty cool.

When a fish gets hit with a squirt of cyanide solution, its liver immediately begins trying to neutralize and remove the compound. First it metabolizes it; then it converts it into something called thiocyanate. The fish then ejects the thiocyanate in its body just as you and I might expel toxins: It pees the thiocyanate out.

“You can actually tell if someone is a smoker based on a very similar test,” says Rhyne. All you have to do is look at their secretions—urine, saliva, etc—and you’ll find thiocyanate.

Other groups have been working to streamline this detection process, but Rhyne and Murphy have created a portable prototype that uses modified electrodes to detect thiocyanate at incredibly low levels: between one and five parts per billion. Right now, there are two hurdles the scientists want to overcome before they get this test to market. The first is to get the tests to the point where each handheld test detects at the same sensitivity as the next. The second, naturally, is money.

Murphy says that as of today, each electrode is made by hand, which only allows them to create about four to six electrodes at a clip. To bring such a detector to market, they’ll have to find a way to manufacture these buggers mechanically. And while the team has a few ideas on how to handle all of this, they admit that it will still probably be a year or two before their device moves from prototype to product.

But the returns could be huge. A quick and easy-to-use sensor could be deployed at every level of the supply line—from the decks of the ships the fish come in on and the dockside fish markets they are sold in to the customs counters in U.S. airports and the pet stores that sell ornamental fish.

But no matter what Silicon Valley tries to tell you, a cool new device—even one as cool as a handhold cyanide detector—isn't enough to solve such a deeply rooted problem. To do that, we need to change the market.

“Do you know who made the clothes you’re wearing?” Rhyne likes to ask his audience when he gives lectures. “Was it a 13-year-old kid in a falling down factory about to catch on fire and die or was it somebody trying to put their kids through school?”

The answer is that it’s complicated. Which is why Rhyne says that simply cracking down on cyanide fishing via his sensor or other means will not eliminate this problem. In a long supply line where the consumer is many steps removed from the producer, questionable sources and methods will always be at play. The best solution, then, is to find a way to provide incentives for fishermen to be better.

As it stands, there’s no economic reason for fishermen to change their ways. If they used more sustainable practices, it would take them more effort and expense to acquire fish that sell for the same price. Which is why Rhyne and Murphy want to use their cyanide sensors to help create a certification system, sort of like the ones we use for organic produce or cage-free eggs.

If fishermen can sell "Cyanide-Free Fish" for a higher price, and we can keep that label honest with a better detector, then everybody wins. In fact, the fishermen would win twice, because they’d no longer have to spend every day snorkeling through clouds of poison with bare skin and no protective equipment.

“I think the fishermen get left out a lot of times. They get made into bad guys because they’re using cyanide. But these aren’t bad people,” says Rhyne, who has traveled to Indonesia many times. “They aren’t driving really fancy cars. These are people just trying to feed their family.”

After the death of his raccoon butterflyfish, Kocak says he now tries to only buy animals that have been captive bred. He also recommends this strategy for others looking to get into the hobby. “The selection of species to choose from gets bigger all the time, and includes some of the most popular fish there are,” he says.

But if Cyanide Free labels ever became a thing? Kocak says he’d check it out. Until then, you’ll be able to find him in the captive bred aisle.