WASHINGTON (Reuters) - The U.S. Securities and Exchange Commission on Friday sued cryptocurrency firm Consensys, alleging it has failed to register as a broker through its MetaMask swaps service.

Consensys also failed to register the offer and sale of certain securities through its crypto staking programs, which allow users to lock up tokens for a certain period of time in exchange for yield, the SEC said.

The regulator said in its complaint, which was filed in U.S. District Court in Brooklyn, New York, that Consensys had collected more than $250 million in fees through "its conduct as an unregistered broker."

Consensys operates the popular MetaMask self-custodial crypto wallet, which enables crypto owners to store their assets as well as buy, send and swap tokens.

Consensys did not immediately respond to a request for comment.

In April, Consensys sued the SEC after the firm said it received a formal notice from the agency that it planned to bring an enforcement action against the company. In the lawsuit, Consensys said the SEC was attempting to "unlawfully regulate" ether -- the world's second largest cryptocurrency -- through enforcement actions.

Consensys said via a social media post on June 19 that it had received notice that the SEC had closed its investigation into the company. Still, the company said it would continue its lawsuit in pursuit of a court ruling that the SEC does not have legal authority to regulate software interfaces built on the ethereum blockchain.

(Reporting by Kanishka Singh in Washington and Hannah Lang in New York)

By Hannah Lang and Kanishka Singh