It is narrated from Ata (may Allah have mercy on him), a man said to Sayyiduna Ibn Abbas (may Allah be pleased with them): I have vowed to sacrifice my own life. So Sayyiduna Ibn Abbas (may Allah be pleased with them) said: For you, in the life of the Messenger of Allah, is the best example. (And in the Noble Qur'an it is stated:) "And We ransomed him with a great sacrifice."
Hadith Referenceمسند اسحاق بن راهويه / كتاب المناسك / 376