We learn in Shabbat (148b): It was stated: A Yom Tov loan, meaning that he borrowed from him food or drink or other things needed for Yom Tov, Rava said: It is subject to claim in a beit din, for if not – they will not lend to him, and he will come to refrain from the joy of Yom Tov. Rav Yosef said: It is not subject to claim in a beit din, for if you say it is subject to claim – he will come to write. And how shall he act? He shall take a pledge from him. And between himself and the other he admits that it is subject to claim, and he may seize it from him. And if this one returns and takes it from him – they extract it from him in a beit din, for he has stolen from him, since he took it according to the law (Ran, see there). And the reasoning of Rava is that even though he can lend by means of a pledge, nevertheless perhaps he does not have a pledge, or he will not want to give a pledge, and he will be nullified from the joy of Yom Tov. And between himself and the other perhaps he will not have the ability to seize it from him, and based on this he also will not want to give.
גרסינן בשבת (קמח ב): איתמר: הלוואת יום טוב, כלומר שהלוה ממנו אוכלין או משקין או שאר דבר שצריך ליום טוב, רבה אמר: ניתנה ליתבע בבית דין, דאם לאו – לא ילוונו, ואתי לאימנועי משמחת יום טוב. רב יוסף אמר: לא ניתנה ליתבע בבית דין, דאי אמרת ניתנה ליתבע – אתי למיכתב. וכיצד יעשה? יטול ממנו משכון. ובינו לבין עצמו מודה דניתנה ליתבע, ויכול לתופסו. ואי הדר הך ואפיק מיניה – מוציאין ממנו בבית דין, דהא גזל ממנו, כיון דבדין נטל (ר"ן עיין שם). וטעמא דרבה דאף על גב שיכול להלוות על ידי משכון, מכל מקום אולי אין לו משכון, או לא ירצה ליתן משכון, ויתבטל משמחת יום טוב. ובינו לבין עצמו אולי לא יהיה ביכולתו לתפוס ממנו, ועל סמך זה גם לא ירצה ליתן.