Sayyiduna Ya'la bin Munabbih (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) sent me with a military detachment. A man said: I will go out with you on condition that you give me a share of the spoils. Then he said: By Allah, I do not know whether you will gain spoils or not, so fix something definite for me instead. So I fixed three dinars for him. Then we fought and gained spoils, and I asked the Prophet (peace and blessings be upon him) about it. He (peace and blessings be upon him) said: "I find nothing for him in this world or the Hereafter except these three dinars of his that he took."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15237