Fair value measurements - Schedule of Significant Unobservable Inputs Used in Black-Scholes Model to Measure Warrants Payable (Details) - $ / shares
|
12 Months Ended |
Dec. 31, 2020 |
Dec. 31, 2019 |
| Preferred stock purchase warrants |
|
|
| Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |
|
|
| Beginning stock price (in dollars per share) |
|
$ 10.27
|
| Strike price (in dollars per share) |
|
$ 17.27
|
| Discount factor |
|
15.00%
|
| Preferred stock purchase warrants | Minimum |
|
|
| Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |
|
|
| Expected volatility |
|
45.00%
|
| Expected term |
|
2 years
|
| Risk-free interest rate |
|
1.58%
|
| Preferred stock purchase warrants | Maximum |
|
|
| Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |
|
|
| Expected volatility |
|
49.00%
|
| Expected term |
|
3 years
|
| Risk-free interest rate |
|
1.62%
|
| Common stock purchase warrants |
|
|
| Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |
|
|
| Beginning stock price (in dollars per share) |
$ 30.14
|
$ 7.19
|
| Strike price (in dollars per share) |
$ 1.04
|
$ 1.04
|
| Expected volatility |
56.00%
|
|
| Expected term |
7 days
|
|
| Risk-free interest rate |
0.09%
|
|
| Discount factor |
13.00%
|
15.00%
|
| Common stock purchase warrants | Minimum |
|
|
| Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |
|
|
| Expected volatility |
|
81.10%
|
| Expected term |
|
2 years
|
| Risk-free interest rate |
|
1.58%
|
| Common stock purchase warrants | Maximum |
|
|
| Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |
|
|
| Expected volatility |
|
84.60%
|
| Expected term |
|
3 years
|
| Risk-free interest rate |
|
1.62%
|