(Denis Balibouse/Reuters)

When reports surfaced last week that Verizon was renegotiating its deal to acquire Yahoo, some analysts were stunned to learn how little of a price cut the telecom giant was seeking — about $250 million — despite the Web company's well-known missteps with customer security. But on Tuesday, the two companies ultimately agreed to a discount of $350 million, or about 7 percent.

Some analysts assumed the epic hacks in 2013 and 2014 that affected hundreds of millions of Yahoo accounts gave Verizon license to ask for a massive discount from the initial $4.8 billion price tag. The reason Verizon didn't do that, according to multiple people familiar with the matter, was because its internal investigation showed that only a “minimal” number of Yahoo's monthly active users had abandoned the company after it disclosed the data breaches.

“We wanted to know how many customers walked away from Yahoo,” one of the people said. “Were there a few? Yeah, but there wasn’t enough to make it worth a billion-dollar dip in price or worth walking away. We still think this is a good deal for us.”

Verizon declined to say how many Yahoo users abandoned the company after learning of the hacks.

Verizon spent months weighing the impact of the incidents and whether they should be considered a dealbreaker. The telecom giant still faces pitfalls with Yahoo, some analysts say. Even after it closes the deal, Verizon has to assume that it may discover more data breaches, said Laura Martin, an industry analyst at Needham & Co. And that could mean further reputation damage or even litigation risk for the company.

In the companies' announcement Tuesday, Verizon said it will split liability with Altaba, the remaining portion of Yahoo that is not being sold to Verizon. Altaba — so named because it owns a partial stake in the Chinese Internet giant Alibaba — will assume 50 percent liability from any future lawsuits related to the data breaches arising from state attorneys general, the Federal Trade Commission (the nation's top consumer watchdog) or international regulators. It will also assume 50 percent liability for lawsuits stemming from Yahoo's users or commercial partners, said Craig Silliman, Verizon's general counsel.

That puts Verizon in a better position than before the hacks were disclosed, Silliman said, because it could potentially reduce the amount that Verizon might need to pay in a future court case related to the hacks. “It's a further price cut, effectively,” said Silliman, “instead of picking a number, since no one knows what those numbers will be. It's a very good thing for us.”

Yahoo's operations are under investigation by the Securities and Exchange Commission over whether the company did enough to inform shareholders of the hacks. Under Tuesday's deal, Altaba will assume liability for the SEC investigation.

“Stuff like this doesn't go unpunished in this country,” Roger Entner, an analyst at Recon Analytics, said of the hacks. Entner said in a recent interview that Yahoo should not be worth more to Verizon than about $2.2 billion and that Verizon ought to seek “a pound of flesh.” He added Tuesday that the $350 million discount was a "measly" figure.

"The $350 million is still cheap," he said. "This is still the company responsible for two of the worst, if not the worst hacks in U.S. history."

So why would Verizon continue to pursue the Yahoo deal despite the risks? According to Entner, the initial $4.8 billion price tag “is still just pocket change” to the wireless provider. By comparison, Verizon spent roughly $11 billion building out its cellular network last year. If $4.8 billion is already a drop in the bucket, then Verizon probably doesn't much care whether it gets a $2 million discount or a $2 billion discount.

The key thing for Verizon is that it gets to control Yahoo's beleaguered (but still massive) core properties, which include Tumblr, Flickr and a whole lot of news and fantasy sports sites. Verizon expects to sell advertising to the millions of people who visit those sites every month — and to gather up all the behavioral data they generate.

“They want Yahoo users so they can market to them,” said Jeff Kagan, an independent technology analyst.

In the United States, digital ad spending has become an even bigger business than TV ad spending, according to eMarketer, and it's only going to grow. By 2020, the research firm says, $113 billion will be spent on U.S. digital ads.

Verizon wants a slice of that revenue. And with many on Wall Street and in Washington expecting the Trump administration to roll back its privacy rules for Internet providers — which prohibit some forms of data sharing — Verizon could soon find more ways to make money off Yahoo users.

This isn't just good news for Verizon. It also benefits Yahoo by making its future look more promising.

“We continue to be very excited to join forces with Verizon and AOL,” Yahoo chief executive Marissa Mayer said in a statement Tuesday. Mayer said that she still expects the deal to close in the second quarter.