Can i sell a phone that has been previously jailbroken, but restored, back to my carrier?
Sure; provided that you don't brick it accidentally, restoring it in iTunes will remove any evidence that it was ever jailbroken.  When I bought my 6+, the 5S I sent back to the carrier had been jailbroken the entire time I owned it.  I restored it to factory before sending it back and no one mentioned anything.  Same thing when I updated from the 6+ to the 6S+.  Restored the 6+ and the carrier didn't complain.