Commodities have been in a funk for some time, leaving more than one miner feeling the pinch of lower revenue and earnings. And while most miners have been reining in development efforts, key projects have continued at some big players. Which is why you might be asking which is the better buy: Teck Resources Ltd (NYSE: TCK) vs. Vale SA (NYSE: VALE)? While both are investing for the future, one has a dark cloud hanging over it that you should stay away from.

Teck's Fort Hills oil sands investment being built. Image source: Teck Resources Ltd.      

Pulling back, but still growing

There's no question that both Teck and Vale have been hit hard by the commodity downturn that started in 2011. For example, Teck's earnings have dropped each year since 2011, falling deep into the red last year on write-offs. Cash flow from operations, meanwhile, was cut in half over the same time period. Vale's earnings followed a roughly similar course, with a big loss in 2015 because of a massive write-off.     

Image source: Teck Resources.

In response, both companies have been cutting costs and trying to right-size their businesses for the current market environment. But, despite cutting back, both are still moving forward with key projects. In the case of Teck, it's an expansion of its business into a new line, oil, via a 20% stake in the Fort Hills oil sands mine in Alberta. For Vale, the key project is the company's S11D mine, which is expected to produce iron ore at extremely low costs.     

Good for investors

Although these investments are costly today, both should be good for the companies, and investors, over the long term. Teck's Canadian oil sands spending will add oil to the company's current focus on metallurgical coal, copper, and zinc. Although oil prices aren't nearly as high as they were when the project go the green light in 2013, taking on a new commodity will materially increase the company's diversification. And that should be a big benefit over the long term.

Vale's S11D mine, meanwhile, will allow it to better control costs. Put simply, it can shift production to low-cost S11D while prices for iron ore are weak. When commodity prices pick up, it can increase production at its higher-cost mines. That will add an important layer of flexibility for a company that generates about two-thirds of its top line from iron ore.     

S11D is still getting funded, despite reduced investing overall. Image source: Vale SA.    

The big difference

So far, the storylines here are very similar. However, there's a key divergence -- a mine disaster at the Samarco Mine, a 50/50 joint venture between Vale and BHP Billiton (BHP 0.85%). That disaster resulted in the destruction of property and the loss of lives. There are two big problems here.

First, although Vale and BHP have agreed to a $5.5 billion settlement already, Brazilian law isn't that simple. There's another case, seeking roughly $44 billion in damages still lingering over the company. If Vale and BHP were to lose that case, Vale would be responsible for roughly $22 billion in legal bills, not including any costs to fight the case. Vale's market cap is only around $28 billion. In other words, that's a big bill for Vale to pay.     

The second big problem is all about location. Unlike BHP, Vale's business is heavily concentrated in Brazil. That means that a court could, if it wanted to, take control of Vale's assets with relative ease. Although that wouldn't necessarily put the miner out of business, it would be a big problem for the company and its shareholders. Brazil, for reference, just took control of $655 million worth of assets from engineering firms Odebrecht SA and OAS SA because of the Petrobras corruption scandle.     

In the end, Vale and Teck are moving in the right direction, in a business sense. But with a large legal issue still looming over Vale, the risks are much higher for the Brazilian miner. Investors asking themselves which is the better buy, Teck Resources Ltd. vs. Vale SA, should err on the side of caution and go with Teck.