Common and widespread fly of the family Stratiomyidae
 ;templatestyles src="Template:Taxobox/core/styles.css" / ;
Hermetia illucens, the black soldier fly, is a common and widespread fly of the family Stratiomyidae. Since the late 20th century, "H. illucens" has increasingly been gaining attention because of its usefulness for recycling organic waste and generating animal feed.
Distribution.
This species is native to the Neotropical realm, but in recent decades has spread across all continents, becoming virtually cosmopolitan. It is present in most of North America and Europe, including the Iberian Peninsula, southern France, Italy, Croatia, Malta, the Canary Islands, and Switzerland, and on the Black Sea coast of Russia in Krasnodar . It can also be found in the Afrotropical realm, the Australasian realm, the east Palaearctic realm, the Nearctic realm, North Africa, Southern Africa, and the Indomalayan realm.
Description.
The adults of "H. illucens" measure about long. These medium-sized flies have a predominantly black body, with metallic reflections ranging from blue to green on the thorax and sometimes with a reddish end of the abdomen. The second abdominal tergite has translucent areas, from which the Latin specific epithet derives. The head is wide, with very developed eyes. The antennae are about twice the length of the head. The legs are black with whitish tarsi. The wings are membranous; at rest, they are folded horizontally on the abdomen and overlapped.
"H. illucens" is a mimic fly, very close in size, color, and appearance to the organ pipe mud dauber wasp and its relatives. The mimicry of this particular kind of wasp is especially enhanced by the fly's elongated and wasp-like antennae, pale hind tarsi, and the presence of two small, transparent "windows" in the basal abdominal segments that make the fly appear to have a narrow "wasp waist". Black soldier fly larvae can be differentiated from blowfly or housefly larvae by a thin gray-black stripe on their posterior ends.
Lifecycle.
An adult female lays approximately 200 to 600 eggs at a time. These eggs are typically deposited in crevices or on surfaces above or adjacent to decaying matter such as manure or compost, and hatch in about 4 days. Freshly emerged larvae are long, being able to reach a length of and weight of by the end of larval stage. The larvae are able to feed on a wide variety of organic matter, adapting to diets with different nutrient content. The larval stage lasts from 18 to 36 days, depending on the food substrate provided to the larvae, of which the post-feeding (prepupal) stage lasts around 7 days. The length of larval stage can be delayed by months due to low temperature or lack of food. The pupal stage lasts from 1 to 2 weeks. Adults can live typically 47 to 73 days when provided with water and food, such as sugar in captivity or nectar in the wild, or survive for about 8 to 10 days on fat reserves gathered during larval stage when water is provided.
Human relevance and use.
Neither larvae nor adults are considered to be agricultural pests or disease vectors. Black soldier fly larvae play a role similar to that of redworms as essential decomposers in breaking down organic substrates and returning nutrients to the soil. The larvae have voracious appetites and can be used for composting household food scraps and agricultural waste products.
Additionally, black soldier fly larvae are an alternative source of protein for aquaculture, animal feed, and pet food.
The larvae are produced and processed in industrial-scale insect factories globally by biotechnology companies such as InnovaFeed and Protix, the latter operating the world's largest insect factory farm in the Netherlands.
As decomposers/in composting.
Black soldier fly larvae (BSFL) are used to compost waste or convert the waste into animal feed. Waste streams include fresh manure and food wastes of both animal and vegetable origin. Fly larvae are among the most efficient animals at converting biomass into feed.
When the larvae have completed their larval development through six instars, they enter a stage called the "prepupa" wherein they cease to eat, and tend to migrate toward cool, dark, and dry substrates to pupate. This prepupal migration instinct is used by bins to self-harvest the mature larvae. have ramps or holes on the sides to allow the prepupae to climb out of the composter and drop into a collection area.
Black soldier fly larvae are beneficial for use as composters in the following ways:
Aside from protein production, fly larvae also produce frass. Fly larval frass is a granulated and odorless residue that can be used as organic fertilizer directly or through conversion by earthworms.
As feed.
Black soldier fly larvae are used as feed for pets and livestock animals. The harvested pupae and prepupae are eaten by poultry, fish, pigs, lizards, turtles, and even dogs. The insect is one of the few insect species approved to be used as feed in aquaculture in the EU.
At the pupal stage, black soldier flies are at their nutritional peak. They can be stored at room temperature for several weeks, and their longest shelf life is achieved at .
As human food.
Records of human consumption of "H. illucens" are difficult to find.
In 2013, Austrian designer Katharina Unger invented a table-top insect-breeding farm called "Farm 432" in which people can produce edible fly larvae at home. It is a multi-chambered plastic machine that looks like a kitchen appliance and can produce of larvae or two meals in a week.
The taste of the larvae is said to be very distinctive. According to Unger, "when you cook them, they smell a bit like cooked potatoes. The consistency is a bit harder on the outside and like soft meat on the inside. The taste is nutty and a bit meaty.
For producing grease.
BSFL can be used to produce grease, which is usable in the pharmaceutical industry (e.g. in cosmetics, surfactants for shower gel), thereby replacing other vegetable oils such as palm oil. It can also be used in fodder.
For producing chitin.
BSFL can be used to produce chitin. Chitin is used in shipping as an agent against biofouling. It is also used in water purification. Chitin also has potential as a soil amendment, to improve soil fertility and plant resilience.
For producing organic plant fertilizer.
Material left over after the larval waste decomposition process (frass) consists of larval faeces, shed larval exoskeletons, and undigested material. Frass is one of the main products from commercial black soldier fly rearing. The chemical profile of the frass varies with the substrate on which the larvae feed, but in general, it is considered a versatile organic plant fertilizer due to a favorable ratio of three major plant nutrients: nitrogen, phosphorus, and potassium. BSFL frass is commonly applied by direct mixing with soil and considered a long-term fertilizer with slow nutrient release. Plant trials have also found short-term fertilizing effects comparable to fast-acting, synthetic fertilizers. In addition to its nutrient contribution, BSFL frass can carry further components that are beneficial for soil fertility and soil health, such as chitin from the shed exoskeletons of the larvae. Finally, the use of BSFL frass as a fertilizer can effectively alter the soil microbial community composition, which plays a crucial role for soil fertility.
Debate is going on whether the frass from BSFL rearing can be used as a fertilizer in a fresh state or has to undergo further composting before its application. Some assume that further composting would lead to the reduction of potential phytotoxic properties. In the European Union, insect frass has to be treated for one hour at before commercialization for safety reasons, the same as other animal manure products.
In bioremediation.
Recent research in the field of entomoremediation shows the potential of this insect for purification of biomass contaminated with heavy metals. Larvae of "H. illucens" were used in a bioremediation experiment, in which they consumed up to 49% of dry weight corn leaves polluted with cadmium or zinc, for 36 days. Artificially polluted corn leaves were used a model plant material comparable to plant biomass polluted as a result of phytoextraction. The 49% loss of polluted dry weight material is a better result than in the case of composting alone, which is one of the standard proposed pretreatments for biomass polluted after phytoextraction. The type of heavy metal did not affect the degree of consumption in this experiment. Cadmium mostly accumulates in the puparium, while zinc accumulates in the adult fly.
Potential source of plastic-degrading enzymes and bacteria.
It has been stated that "H. illucens" larval gut microbiota represent an optimal ecological niche for isolating enzymes and microbial strains with optimized plastic-degrading ability.
Potential use in biodiesel production.
"H. illucens" could be a feasible feedstock for biodiesel production. 
Farming.
Larval colonies.
The main difficulty in farming black soldier fly larvae (BSFL) comes when obtaining larvae or eggs to start or replenish the colony. This is usually done by enticing the soldier flies to lay eggs in small holes over a grub bin. Adult flies lay clusters of eggs in the edges of corrugated cardboard or corrugated plastic. In some regions, starting or maintaining adequate larvae colonies is possible from wild black soldier flies, but pest species such as houseflies and blowflies are also drawn to many of the foods used to attract soldier flies, such as fermented chicken feed.
In tropical or subtropical climates, black soldier fly adults might breed year-round, but in other climates, a greenhouse may be needed to obtain eggs in the cooler periods. Black soldier fly larvae are quite hardy and can handle more acidic conditions and higher temperatures than redworms. Larvae can survive cold winters, particularly with large numbers of larvae, insulation, or compost heat (generated by the microorganisms in the grub bin or compost pile). Heat stimulates the larvae to crawl off, pupate, and hatch, and a great deal of light and heat seem to be required for breeding. Many small-scale BSFL farmers start their larval colonies from eggs deposited by wild soldier flies.
Space and shape.
Newly emerged soldier flies perform the beginning of their mating ritual in flight. The male grabs onto the female, and then grasps the female's ovipositor with his genitals. They mate while stationary and connected.
German scientists have successfully bred soldier flies in a space as small as 10 liters.
Heat.
Adults typically mated and oviposited at temperatures of or more. Around 99.6% of oviposition in the field occurred at .
Light.
Quartz-iodine lamps have been successfully used to stimulate mating of adults. In particular, mating success of reared black soldier fly can be dramatically increased by exposing the adults to light that is particularly rich in wavelengths near 440 and/or 540 nm and has an irradiance that is an appreciable fraction of the intensity of full sunlight. In tropical conditions, morning direct sunlight is optimal for emergence, mating, and egg laying, with indirect sunlight often preferred before and after mating.
Humidity.
Humidity at 70% is considered optimal for all stages of their lifecycle.
Substrate was found to be unnecessary for pupation, but substrate is thought to act as a regulator for humidity, which prevents desiccation. A 93% emergence rate was observed when humidity was held at 70%.
Black soldier fly larvae and redworms.
Redworm farmers often report black soldier fly larvae in their worm bins. Black soldier fly larvae are better at quickly converting "high-nutrient" waste into animal feed, while redworms are better at converting high-cellulose materials (paper, cardboard, leaves, plant materials except wood) into an excellent soil amendment.
Redworms thrive on the residue produced by black soldier fly larvae, but larvae leachate ("tea") contains harmful enzymes and tends to be too acidic for worms. The activity of larvae can keep temperatures around , while redworms require cooler temperatures. Most attempts to raise large numbers of larvae with redworms in the same container, at the same time, are unsuccessful. Worms have been able to survive in/under grub bins with bottoms that open into the ground. Redworms can live in grub bins when a large number of black soldier fly larvae are not present. Worms can be added if the larval population gets low (in the cold season) and worms can be raised in grub bins while awaiting eggs from wild black soldier flies.
As a feeder species, BSFL are not known to be intermediate hosts of parasitic worms that infect poultry, while redworms are host to many such species.
Names and trademarks.
BSFL were developed as a feeder insect for exotic pets by D. Craig Sheppard, who named the larvae Phoenix Worms and began marketing them as pet food. In 2006, Phoenix Worms