223 F.3d 1004 (9th Cir. 2000)
In re: SUPERIOR STAMP & COIN CO., INC., Debtor.CAROLYN ADAMS, individually and as the Personal Representative of the Estate of  Clarke E. Adams, Appellant,v.PETER A. ANDERSON, Chapter II Trustee, Appellee.
No. 99-55204

Office of the Circuit Executive
U.S. Court of Appeals for the Ninth Circuit
Argued and Submitted June 9, 2000--Pasadena, CaliforniaFiled September 6, 2000
Stacey M. Garrett, Keesel, Young & Logan, Long Beach, California, for the appellant.
Gregory S. Abrams and Judith Seeds Miller, A.S.K. Financial, Tarzana, California, for the appellee.
Appeal from the United States District Court for the Central District of California, D.C. No. CV-98-00409-CBM; Consuelo B. Marshall, District Judge, Presiding
Before: Stephen Reinhardt, Richard A. Paez, Circuit Judges, and William L.  Dwyer, District Judge.1
REINHARDT, Circuit Judge:


1
This case involves a dispute over the interpretation of the "earmarking" doctrine a rule that is applied in bankruptcy cases. The question before us is whether the bankruptcy court erred in determining that certain payments were avoidable under 11 U.S.C. S 547 as preferential transfers. We hold that where a third party lends money to a debtor on the condition that it be used to pay a specific debt, the fact that the debtor requested the loan or that the funds were advanced to the debtor rather than paid directly to the recipient creditor does not render the transfer outside the scope of the earmarking doctrine. The decisions of the bankruptcy court and the district court are reversed.

I. BACKGROUND

2
Superior Stamp & Coin ("Superior") operated as a full service auction house specializing in the auction of coins, sports and Hollywood memorabilia, and related goods, until the company filed for bankruptcy in 1994. Appellee Anderson was appointed trustee in 1996.


3
In 1992, appellant Carolyn Adams and Superior entered into an auction consignment agreement. Under the agreement, Superior agreed to auction Adams's coin collection and pay Adams the net proceeds within 30 days after receiving the funds. The net proceeds amounted to $374,125.57. Superior failed to pay them. In April,1994, after Adams inquired about whether Superior had remitted the auction funds, the copresident of Superior, Ira Goldberg, negotiated a repayment schedule with her that called for Superior to remit the proceeds to Adams in six equal payments, each totaling $62,355.00.


4
In early 1994, Superior was under severe financial strain. The Bank of California ("bank"), Superior's largest creditor, had become concerned about Superior's financial situation, and was actively involved in Superior's day-to-day management. Because of that involvement, Goldberg submitted to the bank a copy of his letter to Adams confirming the repayment schedule.


5
In an effort to preserve Superior's business, the bank and Superior entered into a written agreement on May 13, 1994, regarding the consequences of Superior's default on its credit agreement with the bank. The agreement required, among other things, that Superior submit monthly budgets to the bank for approval. In addition, the agreement stated that the "[b]orrower will not, under any circumstances, without written approval from bank, pay any obligations of borrower other than to bank, which were due prior to January 1, 1994." The debt to Adams was just such an obligation.


6
Superior subsequently submitted a budget to the bank that included, among the items to be paid, the installment to Adams. On May 25, 1994, Superior and the bank met to discuss, among other things, the procedures established by the bank for advancing funds to Superior. The memorandum prepared to confirm the outcome of the meeting noted that Superior would disburse checks to vendors and consignors according to budgets previously provided to the bank, and that the bank would review the disbursements before they were made. The memorandum further stated: "Regarding the Adams payment, the company will determine if it has a cash shortfall on Friday after the Crain payment and payroll. The bank will fund that shortfall up to $62,355 in order to pay Adams. If no check to Adams is sent, then the bank will not fund the $62,355."


7
In accordance with the agreement, Superior issued a $62,355 check to Adams on May 27, 1994. When the check was presented to the bank, it was subjected to a "special review" process and then approved by the bank. The bank then advanced to Superior's account the funds necessary to clear the check -in this case, the full amount of the $62, 355 payment -and simultaneously electronically transferred the funds to Adams. Superior issued a second $62,355 check to Adams on July 7, 1994, again in accordance with a budget approved by the bank. The bank again approved the payment and advanced the funds necessary to cover the check. This time, because Superior's General Account already contained $42,439.10, the bank advanced only $19,915.90 -the amount required to fund the shortfall. Counsel for Adams conceded at oral argument that the $42,439.10 paid to Adams out of Superior's existing funds was not subject to the earmarking exception and was therefore voidable as a preference transfer. Remaining at issue in this case, therefore, are the two payments, totaling $82,270.90, advanced by the bank. After these two payments, the bank decided that it would not pay Adams further or authorize Superior to make any more payments to her.


8
In spite of the efforts to save Superior, the company failed. On August 26, 1994, Superior filed an involuntary petition for Chapter 11 bankruptcy. Some time later, an adversary proceeding was filed against Adams by the trustee in an attempt to recover the two payments made to her by Superior, including both the amount for which the bank reimbursed Superior and the amount paid her out of the funds Superior already had on deposit. The trustee sought to recover the payments on the ground that they were voidable preference transfers. In opposition, Adams argued that the bankruptcy doctrine of earmarking immunized the transfers from avoidance.After a trial, the bankruptcy court ruled that the payments to Adams were voidable transfers on the ground that the earmarking doctrine was inapplicable. Adams appealed to the district court, which affirmed the bankruptcy court. Adams then appealed to this court, subsequently limiting her challenge to the amount covered by the bank's advances.

II. DISCUSSION

9
We review the district court's decision on appeal from the bankruptcy court de novo. See Preblich v. Battley, 181 F.3d 1048, 1051 (9th Cir. 1999). Thus, we apply a clearly erroneous standard to the bankruptcy court's findings of fact and review its conclusions of law de novo. See id. The issues we decide here are all matters of law.2


10
Under S 547(b) of the Bankruptcy Code, a trustee may recover certain transfers made by the debtor within 90 days before the bankruptcy petition was filed. A transfer by the debtor constitutes an avoidable preference if six elements are shown: (1) a transfer of an interest of the debtor in property; (2) to or for the benefit of a creditor; (3) for or on account of an antecedent debt; (4) made while the debtor was insolvent; (5) made on or within 90 days before the date of the filing of the petition; and (6) one that enables the creditor to receive more than such creditor would receive in a Chapter 7 liquidation of the estate. See 11 U.S.C. S 547(b); Hansen v. MacDonald Meat Co. (In re Kemp Pacific Fisheries Inc.), 16 F.3d 313, 316 n.6 (9th Cir. 1994); In re Smith, 966 F.2d 1527, 1529 n.1 (7th Cir. 1992). Adams concedes that five of those elements exist and disputes only the bankruptcy court's conclusion as to the first element. That is, Adams argues that the payments by the bank of Superior's checks to Adams were not "transfer[s] of an interest of the debtor in property." 11 U.S.C. S 547(b). In Adams's view, the bank is a third party that transferred its own funds to Adams when it honored the checks despite the shortfall in Superior's account.


11
In order to determine whether property that is transferred belongs to the debtor for purposes of S 547, we apply the "diminution of estate" doctrine. In re Kemp, 16 F.3d at 316 (9th Cir. 1994). Under this doctrine, a transfer of an interest of the debtor in property occurs where the transfer "diminish[es] directly or indirectly the fund to which creditors of the same class can legally resort for the payment of their debts, to such an extent that it is impossible for other creditors of the same class to obtain as great a percentage as the favored one." Id. (quoting 4 Collier on Bankruptcy P 547.03, at 547-26 (15th ed. 1993)); see also id. ("property belongs to the debtor for purposes of S 547 if its transfer will deprive the bankruptcy estate of something which would otherwise be used to satisfy the claims of creditors.")(citation omitted). Adams concedes that, generally, transfers by a debtor of borrowed funds constitute transfers of the debtor's property because the borrowed funds, had they not been transferred, would have been available in bankruptcy to satisfy the claims of other creditors. In re Kemp, 16 F.3d at 316.


12
There is an exception (or perhaps a corollary) to this general rule, however, known as the earmarking doctrine. Adams contends that the portion of the two transfers made to her that was covered by the funds advanced by the bank falls within this exception. The issue before us is whether the earmarking doctrine applies where a debtor requests a loan to pay a particular creditor, and the lender does not pay the creditor directly but advances to the debtor the funds to pay the selected creditor.


13
To determine the proper scope of the earmarking exception, it is appropriate to consider briefly the origins and rationale of the doctrine and its various applications. The earmarking doctrine arose in cases in which a debtor owed money to a creditor (the "old creditor") under circumstances in which another party was a guarantor of the debtor's obligation. See in re Kemp, 16 F.3d at 316 n.2; McCuskey v. National Bank of Waterlook (In re Bohlen Enterprises, Ltd.), 859 F.2d 561, 565 (8th Cir. 1988). Where the guarantor paid to the old creditor the money owed by the debtor (thereby becoming a "new creditor" of the debtor), the courts rejected the claim that such a payment was a voidable preference. Two principal rationales were used to justify the conclusion that no preference transfer had occurred: courts stated (1) that the transfer was of the new creditor's, not the debtor's, property; and (2) that there was no diminution in the debtor's estate because the transaction merely substitutes one creditor for another. See id. at 565.


14
"Where the guarantor, instead of paying the old creditor directly, entrusted the new funds to the debtor with instructions to use them to pay the debtor's obligation to the old creditor, the courts quite logically reached the same result." Id. at 565. Because the substance of this second type of transaction appeared to be identical to the first, courts overlooked the formal distinction that the funds were placed in the debtor's possession before payment to the old creditor. See, e.g., Brown v. First National Bank of Little Rock, 748 F.2d 490,


15
492 n.6 (8th Cir. 1984). In order to preserve the original rationale for the doctrine, courts stated that, although the debtor has possession of the new funds for some period, the funds never become the debtor's property because they are not within the debtor's "control." See In re Bohlen, 859 F.2d at 565. Courts then extended the doctrine "beyond the guarantor situations and . . . applied it to situations where the new creditor is not a guarantor but merely loans funds to the debtor for the purpose of enabling the debtor to pay the old creditor." Id. at 566; see also In re Kemp, 16 F.3d at 316 n.2.


16
Thus, we have held that the earmarking doctrine applies "when a third party lends money to a debtor for the specific purpose of paying a selected creditor." In re Kemp, 16 F.3d at 316 (quoting In re Smith, 966 F.2d at 1533); see also In re Bohlen, 859 F.2d at 566 (holding that the earmarking doctrine requires: "(1) the existence of an agreement between the new lender and the debtor that the new funds will be used to pay a specified antecedent debt; (2) performance of that agreement according to its terms; (3) the transaction viewed as a whole . . . does not result in any diminution of the estate.3") "A key inquiry" in the analysis of whethera third party transfer is voidable is the source of control over the new funds:


17
If the debtor controls the disposition of the funds and designates the creditor to whom the monies will be paid independent of a third party whose funds are being used in . . . payment of the debt, then the payments made by the debtor to the creditor constitute a preferential transfer.


18
In re Kemp, 16 F.3d at 316 (emphasis added)(citation omitted). Here, the bankruptcy court held that the transfer was voidable on the ground that Superior, rather than the bank, "controlled" the borrowed funds. The court reached this conclusion because (1) the bank did not pay Adams directly, and (2) Superior requested the loan in order to pay Adams. These facts do not, however, serve to render the earmarking doctrine inapplicable.


19
The bankruptcy court held that "a debtor has and maintains a property interest in funds advanced to it by its lender, even if the loan advance was intended and/or conditioned on the funds being used to pay . . . a specific creditor." The court suggested that Superior "controlled" the borrowed funds because the advances from the bank were deposited in Superior's account rather than paid directly to Adams by the bank. This gave Superior "control," the court stated, because possession of the funds gave it the power (though not the right) to divert the loan to another use. The bankruptcy court's conclusion contravenes our rule applying the earmarking doctrine to cases in which "a third party lends money to a debtor for the specific purpose of paying a selected creditor. " In re Kemp, 16 F.3d at 316; see also 4 Collier on Bankruptcy, P 547.25 at 547 ("The rule is the same regardless of whether the proceeds of the loan are transferred directly by the lender to the creditor or are paid to the debtor with the understanding that they will be paid to the creditor in satisfaction of his claim, so long as such proceeds are clearly `earmarked.' "). The fact that Superior may have had the power  to divert the loan after it was deposited into Superior's account does not amount to "control" of the funds by Superior. If it did, the earmarking doctrine would have been limited to situations in which the guarantor or other new creditor paid the old creditor directly. For when the funds are first handed-over to the debtor, the debtor will, by virtue of possession, almost always have the power to break the agreement to transfer the funds to the old creditor.


20
Accordingly, the proper inquiry is not whether the funds entered the debtor's account, but whether the debtor had the right to disburse the funds to whomever it wished, or whether their disbursement was limited to a particular old creditor or creditors under the agreement with the new creditor. For example, in In re Kemp, the trustee sought to avoid a transfer made by a bank when it honored the debtor's check despite a negative account balance. We found that the earmarking doctrine did not apply:


21
[The bank] did not exercise the requisite control over the funds or place any limits whatsoever on the parties to whom Kemp Pacific Fisheries could present checks. There is no indication in the record that[the bank] [loaned money to Kemp] because the presenter of the check was MacDonald, or in any way communicated to the debtor that the check would only be honored on the condition that the presenter was MacDonald.


22
In re Kemp, 16 F.3d at 316-17; see also In re Smith, 966 F.2d 1527, 1531 (7th Cir. 1992) (finding that where a bank extends provisional credit to a debtor the debtor has an interest in property because the debtor had the right to disburse the funds without limitation). Where a transfer is made pursuant to an antecedent agreement between the new lender and the debtor that the new funds will be used only to pay a specified creditor, by contrast, the lender rather then the debtor "controls" the funds. See In re Bohlen, 859 F.2d at 566-67.


23
Here, the bank advanced the funds for the specific purpose of paying a specificcreditor, namely Adams. The bank agreed to fund the payments to the extent necessary but only on the express condition that the amounts involved be paid to Adams. Superior was required to obtain written approval before making each payment to Adams by specifically listing the payments on a budget submitted to the bank. Superior's actions were not "independent of" the bank. The bankruptcy court suggests that Superior controlled the funds because it requested the loan, thereby "designating" Adams as the recipient of the payment. However, it is irrelevant whether the debtor or the lender initiates discussions concerning a loan or proposes a particular creditor as the recipient of the funds, so long as the funds are advanced on the condition that they be used to pay that specific creditor. Where there is an agreement between a new lender and the debtor that the funds will be used to pay a specified antecedent debt, a debtor has not exercised control over the funds by "designat[ing ] the creditor to whom the monies will be paid independent of a third party whose funds are being used in . . . in payment of the debt." In re Kemp, 16 F.3d at 316 (citation omitted). Because the bank disbursed the funds pursuant to such an antecedent agreement, Superior did not exercise "control " over the money even though Superior requested the loan to pay Adams and the funds were placed in Superior's account rather than being paid directly to Adams by the bank.


24
In sum, the $82,270.90 in payments made by the bank to fund the checks to Adams falls within the earmarking doctrine. Accordingly, that portion of Superior's payments to Adams did not constitute the "transfer of an interest of the debtor in property" under S 547(b) of the Bankruptcy Code. We hold that the trustee may not avoid the transfers of that amount.

III. CONCLUSION

25
The judgment of the district court is hereby REVERSED. The case is REMANDED to the district court with instructions to remand to the bankruptcy court to enter judgment consistent with this opinion.



Notes:


1
 Honorable William L. Dwyer, Senior U.S. District Judge for the Western District of Washington, sitting by designation.


2
 The district court made a factual finding that "Superior had the power (although not the right) to disburse [the] advanced funds as it saw fit."  Although we question whether Superior actually had such power, in view of the instantaneous nature of the transfers, it is not necessary to determine whether the district court's finding was in error, given the basis on which we decide this case.


3
 This third requirement of the earmarking exception is not met where the amount of the estate available for creditors is diminished even though the funds transferred to the old creditor were not the debtor's property because they were never in the debtor's "control. " Typically, this occurs where the debtor transfers a security interest in property to the new creditor by offering collateral for the loan. In such situations, an unsecured creditor is replaced with a secured creditor, thus diminishing the amount available in bankruptcy for creditors of the same class. See International Ventures, Inc. v. Block Properties VII (In re Int'l Ventures, Inc.), 214 B.R. 590, 595-96 (Bankr. E.D. Ark. 1997). Where a debtor transfers a security interest to the new creditor in return for the loan, the payment is voidable to the extent of the value of the collateral transferred by the debtor. See Glinka v. Bank of Vermont (In re Kelton Motors, Inc.), 97 F.3d 22, 28 (2d Cir. 1996); Mandross v. Peoples Banking Co. (In re Hartley), 825 F.2d 1067, 1071 (6th Cir. 1987); Virginia Nat'l Bank v. Woodson (In re Decker), 329 F.2d 836, 839-40 (4th Cir. 1964). The bankruptcy court found that the bank was at all relevant times an undersecured creditor of Superior. Counsel for Anderson conceded at oral argument that no collateral was advanced by Superior in return for these particular loans, and that with respect to these particular payments the bank had an unsecured claim in bankruptcy and was thus in the same position as other general creditors. Accordingly, Superior did not transfer a property interest to the bank. The question at issue is whether Superior exercised sufficient control of the funds to render the transaction a transfer of its interest in property to Adams.


