Bitcoin miner Bitfarms (BITF) said it agreed to buy rival Stronghold Digital (SDIG) for $175 million in stock and assumed debt.

The offer comprises 2.52 Bitfarms shares for each one of Stronghold, a premium of 71% to Stronghold's 90-day volume-weighted average price on Nasdaq as of Aug. 16, Bitfarms said in a statement.

Bitfarms is itself fending off an approach by Riot Platforms (RIOT), which in June abandoned an attempt to buy the company in favor of overhauling the board and building its stake in the Toronto-based company before engaging in further takeover attempts. It now owns almost 19% of Bitfarms.

Stronghold in May said it was exploring strategic alternatives that could include the sale of the company.