SE'AH B'SE'AH IS PERMITTED WHEN THE BORROWER HAS SOME [loans: Se'ah b'Se'ah]
Gemara
44b: Rav borrowed gold coins from R. Chiya's daughter. Their value increased relative to silver. R. Chiya ruled that he returns coins like he borrowed.
Rav had gold coins at home. In such a case, one may lend Se'ah b'Se'ah (i.e. on condition to return the same amount of the commodity).
46a (Beraisa): If Reuven's workers demand payment from him, he may tell a moneychanger 'give to me a Dinar's worth of coins (to pay them), and I will give to you a Dinar and a Trisis' only if Reuven has the coins in his house.
Question: This is a loan with Ribis!
Answer (Rav Ashi): Since he had at home the same thing he borrowed, it is permitted. (Ribis is payment for borrowing for a period of time.)
63b (Rav Nachman): If wax sells for four cakes per Zuz, a seller may offer five if the buyer pays now and receives it later only if he has wax now.
He teaches about a seller who already gave to Ploni money to receive wax. One might have thought that he is like one who borrows Se'ah b'Se'ah, and he already has it at home. Rav Nachman teaches that this is not so. Since he has not collected his wax, it is as if he does not have it.
72b: Rav Huna permitted Talmidim to borrow in Tishrei and repay Peros in Teves (at the cheaper price of Teves), because the money could be used now to buy Peros in Hini or Shili (other places)!
75a (Mishnah): One may not say 'lend to me a Kor of wheat on condition that I will return a Kor after the harvest.' He may ask for a loan until his son comes or until he finds the key (to get to wheat he has now);
Hillel forbids this.
(Rav Huna): One who has wheat may borrow the quantity he has.
(R. Yitzchak): If one has a Se'ah, he may borrow very many Sa'im.
Support (for R. Yitzchak - R. Chiya - Beraisa): One may not lend wine (or oil) when he does not have even a drop of wine (or oil);
Inference: If he has, he may borrow many drops.
(Rav Nachman): The Halachah follows Hillel.
The Halachah does not follow Hillel.
Rishonim
Rif (45a): The Halachah is, if one has a Se'ah, he may borrow very many Sa'im. Chachamim permit lending Stam (without fixing a price) and repay Stam. This is when there is a market price, like Rav Huna taught (72b), or when the borrower has some of that species, like R. Yitzchak. In such a case, it is like a loan until his son comes or until he finds the key.
Rambam (Hilchos Malveh 10:2): if one has some of the species he wants to borrow, he may borrow Stam without fixing a time and repay Stam, even though there is no market price. Even if he had only one Se'ah, he may borrow many Sa'im. If he has a drop of oil or wine, he may borrow many barrels of wine and oil.
Magid Mishneh: We view it as if he borrowed one corresponding to the one he has, and now he has two, so he may borrow two corresponding to them, and so on. Chachamim were lenient to say so because there is no Isur mid'Oraisa.
Rambam (3): One may not borrow a Kor of wheat in order to return a Kor after the harvest. One may borrow 'until my son comes or until I find the key.'
Rosh (61): One may lend on (condition to be paid with) Peros only if he has, even if there is a market price. That is unlike Se'ah b'Se'ah. Since he lent money, it looks like Ribis. Having money for Peros is like having Peros. This is only for Se'ah b'Se'ah, but not for other loans, because here there is another reason to permit: wheat rots in the storehouse (the borrower helps the lender). Even the Ra'avad (who says that the Heter to lend Se'ah b'Se'ah based on a market price is only when the borrower has money and could buy) agrees that if one has money for one Se'ah, he may borrow many.
Rosh (75): The Mishnah forbids a loan 'until after the harvest', for typically that is when he will have wheat to pay back. The same applies if no time was fixed. It is permitted only if the borrower has. Rav Huna discusses when there is no market price. The Halachah follows R. Yitzchak, who permits borrowing any amount at once even if he has only a little.
Tosfos (75a DH Leis): Rivan says that even R. Yitzchak does not permit giving at once more than the borrower has now. However, he may give it at once and say 'acquire one after the other.' Surely, the lender may pour out wine even when the borrower has only a drop!
Poskim
Shulchan Aruch (YD 162:2): if one has a small amount of a species, even if the key (to where it is) is not in his hand, he may borrow many Sa'im and repay Se'ah b'Se'ah.
Beis Yosef (DH Loveh): The Gemara says 'if he has a Se'ah', but the same applies if he has any amount. We find that one with a drop of wine may borrow much.
Shach (5): It does not suffice for him to have money (unless there is a market price).
Shulchan Aruch (ibid): If he wants to borrow something and has none of that species, the lender gives to him a bit of the species, or he lends to him, and afterwards lend to him many Sa'im.
Beis Yosef (DH Im Ein): Talmidei ha'Rashba say that if the borrower borrowed a Se'ah, he cannot rely on it to borrow (Se'ah b'Se'ah). This is because he borrowed it to spend (or use) it. I do not understand this. All a person's property is destined to be spent, yet he may rely on it to borrow!
Taz (4): Talmidei ha'Rashba permit if the borrower previously borrowed a Se'ah. They forbid only if the lender come to lend a Se'ah now to permit lending more, for we cannot say that this Se'ah will be used to repay the others, since it is destined to be spent.
Note: He does not discuss why one would even think that lending the first Se'ah (to permit the others) is permitted! Perhaps the Hava Amina was not to lend it Se'ah b'Se'ah, rather, to fix a price for it.
Shach (8): The Bach rules like Talmidei ha'Rashba. It seems that the Ateres Zahav does also, and therefore he omitted 'or he lends.'
Gra (8): When the borrower has only a drop, it is permitted because the next drop lent is considered like the borrower's (and he may borrow corresponding to it). This supports the Beis Yosef.
Rema: If the borrower had a little deposited with someone else, it is as if it is in his hand. If others owe to him, this is not called that he has.
Beis Yosef (DH Im Lo): We learn from 63b. Rav Nachman taught regarding contracting that if one is owed, since it must be collected, it is not as if he has. The same applies to Se'ah b'Se'ah. It would have been a bigger Chidush to teach so about a deposit. Since Rav Nachman did not teach this about a deposit, we infer that a deposit is considered to be ihh.
Gidulei Terumah (46:5:2, brought in Hagahos Tur ha'Shalem 5): The Mishnah permits lending 'until my son comes', which is totally in his Reshus. Why didn't it teach the bigger Chidush of a deposit with someone else? Perhaps this is because a deposit does not always permit, e.g. if the Shomer denies it. The Tana would have needed to distinguish between when the Shomer admits and when he denies. He did not want to do so.
Rema (ibid): The same applies to if he has elsewhere, but the lender has no Derech l'Sham (a path to there).
Beis Yosef (DH v'Im, citing Mordechai 439): If he does not normally go there, this is not like 'until my son comes', rather, like one who is owed, which is forbidden.
Note: Sometimes 'Derech l'Sham' connotes a possible way to get to there (e.g. Rambam Hilchos Malveh 4:12).
Rema (ibid.): If the borrower says that he has some of the species, he need not bring a proof; the lender may lend to him.
Source: Mordechai 432, brought in Beis Yosef DH mi'MAh
Rema (ibid.): When he has some of the species, he may lend Stam. If the lender stipulates that if the price increases he will pay wheat, and if the price decreases he wil pay what it was worth at the time of the loan, it is forbidden, for the lender is close to gaining and far from losing.