New York would be the first state in the nation to comprehensively regulate cryptocurrency under a sweeping bill introduced by Attorney General Letitia James on Friday.

The Crypto Regulation, Protection, Transparency, and Oversight Act would “bring law and order” to the industry by granting new authority to the New York State Department of Financial Services (NYDFS) to regulate cryptocurrency assets and exchanges, James said in a press release.

“Millions of investors have lost hundreds of billions in the value of their cryptocurrency investments because of rampant fraud, including market manipulation, hacking, and opaque business practices,” the release said.

The bill would require more transparency from cryptocurrency platforms, make certain conflicts of interest illegal, and take other steps to bring the industry into line with how other financial institutions are regulated. It would mandate third-party, public audits of cryptocurrency platforms and would prohibit someone from owning both a cryptocurrency platform and the tokens that trade there.

Cryptocurrency exchanges would have to reimburse customers in some cases of fraud, similar to requirements on banks under the federal Electronic Fund Transfer Act.

The bill must be approved by the Democrat-led House and Senate and signed by Gov. Kathy Hochul before the legislative session concludes in 2024 to become law.

Federal agencies, including the Securities and Exchange Commission and Commodity Futures Trading Commission, have debated how to regulate the cryptocurrency industry in the absence of any comprehensive laws on the books by Congress.

The New York legislation follows a barrage of legal actions by James to crack down on what she considers “rampant fraud and dysfunction” in the cryptocurrency industry. Most recently, in March, her office filed a lawsuit against KuCoin for failing to register as a securities and commodities broker and took similar action in February against CoinEx.

“New York investors should have the peace of mind that there are safeguards in place to protect them and their money,” James said in the release. “All investments are regulated to account for every penny of investors’ money—cryptocurrency should be no exception.”

Currently, the NYDFS licenses and examines cryptocurrency businesses. In January, Coinbase agreed to pay $100 million as part of a settlement with the regulator addressing allegations it violated the Bank Secrecy Act/anti-money laundering laws.