MDMA (3,4-methylenedioxy-N-methylamphetamine) is an entactogenic drug of the phenethylamine and amphetamine class of drugs. In popular culture, MDMA has become widely known as "ecstasy", usually referring to its street pill form, although this term may also include the presence of possible adulterants

It’s important to note that ecstasy pills are not 100% MDMA. MDMA is made from chemicals like PMK and piperonyl. This will result to MDMA powder. However, it cannot be packed into pills in its pure form. This is why they’re often packed with additives. The pills contain less than 50% MDMA and additives like caffeine, aspirin or other medications are added. Sometimes, other dangerous drugs like paramethoxyamphetamine are also added.

How To Make Ecstasy
It all starts with the sassafras plant. The bark of its roots, or sometimes its fruits, are taken and oil is extracted from it. This gives you safrole, a colorless or slightly black oil, the primary precursor for all manufacture of MDMA. safrole, had to be bought from black market sources at very high prices. Even solvents were not available without question, and some ingredients required a poisons license.

Once you have the safrole, there are various synthetic roads that you can take. One common route is via the MDP2P (3,4-methylenedioxyphenyl-2-propanone, also known as piperonyl acetone) intermediate. This intermediate can be produced in at least two different ways.

One method is to isomerize safrole to isosafrole in the presence of a strong base and then oxidize isosafrole to MDP2P. Another, reportedly better method is to make use of the Wacker process to oxidize safrole directly to the MDP2P (3,4-methylenedioxy phenyl-2-propanone) intermediate. This can be done with a palladium catalyst.

Once the MDP2P intermediate has been prepared, a reductive amination leads to MDMA, a racemate {1:1 mixture of (R)-1-(benzo[d][1,3]dioxol-5-yl)-N-methylpropan-2-amine and (S)-1-(benzo[d][1,3]dioxol-5-yl)-N-methylpropan-2-amine}. Another method for the synthesis of racemic MDMA is addition of hydrogen bromide to safrole and reaction of the adduct with methylamine.

Relatively small quantities of essential oil are required to make large numbers of MDMA pills. The essential oil of Ocotea cymbarum typically contains between 80 and 94% safrole. This would allow 500 ml of the oil, which retails at between $20 and $100, to be used to produce an estimated 1,300 to 2,800 tablets containing approximately 120 mg of MDMA each.

How long did it take?
One kilo of MDMA took about 2 weeks continuous work for three people. That was because some processes could only be done in 50 gram batches. There were toxic fumes, some were highly poisonous, and a lot of spillages because we got over-tired. Sometimes coughing and ill from inhaling fumes occurs , hurt our eyes and made you giddy.

Explosions also should be watch which could be sparked off by the vacuum pump motor, so when things got really bad we had to evacuate the basement and the fumes could be seen drifting out of the windows. Once a flask of ether exploded, and during the Ritter reaction hot sulphuric acid and methyl cyanide shot up to the ceiling and dripped down onto us! It has permanently damaged lungs.

Read more :
 Manufacturing and Materials to Make Shabu (Methamphetamine)