Just a bit before the new Pixel 2 phones launched, Google released a new trade-in program that allows you to swap an older phone for credit that can be applied (in the form of a partial refund) on a purchase. Since it rolled out, there have been reports that the inspection being performed on phones isn't accurate, resulting in an incorrect trade-in value assessment. According to a statement by a Google rep, this issue seems to have been fixed, at least when it comes to Pixel phones and factory reset/device classification. 

The prices offered in the program weren't the highest, but that was to be expected. What people didn't expect was that the trade-in program would have quite so many fundamental problems. There have been mixed reports of various hiccups, including incorrect assessment of factory-reset status, items being damaged in transit due to the flimsy packaging materials provided by Google, being told a different device was sent in, and extensive delays to receive the trade-in kit as well as delays in assessment. One report on reddit even showed a trade-in rep adding additional reasons for a change in value after the fact.

Device misidentification and incorrect assessment for factory reset status in the case of the Pixel phones seems to have been fixed as of a few days ago, according to a post made by Google Community Manager Orrin on a Product Forum thread related to the topic. If you were one of those affected and your trade-in value was decreased by either factory-reset status or device classification, you are urged to reach out to customer support.

Even so, with the various problems being reported for Google's trade-in program, it might be worth comparing the credit you'd get from sending it in with the used rates for flipping it elsewhere.