Our perception of fairness is parochial, so it's biased against the outgroup, but it works very well within the ingroup. But in- and outgroup are not rigidly defined and can be changed. If you maximize the size of the ingroup, there's nothing wrong with innate farness.
"Compare yourself to who you were yesterday, not to someone else today"