The 1070 TI and 2060 have comparable performance, excluding the ray tracing, which sucks anyhow.
The 1080 is not that much better than the 1070 TI, especially if you drop a mild overclock on it, regardless of which, at stock the 1070 TI will pretty much max most games out at Ultra 1080p, if you have a capable enough processor. If the 1070 TI is in VERY good condition, wasn't used for mining AT ALL, and is being purchased from somebody willing to give you the original purchase information or act as an intermediary in the even you should need to warranty it (If it's still under warranty), then it's the better deal.
If any of those conditions are a NO, then I'd avoid it and buy the newer card which will HAVE a warranty, because graphics cards fail (Quite frequently in fact) and buying one that won't be covered by warranty is for idiots, or people with a lot of disposable cash that just don't care.