Tesla does not match Carmax.....on Teslas. Tesla will match on everything else as far as I know.
Also, can't say enough about ev-cpo. If you're in the market for a used Tesla, set yourself up an alert for what you're looking for, and be ready to pounce. Good deals go quick.