Irvine-based ChromaDex Corp., a maker of ingredients for dietary supplements and other natural-products companies, has signed a four-year, $62 million supply contract with 5Linx Enterprises Inc., a marketing firm in Rochester, N.Y.

5Linx, which had about $104 million in 2012 revenue, has been ranked among the largest direct sales companies in the world by Lake Dallas, Texas-based Direct Selling News.

ChromaDex is expected to sell about $48 million worth of its recently patented compound Niagen Nicotinamide Riboside to 5Linx through 2017.

It’s also set to sell about $14.5 million of Purenergy, a caffeine alternative, over the next four years.

ChromaDex has had increases in both revenues and net losses in recent years.

It lost about $11.7 million on revenue of $11.6 million in 2012, following an annual loss of $7.9 million on revenue of $8.1 million in 2011. The company reported a loss of $3.7 million on revenue of $7.8 million for the first nine months of 2013.

ChromaDex’s stock closed up about 5.6% Monday, with a market value of about $178 million, on news of the deal with 5Linx.