Shulchan Aruch on not serving as a dayan on a matter from which one stands to benefit.