I wouldn't be suprised if Tesla has added (or will add) a small monitoring chip to the battery pack, which would track statistics on battery quality and usage. That would make it very easy and quick to determine the relative value of each battery.
I wonder if the economics will allow for an hacked battery market. Perhaps organized crime goes around with batteries lying about their age to make some $$$.
That would require a secondary market for the batteries. Tesla could fight this by building the battery swap in to the cost of ownership, just like they do with the free supercharger stations. In this scenario, the demand for second-hand Tesla batteries would be very soft, so it wouldn't be worth the criminal effort.
Most of the batteries already have it. They keep a profile of the battery on a chip, this helps in factor in memory effect in batteries.