With billionaire investor Carl Icahn demanding that Family Dollar (FDO.DL) put itself up for sale, and the likelihood that the top contender for buying the company has taken itself out of the picture, the time is right for Wal-Mart (WMT -0.65%) to step up and make an offer.

The underperforming deep discounter saw its stock surge earlier this month after Icahn disclosed a near-10% stake in the retailer and issued an ultimatum to the board of directors to put itself up for sale. With the company having underperformed its peers, let alone the market, on virtually all metrics over the past few years, and with the fragmented industry ripe for consolidation, Icahn stressed how imperative it was for Family Dollar to "be put up for sale immediately."

FDO Chart

FDO data. Source: YCharts.

Speculation ran high that Dollar General (DG 0.82%) was the most likely candidate to acquire its rival. With Family Dollar's market value pegged at around $7.5 billion, only the General and Dollar Tree (DLTR -1.23%) are immediate peers big enough to undertake the attempt. But Dollar General just announced that its CEO would retire by next May, if not sooner, which seemingly nixes its candidacy as an acquirer because you typically don't put a new executive in the position of having to integrate a new company on top of learning the ropes of the existing one. Though Dollar Tree itself could also probably afford to make an offer, one analyst's review of their store base found the two companies had a near-50% overlap in store locations, making an acquisition superfluous.

But all the seeds for Wal-Mart to make an acquisition are in place. That same location analysis found that only 19% of the retail king's stores had an overlap with Family Dollar's (Dollar General had a 29% overlap), but more important, Wal-Mart is making a big push in the small-format store.

The discounter has been testing these tiny footprint stores for a while, and currently operates nearly 350 Neighborhood Markets, which come in at 42,000 square feet, and 20 Walmart Express stores, at just 15,000 square feet. It's even experimenting with a convenience-store-sized operation called Walmart-to-Go that is a minuscule 2,500 square feet. It's looking to expand these concepts further, and while it had originally planned to open 120 to 150 stores during the fiscal year, it now expects to add approximately 270 to 300 small stores and will spend an additional $600 million on the makeover. 

Family Dollar operates some 7,900 stores in 46 states and was planning on opening 500 more this fiscal year. A typical Family Dollar store is between 7,500 and 9,500 square feet, with the average at 7,200 square feet of selling space. These would fit neatly into Wal-Mart's new niche between the Express and to-Go concepts (the Neighborhood Markets are more of a condensed version of its supercenters).

Although Family Dollar's board quickly adopted a poison pill defense that stops anyone from acquiring more than 10% of its shares or else triggers massive dilution of their stock, it was done not so much to actually prevent a takeover of the company but rather to give the board time to consider its options.

With a ready-made installed base available to jump-start its expansion into the small-store format, and the potential to acquire a struggling rival and not necessarily have to pay a premium price for it, now would be the perfect time for Wal-Mart to step forward and make a bid for Family Dollar.