Snap, the company behind the Snapchat mobile messaging app best known for its commitment to privacy, is ready to go public. The company will be listing itself on the New York Stock Exchange for a whopping $3 billion. It's a bold move for a business that has amassed a $1.2 billion deficit over the past five years, leaving many pondering whether the IPO will boom or go bust.

The filing is providing a first look inside the company that was once famous primarily as a sexting service, because images would disappear shortly after viewing.

One of the more intriguing details of Snap’s IPO filing with the Securities and Exchange Commission is that the company has just entered into a $400 million agreement with Google Cloud Platform to provide infrastructure and services for the soon-to-be public company.

Oh, Snap

According to the SEC filing, the agreement between Snap and Google has an initial term of five years, and requires Snap to purchase at least $400 million of cloud services in each year of the agreement. However, for each of the first four years, up to 15 percent of this amount may be moved to a subsequent year.

That sounds like a hefty sum, particularly for a company that has so far failed to turn a profit in its five-year history. In fact, the company posted a staggering $514.6 million loss last year and only $404.5 million in revenues. And those numbers are even worse than the previous year’s loss of $372.9 million. Over its five-year existence, the company has posted a whopping $1.2 billion deficit.

User adoption has slowed recently as well. The company reported only gaining 15 million new users in the past six months, down from the 36 million it had picked up in the previous six months. Snap has also struggled to monetize its business, bringing in less revenue per user than other social networks such as Facebook.

Nevertheless, the company has succeeded in turning heads among Silicon Valley investors and competitors. In fact, just three years ago Facebook, one of Snapchat’s most important competitors, offered to acquire the company for $3 billion in cash. The upcoming IPO will value the company at somewhere between $20 billion and $25 billion.

Facing Apple and Google

While Snapchat is seen primarily as a social media platform competing with the likes of Facebook, Snap described itself as a “camera company” in its IPO filing, listing Apple and Google as the companies that present the greatest risk to its business model.

Both Apple and Google exercise enormous amounts of control over the mobile device environment, thanks to the near ubiquity of the iOS and Android operating systems. That puts both companies in powerful positions to hamstring the Snapchat mobile app if they decide to roll out competing products of their own.

"We may be able to create new products based on advances in their capabilities, but we may also be limited if they choose to block a particular feature or reject new updates in our application," Snap said of the two companies in its security filing.