Tesla warranties their batteries for eight years or 100,000 to 150,000 miles, depending on the model -- and calculates that their vehicles get scrapped after approximately 200,000 miles of usage in the U.S. and roughly 150,000 miles in Europe.
It costs approx $20k to replace out of warranty batteries for a Tesla.
Your 20 yr mark is optimistic at best, especially in places like Canada where our weather ranges are currently -40C to +40C.