A bankruptcy court judge has approved a plan by the cryptocurrency lender Genesis Global to return about $3 billion to its creditors and investors, including thousands of people who New York regulators say were defrauded by the company.

The plan and settlement approved Friday by Judge Sean H. Lane includes up to $2 billion to settle a lawsuit by New York Attorney General Letitia James, who said the company misled investors about the risks of putting their money into a company program known as Gemini Earn.

“This historic settlement is a major step toward ensuring the victims who invested in Genesis have a semblance of justice," James said in a statement Monday. “Once again, we see the real-world consequences and detrimental losses that can happen because of a lack of oversight and regulation within the cryptocurrency industry.”

Creditors whose claims were in U.S. dollars will be receiving 100% of their loan balances by the firm, which filed for bankruptcy last year. Those with claims in cryptocurrency will see some short of shortfall, according to the decision.

The settlement includes a victim fund for Genesis' creditors to help recover some of their losses, James' office said.

"We look forward to putting the Plan into effect and making distributions as expeditiously as possible,” Genesis Interim CEO Derar Islim said in a statement on Friday.