As Venezuela suffers its worst meltdown in history, with inflation skyrocketing and basic necessities running in short supply, many have taken to bitcoin mining in a bid to survive, according to a report in the current issue of the Atlantic.

The reason? Electricity is now cheaper and more affordable in the crisis-hit country than most basic goods. That’s because under President Nicolás Maduro, electric power is heavily subsidized to the point that it’s essentially free, the Atlantic said.

mining works like this: Miners use computer hardware to perform complex computations that ultimately create each new link in the bitcoin blockchain — the massive, decentralized ledger technology that underpins the cryptocurrency. In return, they are rewarded with bitcoin. One of the key requirements to mine bitcoin is to have a large supply of power.

The Atlantic explained that a Venezuelan user who can run several bitcoin mining devices can clear about $500 a month — that is considered a small fortune enough to feed a family of four and purchase vital goods such as baby diapers or insulin from overseas.

But authorities have begun cracking down on mining operations, according to the Atlantic. The report explained that because the country does not have cryptocurrency laws, police are arresting miners on “spurious” charges. That move has driven miners deeper underground and some are reportedly moving into ethereum for higher profits.