The momentum for psychedelics has been building for some time, and venture capital firms are beginning to pay attention. But this isn’t a market that is easily understood or accessible, so entrepreneurs should make sure to seek the right legal counsel before getting involved.

For starters, the term “psychedelics” encompasses more than just marijuana. It also includes a wide variety of hallucinogenic substances, including LSD and peyote. These are Schedule 1 controlled substances, meaning that federal law makes their possession and use a crime. But state regulations differ, and some states are allowing businesses to set up “healing centers” where consumers will pay to have a supervised psilocybin experience. Other substances, such as ibogaine and ketamine, are being used in experimental treatments for conditions like PTSD and depression.

As a result of changing public opinion, more companies are establishing themselves in the space to capitalize on new opportunities. But investors need to be aware that psychedelics are different from conventional drugs, and they can have far-reaching effects on the brain. That means that startups in the space have to carefully weigh risk and opportunity as they navigate an increasingly volatile regulatory and social environment.

One way to mitigate some of that risk is for founders to structure their companies as B Corps or benefit corporations. These types of entities allow them to focus on more than just profits, and can offer additional protections in the event that the market turns against them.