Credit: Unsplash/CC0 Public Domain

With just days to go until President Donald Trump's ban on TikTok in the U.S. comes into effect, the race is on for owner ByteDance to win approval for its plan to avoid a shutdown.

Technology giant Oracle Corp. has emerged as the Beijing-based company's chosen partner for a , beating out Microsoft Corp. There's still much to be decided before the Sept. 20 deadline. Here's a rundown of what we know so far, what's still up in the air and what could happen next.

What we know:

Who's in and who's out

Oracle confirmed in a brief statement Monday that it's part of the proposal ByteDance has submitted to the U.S. Treasury Department to resolve the row over TikTok. The statement was light on details, but referred to Oracle as the company's "trusted technology provider." Microsoft, the previous presumed frontrunner, said its bid had been rejected.

What the deal looks like

Instead of an outright sale, the transaction is being seen as a corporate restructuring. People familiar with the proposal have said Oracle would make an investment in TikTok, alongside existing ByteDance shareholders including General Atlantic, Sequoia Capital and Coatue Capital.

U.S. Treasury Secretary Steven Mnuchin has referred to the new entity that would come out of the Oracle deal as "TikTok Global." He said the business would have its headquarters in the U.S. and create 20,000 jobs.

What Trump thinks of it, for now

The president said Tuesday that his staff are "very close to a deal." He added that Oracle founder Larry Ellison has been "really a terrific guy for a long time," a show of potential support for the deal.

What we don't know:

The exact terms of the deal

While Oracle and some existing shareholders are likely to invest, it's unclear how much of the new TikTok entity they would own or how it would be valued. Walmart Inc.'s role is also unknown: the retail giant had teamed up with Microsoft as part of that company's proposal, but has since said that it remains in talks with ByteDance and other interested parties.

If it'll pass a national-security review

Though details are light, based on what's been revealed so far about the deal, national security experts have told Bloomberg News that the arrangement doesn't satisfy concerns laid out by the Trump administration in executive orders and public statements. However, even if security officials recommend Trump block the deal, the president has the final say and can overrule their recommendation.

Whether Trump will get his payout

The president has repeatedly insisted that any deal would have to include a substantial payment to the U.S. Mnuchin's promise of new American jobs could go some way to fulfilling that demand.

When it'll get done

While Trump initially said he wanted a deal by Sept. 15, the ban on TikTok's U.S. operations that he signed last month in a bid to force a sale requires the company to act by Sept. 20. Trump indicated last week that the deadline wouldn't be extended. A separate decision by the Committee on Foreign Investment in the United States, or CFIUS, requires a sale by mid-November.

What will happen to the algorithms

One of the big questions is what will happen to the source code underpinning the social media platform in a restructuring. ByteDance has decided it won't sell or transfer the algorithm, according to the South China Morning Post, but the company's U.S.-based technology team would be free to develop a new algorithm.

What China thinks

The Chinese government will also have to approve ByteDance's plans under new restrictions Beijing imposed on the export of artificial intelligence technologies, Bloomberg News reported earlier. ByteDance has said it will "strictly comply with" the new regulations.

What's next?

A U.S. national-security panel reviewed the bid Tuesday afternoon, but didn't make a recommendation that the president approve or reject the deal, Bloomberg News has reported. Mnuchin, who oversees CFIUS, has promised to give Trump the panel's recommendation this week.

The Commerce Department will also have to take a look at the deal, as the U.S. is running a two-track national security review.