In 1972, long before eBay or Amazon, students from Stanford University in California and MIT in Massachusetts conducted the first ever e-commerce transaction. Using the "Arpa-net" account at their artificial intelligence lab, the Stanford students sold their counterparts a small amount of marijuana. Ever since, the 'Net has turned over a steady but small trade in illicit narcotics. But last year approximately 20 per cent of UK drug users scored online. The majority of them went to one place: the darknet markets.

You can't access darknet markets using a normal browser. They sit on an encrypted part of internet called "Tor Hidden Services," where URLs are a string of meaningless numbers and letters that end in .onion, and are accessed using a special browser called "Tor". Tor's clever traffic encryption system makes it very difficult for the police to know where these sites—and the people who use them—are located. It's a natural place for an uncensored drugs marketplace, as it is for whistleblower websites and political dissidents, which also use the same techniques to keep their visitors hidden.

The most infamous of these darknet markets was called the Silk Road. In October 2013, following a lengthy investigation, the Silk Road was closed down (the trial of 29-year-old Ross Ulbricht, who the FBI allege ran the site, is ongoing—Ulbricht denies all charges). But as soon as it was knocked offline, copycat sites were launched by anonymous operators to fill the gap. In November 2013 there were a small handful of these marketplaces: there are now around 30. Pandora, Outlaw Market, 1776 Market Place—and most of them are doing a decent trade. Between January and April 2014, "Silk Road 2.0"—set up within a month of the original being busted—processed well over 100,000 sales. But the most shocking thing about these sites is not how many there are, but how they are changing the drugs industry. They work exceptionally well.

1/5: this seller is a fucking scammer, i payed for hashish and now i have 40 grams of fucking paraffin! DON'T BUY FROM THIS C*** (20 gram of maroc hashish)

The first thing that strikes you when signing up for Silk Road 2.0 is the choice. There are almost 900 vendors to choose from, selling more drugs than I'd thought possible. Heroin, opium, cocaine, acid, and prescription drugs are all readily available. Technically speaking, Silk Road 2.0 is an anonymous market for anything (with some exceptions, such as child pornography), which means there are also sections for alcohol, art, counterfeit items, and even books. Listings included a complete box set of The Sopranos; a hundred-dollar Marine Depot Aquarium Supplies voucher, and fake UK birth certificates. Each with a product description, photograph, and price.

But most people are here for the drugs. When you buy drugs from street dealers, your choice is limited by geography and who you know. But this is an international market. Although around one-third of vendors are based in the US, ten per cent are in the UK, and most promise to ship to every country in the world. Darknet markets provide a tried and tested solution to this abundance of choice. Every site has review options—usually a score out of five plus written feedback—and reviewing your purchase accurately and carefully is an obligation for all buyers. And they do. As I browsed through the marijuana offers, I found 3,000 different options advertised by over 200 different vendors. So, as comes naturally to someone who buys online, I began to scour through reviews of different vendors, trying to spot those that others had found to be reliable and trustworthy: "1/5: this seller is a fucking scammer, i payed for hashish and now i have 40 grams of fucking paraffin! DON'T BUY FROM THIS C*** (20 gram of maroc hashish)" wrote one clearly frustrated customer.

Although all the vendors use pseudonyms for fairly obvious reasons, they keep the same fake name to build up a reputation. They work hard to build a positive, consistent (but fake) name for themselves because it is the only way to secure custom. That's why they are all so unflinchingly polite. I got in touch with one prospective vendor on the site's internal e-mail system. "Drugsheaven" was based overseas, but his vendor page advertised "excellent and consistent top quality weed & hash for a fair price." He had a refund policy, detailed terms and conditions, and close to 2,000 pieces of feedback over the last four months, averaging around 4.8 out of 5. (And, importantly, the occasional negative review). "I'm new here," I said. "Do you think I could just buy a tiny amount of marijuana?" He replied almost immediately: "Hi there! Thanks for the mail. My advice is that starting small is the smart thing to do, so no problem if you want to start with 1 gram. I would too if I were you. I hope we can do some business! Kind regards."

With so much money floating around these sites—dealers can make good money without leaving home—some vendors try to game the review system. Common tricks include creating fake accounts from which to post positive feedback, writing bad reviews of competitors, and even paying others to give favourable write-ups. But there is an impressive amount of self-policing and monitoring by a motivated and active community of users: most scammers are quickly ousted, reputation in tatters.

Because they live on the fringes, these sites are remarkably innovative. The currency of choice here is Bitcoin, the digital cryptocurrency, which can be exchanged easily enough for real world currency, and offers its users a high degree of anonymity. When a flaw was spotted in the payment system (site administrators would hold on to buyers' money until the transaction was complete, but were running off with it) the community developed an even more secure payment method called "multi-sig escrow," where the money is only transferred if two of the three parties sign off on the transaction. To help keep buyers anonymous, other developers have created "tumbling" services, which are a sort of micro-laundering system that obscures who is sending Bitcoins to whom. Then, in April 2014, a search engine for these drugs sites called "Grams" was launched and included "trending" searches and advertising space.

Law enforcement agencies around the world—but especially in the US—have started to take a keen interest in what takes place in this strange encrypted Internet and are certainly getting better at infiltrating and shutting down these sites. Periodically, one disappears following a police raid, sparking panic and worry among the community of users. But the darknet markets learn from each mistake and are becoming more secure and more decentralized, making them incrementally more difficult to combat.

Drug dealing has traditionally been characterized by local monopolies and cartels. But the darknet markets create a new dynamic. By introducing clever payment mechanisms, feedback systems, and real competition, power is shifting away from dealers and to the consumers. There is no clearer indication of who rules than one of the last posts on the original Silk Road discussion forum by one of the hard-headed administrators who ran the site, just before the FBI shut it down last year: "My apologies to all of you experiencing slow Customer Support response times... We are implementing changes to ensure that messages cannot be missed in future, and again, I apologize for any inconvenience that any delays in responding to your tickets may have caused."

This does precisely what economics textbooks predict: it creates a better deal for consumers. The most surprising statistics about the Silk Road 2.0 is not the volumes of available drugs (although that is truly staggering); it's the satisfaction scores. When I analysed 120,000 customer reviews made on the site, over 95 percent scored 5/5.

True, price is more variable. As of October 2013, cocaine on Silk Road cost an average of $92.20 per gram compared to an average global street price of $174.20 per gram. On the other hand, its average marijuana price—$12.10 per gram—was higher than the global average of $9.50 per gram, and its heroin is particularly expensive, at over twice the US street price. But drug users tend to be willing to pay a slightly higher price because with it comes a consumer-led system of regulation, which provides a degree of quality assurance. On the streets, drug purity is wildly variable and tends to be decreasing: the average purity of street cocaine is 25 percent (but has been found as low as 2 percent), typically cut with mixing substances such as Benzocaine. Not knowing what you're putting in your body can have tragic consequences. In 2009-10 a contaminated product led to 47 heroin users in Scotland being infected with anthrax. Fourteen died.

Perhaps it won't be Silk Road 2.0, or even Tor Hidden Services that transform the drugs trade. But now that consumers are in charge, it will never be the same again. What this means for drugs policy is not clear. Darknet markets make drugs more available more easily, and that's nothing to celebrate. It will, I suspect, tend toward higher levels of use, which—legal or illegal—creates misery. There is violence and corruption at every point in the supply chain as drugs move from producers to users. It might shorten the length of the chain, but as demand goes up, supply usually follows.

History suggests that those who want drugs will usually find a way to get them. And here they can get a better product with fewer negative risks associated with buying drugs on the street. It even bears down on the street crime associated with drug turf wars as street pushers become redundant. These marketplaces are transforming the dirty and dangerous business of buying drugs in dark alleyways into a simple transaction between empowered consumers and responsive vendors. It's not online anonymity, Bitcoins, or clever encryption that keeps the darknet markets thriving. The real secret is good customer service.

Jamie Bartlett is author of The Dark Net, out now.

This story originally appeared on Wired UK.