(Bloomberg) -- Hut 8 Mining Corp., one of the largest public Bitcoin mining companies, said it has entered into a $50 million credit facility with a unit of Coinbase Global Inc. 

The agreement comes as Bitcoin miners prepare for a preprogrammed event on the digital asset’s blockchain, dubbed the halving. The update cuts the amount of token rewarded to its miners, which has been the main source of revenue for those companies, in half every four years until the supply reaches its 21 million cap in about 2140. The reward will be down from 6.25 to 3.125 Bitcoin to the miners that successfully process a unit of data on the network in 2024.

“This credit facility gives us additional financial flexibility,” Jaime Leverton, chief executive of Toronto-based Hut 8, said in a statement Monday. “At the same time, it ensures that we can maintain our dynamic Bitcoin treasury management strategy going into the halving.”

Hut 8 has been one of the few Bitcoin miners that are still holding the coins they mine through the prolonged market downturn. While that helps such companies become proxies for Bitcoin and attract those that want to have exposure to the digital asset in the equity market, the strategy also prompts the miners to search for extra cash since they are not selling their Bitcoin holdings. 

Bitcoin miners have enjoyed a respite due to the rebound in Bitcoin prices this year but inflated power costs, mounting debt they accumulated from the last bull market in 2021 and increasing competition among miners have hampered their recovery. It has been difficult for them to raise capital from debt financing after a flurry of crypto lenders went bankrupt due to multiple meltdowns last year. 

Shares of Hut 8 have more than tripled this year to around $2.90, after tumbling almost 90% in 2022.

The credit facility matures 364 days after the date of the first borrowing and the obligations under the facility are secured by Hut 8’s interest in certain Bitcoin held in the custody of Coinbase Custody Trust Company, LLC. The facility will be subject to maintaining a specified loan-to-value ratio. 

All amounts borrowed will bear interest at a rate equal to the greater of the federal funds rate on the date of the applicable borrowing, and 3.25%, plus 5.0%. 

©2023 Bloomberg L.P.