Robinhood LLC, a no-commission online trading platform, has agreed to pay a $7.5 million fine and to make “sweeping changes” to gamification strategies to settle charges it breached Massachusetts fiduciary, supervisory and data laws.

Massachusetts Secretary of the Commonwealth William Galvin filed the case against Robinhood in 2020, alleging the firm used gamification on its app—including digital confetti, scratch-off lottery-style tickets and stock awards for first-time traders—to “attract and manipulate” customers, many of them first-time investors. The app also employed push notifications and “most popular” lists to encourage frequent trades, according to regulators.

The settlement "resolves historical matters dating back to 2021 that do not reflect Robinhood today,” Robinhood Deputy General Counsel Lucas Moskowitz said in a statement.

In 2021, Robinhood sued Galvin’s office to block the state’s use of the state’s fiduciary rule to fine and censure the firm. But in August, the Massachusetts Supreme Court upheld Galvin’s authority to promulgate the rule and proceed with the case.

Robinhood settled the charges one day before its deadline for filing an appeal to the U.S. Supreme Court.

“While I’m happy that this case with Robinhood has finally been resolved, I’m most grateful that after being thoroughly tested in court, the Massachusetts Fiduciary Rule remains the law of the land,” Galvin said in a statement.

“This rule allows my office to ensure that investors’ interests are being protected in this state, and I hope that other states follow suit,” Galvin added.

The rule allows the state to impose fines, censure or suspend any firm that “has engaged in unethical or dishonest conduct or practices in the securities, commodities or insurance business.”

As part of the settlement, Robinhood has agreed to overhaul its digital engagement strategies. The company ceased many of its gamification tactics after the state filed the complaints.

About 486,598 Massachusetts customers held $1.67 billion in assets with Robinhood when the state filed the case.