When Avraham is victorious in the war with the four and five kings, the King of Sodom tells Avraham to give him back "all the people (literally, the souls) and take all the wealth for yourself." Avraham responds that he will take nothing. To emphasize his point, he raises his hand to heaven taking an oath, to take "not even a thread or a shoe strap or anything of yours, so you shall not say, 'It is I who made Avram rich.' ''
Rav D. Hofstedter asks, Avraham had previously taken gifts from Pharaoh and would later take gifts from Avimelech. Why was he resolved not to take gifts from the King of Sodom? Rabbi M. Druck notes that taking anything from the King of Sodom would cause a desecration of God's name. In Egypt, the society was so corrupt that nothing Avraham did or didn't do would have changed the situation, notes the Ner Uziel. Avimelech understood that Hashem was controlling events. However with Sodom, if Avraham would take the spoils of the war, people would say that he entered the war for his own profit, rather than to save his nephew. This war was not so much a political war as it was a religious war against monotheism. The capture of Lot was the bait that would lure Avraham into the battle. His enemies hoped for his death, and with him would die the idea of monotheism. By not taking any of the spoils for himself, Avraham testified that it was not he who had won the war, but Hashem. He thus created a sanctification of God's name and increased his influence over the beliefs of others.
Rashi notes that Hashem rewarded Avraham's descendants for his selflessness. For refusing to take even a thread, Bnei Yisroel were rewarded with the mitzvah of tzitzit, and for refusing to take even a boot strap, they received the mitzvah of tefillin. Rabbi Bick explains that these two mitzvot are the seals of Hashem attesting to His presence, just as Avraham attested to Hashem's presence in his victory in the battle.
Rabbi Goldwicht suggests that since the mindset of Sodom was so materialistic and avaricious everything they touched would be tainted. Avraham was afraid that these Sodomite possessions would have absorbed some of the negative energy and it would exert an influence on him. Letitcha Elyon cites Rav Shach who heard from the Saba of Slabodka that one should always be wary and suspect of his yetzer hara. The psyche of man is that once one has benefited even from something as negligible as a shoelace, he is aroused to want more. Therefore Avraham strengthened his determination to take nothing by making a vow. Rabbi Wolbe suggests a lesson for all of us. If Avraham felt a need to erect a barrier to sin when he might be tempted, we must also take precautions not to stumble into sin.
The Shaarei Derech notes that both the mitzvah of tzizit and tefilin represent fear of God and help us act appropriately when we see them. Avraham Avinu created a verbal checkpoint of a similar nature by his vow. Rabbi Fryman cites a Gemarah that discusses who inherits Olam Haba. We can easily understand that someone who lives in Eretz Yisroel and raises children who learn Torah. Why though would someone who makes havdalah over wine merit Olam Haba? Rabbi Fryman explains that it refers to a man who wants to drink this wine over the course of Shabbat but refrains from doing so to save it for the mitzvah of havdalah.
Rabbi Fryman then moves on to a situation where a High priest and a nazarite are walking together when they encounter a corpse with no one to tend to its burial. Rabbi Eliezer rules that the High Priest should defile himself rather than the nazarite who has been practicing self-restraint for so long. That's how strongly Hashem values self-discipline. This provides the link between Avraham's oath and the reward of tzitzit and tefillin. When someone is faced with an inner struggle, as Avraham Avinu was in regard to taking the spoils, one should run interference before one succumbs. That was the purpose of Avraham's oath, notes the Ohr Chodosh, to help him retain control over his desire for the wealth.
Even Avraham Avinu was human and was tempted to accept inappropriate gifts. He created a means of supporting his resolve to stay true to Hashem. How much more so must we be vigilant in our behavior and create guidelines for ourselves that will help us remain true to ourselves as servants of Hashem.