The latest method of crowdfunding originating in the cryptocurrency world is exploding, with ICOs raising more than 3.5 billion this year. It is also giving a headache to regulators and a growing number of swindled investors. The latest example saw one such cryptocurrency startup, Confido, make off with $375,000 of investor money. However, the list is long and includes even some older ICOs.

Some ICO con artists are already falling into the hands of justice. In late September 2017, the SEC filed charges against New York-based businessman Maksim Zaslavskiy and two related firms, alleging that the businessman misrepresented the amount he generated from two ICOs. The SEC successfully secured a court order to freeze the assets of Zaslavskiy and the two companies. Prosecutors in the case have further claimed that the purported assets Zaslavskiy claimed to have developed that drove the token sale did not actually exist.

Unlike any technology before, blockchain has an important moral dimension that is inherent in the way it’s structured. Taking part in a decentralized and self regulated system demands great responsibility and full transparency. Unfortunately, due to poorly written crowdfunding rules and negligent investors, it has become common for ICO funds to be mismanaged.

ICOs are commonly done on the Ethereum network, the second largest blockchain after Bitcoin. So-called smart contracts contain the logic that defines the rules of the crowdfunding process. Smart contracts collect Ether (the Ethereum currency) and issue tokens that are to be used for whatever service the particular ICO is planning to offer. Despite the functionality that Ethereum smart contracts offer, almost all ICOs are structured to allow the founders total control of the funds post-ICO. As a result, there is very little financial incentive for the development team to build the actual product, and various governments, including the US and China, are taking steps to address the problem.

One mechanism that ICOs are commonly employing these days is so called “token vesting”. This mechanism is used by some of the most well-known ICOs, including Bancor (which raised the equivalent of $153 million in Ether). The idea is to limit the ability of ICO founders to trade with their share of tokens post-ICO. Commonly, every six months, a certain amount of tokens is released to the founders. This prevents them from dumping the tokens post-ICO. However, it does nothing to prevent them from mismanaging all the collected Ether.

One way to solve this issue is via stakeholder voting. I’ve developed the code for this in the run-up to my own company’s ICO and have made it freely available to other pre-ICO companies (code available on GitHub here; and you can find the code audit here). The code makes sure that after the crowdfunding ends, stakeholders can vote on the project progress, and if they are dissatisfied, their investment is refunded. Only when the founders actually deliver are funds released — in stages.

Investors can easily communicate with the crowdfunding contract through any of the popular Ethereum wallets, such as MyEtherWallet. For example, if they are dissatisfied with the project’s progress, they can call the function voteAgainst through an easy to use graphical interface, and that way vote against the project continuation and in the favor of refunds. Vote weight is proportional to the investor’s stake.

A project using this approach should make clear to investors in advance how much of a voting stake its owners hold themselves and what kind of majority is needed to drive a decision. In the case of my own project, for example, our founders are getting 20 percent of the tokens, so in the worst case scenario investors will need to deliver a 2/3 majority to vote for a refund. Any project can modify the code I’ve supplied to change those proportions. For example, you could set the founders’ token ownership to 0 percent and require only a 50 percent majority vote from investors. The important thing is that all the rules are set in advance and are transparent to investors.

As long as investors are informed that such mechanisms exist, we can avoid repeats of what happened this week with Confido.

It remains to be seen if the community will be able to structure the ecosystem in a way to properly govern itself or if we will see governments stepping in more and more to regulate the market.

Vedran Kajic is cofounder of CryptoTask, a blockchain-based freelancing platform that implements a dispute system to prevent bribing.