Rivian edged closer to its long-awaited initial public offering when it filed its S-1 document with the U.S. Securities and Exchange Commission on Friday.

The document reveals that Rivian reported a net loss of $426 million in 2019 and that in 2020, these losses more than doubled to $1.01 billion as the company invested heavily in its factory in Normal, Illinois while readying the R1T and R1S for production. These losses have continued to grow and hit $994 million in the first half of 2021 alone.

The vast majority of Rivian’s losses come through research and development expenses. In fact, Rivian has spent $683 million on R&D in the first half of 2021, having already spent $766 million on R&D in 2020. Rivian ultimately expects spending on capital expenditures to equate to around $8 billion through the end of 2023 with the company continuing to build out infrastructure, charging networks, battery cell production, service operations, and retail and software development, Tech Crunch notes.

Watch Also: The First Rivian R1T Reviews Are In, Here’s What They’re Saying

While losses of this magnitude would be enough to kill most other EV startups, Rivian has secured more than $10 billion from private investors over the past couple of years, including Amazon and T. Rowe Price Group. It had about $3.7 billion in cash and cash equivalents on hand as of June 30, 2021 in order to fund its continued growth.

Rivian’s S-1 also provides further details about the company’s affiliation with Amazon. This deal with give Amazon the exclusive rights to Rivian’s electric delivery vehicle for four years after taking delivery of the first one. The e-commerce giant has ordered 100,000 trucks by 2030 with the first 10,000 of them due to arrive this year. The document also reveals that as of September, Rivian had secured 48,390 pre-orders for the R1T and R1S in the United States and Canada, each requiring a refundable $1,000 deposit.