Opinion by
Mr. Chief Justice Kephart,In 1927 the 58th & Chester Avenue Building and Loan Association borrowed a sum of money from the predecessor of the Integrity Trust Company on a note. It was also a depositor in that bank. The same association was indebted on a judgment to Helen'- Duffy. In April, 1934, an attachment execution was issued by her and served on the bank to garnish the funds of the association in its possession. The bank promptly appropriated the deposit on hand to its note. A month later it received bonds from the Home Owners Loan Corporation (hereinafter referred to as H. O. L. C.) for the building and loan association. The bank sold these bonds and appropriated the proceeds to further reduce the association’s indebtedness on the note.
By case stated, the garnishee and the attaching creditor proceeded in the court below to determine their rights. Each of the funds was claimed by both parties. The court below awarded both funds to the garnishee. On appeal to the Superior Court that judgment was affirmed, three of the judges dissenting as to the proceeds of the H. O. L. C. bonds.
Several questions are here presented. Chief of these is the effect of the note given by the association to se*130cure its loan. Appellant, the attaching creditor, contends that the bank could not appropriate the funds or assets of a building and loan association to the payment of a note; that the note given to the bank cannot be construed to authorize or warrant the appropriation of the funds on deposit or the bonds or the proceeds thereof, which subsequently came into its possession; and, that the association was prohibited by law from making any contract with the bank that affected the integrity of its deposits.
The note was for an amount in excess of both the deposit and the value of the bonds; it contained a provision whereby the holder was given a “lien upon any and all funds, stocks, bonds, notes and other property at any time in the hands of said holder belonging to the maker ... as security for this note and for any and all liability or liabilities matured or unmatured of such maker ... to said holder.”
There can be no question of the right of the bank to appropriate the deposit on hand when the attachment was served to the association’s debt, regardless of the lien provision in the note. Under Section 22 of the Act of June 16, 1836, P. L. 755, a bank deposit or debt may be attached, subject, however, to the right of the bank to set-off any lawful claim against the judgment debtor. Our Brother Linn in Aarons v. Public Service B. & L. Assn., 318 Pa. 113, has so clearly set forth the law in relation to this matter that nothing further need be said except to apply the principles there outlined. Here when the writ was served there was a sum of money in the bank. There was also a debt owing to the bank by the depositor. As pointed out in that case, the bank could then or at any time exercise its right of set-off, because the note was a demand note, due without formal request for payment. The bank’s claim against the debtor was much larger than the latter’s deposit. It left nothing belonging to the debtor and the attaching creditor got nothing but its right. The bank *131was not required to make book entries charging one account and crediting the other before asserting its right to priority. The Defalcation Act has been in force for more than 200 years, since 1705. The effect of this statute and of the doctrine of set-off is to extinguish by operation of law all but the balance due between the debtor and creditor. It is therefore clear in the present case that the association’s deposit of $656.41, was overcome by the larger debt of $2,094.21 owed to the bank. See Bergman B. & L. Assn. v. Blaul, 318 Pa. 126.
The question as to the money received from the sale of the H. O. L. C. bonds that came into the possession of the garnishee after the attachment had been served, presents the problem of an attaching creditor’s right to after-acquired property as against the holder of a note which provides for a lien on future property coming into the hands of the garnishee.
It is urged the bank’s right of set-off extends to such property. But there is a stronger reason for holding the H. O. L. C. bonds subject to the claim of the bank. The contract with the bank, quoted above, which is contained in the note, gives a lien on all property of the debtor at any time in the hands of the holder of said note. To sustain her claim, the attaching creditor must concede that these bonds belonged to the debtor, and since they were in the possession of the garnishee subject to the express provision of this contract as to future property, this defeats any right on her part.
Where a note is given with a provision that it shall be a lien upon any property then or thereafter in the possession of the holder, such note gives the holder the right to appropriate all such property to the indebtedness. This contract gives a higher right to the possessor or holder than the latter would have by set-off under the Defalcation Act. The reason that such provision must be given its intended effect is that it is as much a part of the consideration moving to the lender of money as is the provision for interest. It is just as important. *132It was partly upon the basis of such additional pledge of security that the money was loaned. Its effect is to create a claim against deposits and property dating from the time the contract was made and reaching into the future, so long as it is alive, to cover property coming into the possession of the holder. It is very much like a mortgage for future advances.
The conclusion here reached is analogous to the law relating to the subjection of after-acquired property to the lien of a mortgage covering such property. These mortgages have been recognized as effective to create a lien upon all property within the classes contemplated by the parties, when it comes into the possession of the mortgagor: Philadelphia, Wilm., & Balt. R. R. Co. v. Woelpper, 64 Pa. 366; Colonial Trust Co. v. Harmon Creek Co., 287 Pa. 284. The first of these cases is very close to the instant case. The court there said: “It is a plain corollary from these principles that a court of equity will treat a mortgage of property to be subsequently acquired, whether it be real or personal, as a binding contract, which attaches to the thing when acquired.” It cannot be doubted that the reasoning advanced in that opinion applies with equal force to pledges, particularly since some of the property embraced in the mortgage in that case included chattels. To the same effect see Bachrach v. Huntingdon & Broad Top Mtn. R. R. & Coal Co., 286 Pa. 325. When this note was given, the appellee acquired its lien upon all property of the association then in its hands with the right to subject subsequently acquired property to that lien. This lien antedated appellant’s attachment lien.
Appellant contends, however, that inasmuch as she is a judgment creditor, although junior in point of time to the collateral note, she may assert the debtor association’s right to contest the validity of a provision such as this. She claims that it is ultra vires and unlawful, citing as her authority Section 1 of the Act of June 25, 1895, P. L. 303. This act outlines the procedure neces*133sary to borrow money for a specific purpose. It provides that when a series of stock has matured or when applications for loans shall exceed the accumulations in the treasury, an association may make temporary loans to meet such demands and, to secure their payment, it may give interest-bearing orders, notes or bonds as collateral. Such loans are to be repaid out of accumulations in the treasury. Manifestly this is not, and never was intended as, a general limitation on the borrowing power of building and loan associations. When money is borrowed for the specific purposes mentioned in the Act, such borrowings are governed by this provision, but there is not a single line in the case stated to show that this note was given to the Integrity Trust Company for advances made for the purpose of retiring matured stock or making loans to stockholders. In. this aspect the Act of 1895 does not control the case. It may be stated here that:even if the act did control, what the association did was to give a note, and the phrase in the section cited: “. . . secure the payment by interest bearing order, note or bond” is broad enough to embrace the note here given, together with its provision as to collateral and future assets coming into its hands. If the section did apply, the provision for payment out of “accumulations” in the treasury is merely a direction to the association, and, as pointed out by the Superior Court, it nowhere appears that the funds that have been applied to the payment of this debt were not such accumulations.
Even if this agreement itself were ultra vires, it is not void. Where one of the parties has obtained benefits under an agreement it will be estopped to raise the question of ultra vires to excuse its failure to perform reciprocal obligations. See Boyd v. American Carbon Black Co., 182 Pa. 206; Manhattan Hardware Co. v. Phalen, 128 Pa. 110; Ballantine, Private Corporations (1927) 261; Sundheim, Building & Loan Associations (3rd ed. 1933) 189-190. The association here would be unable to deny its own authority to execute the agreement and *134the rights of the appellant can rise no higher. She is an attaching creditor and is an equitable assignee of the judgment debtor’s interest in the matter in controversy. She takes that interest subject to any equity existing in favor of the garnishee or intervening third parties. See Aarons v. Public Service B. & L. Assn., supra; Austin-Nichols Co. v. Union Trust Co., 289 Pa. 341; Knight v. Red Ball Transit Company, 306 Pa. 371; Roig v. Tim, 103 Pa. 115; Bennett v. Campbell, 189 Pa. 647. The agreement was not a fraud upon creditors.
It is undoubtedly true that in Frazier v. Berg, 306 Pa. 317, we stated that an attachment execution bound future deposits coming into the possession of the garnishee bank up to the time of trial. There was no debtor-creditor relation, presently existing, clearly established in that case between the judgment debtor and garnishee. If the garnishee has a pre-existing claim against the judgment debtor, and receives money after the attachment is served, of course he can apply the later-acquired funds to the debt owed to him. If it were held otherwise, a garnishee could not receive the payment of his debt, until the attaching creditor was paid. If such were the law the attachment would have the effect of destroying the garnishee’s rights under his contract and operate to interfere with the relations between the parties existing at the time the attachment was served. It. would be impossible for the defendant who owed money to a garnishee to pay his obligation to that creditor so long as there was an attachment execution outstanding. No such debt status is irrevocably fixed by the service of a writ of attachment. The garnishee’s rights are not insulated after service of the writ. On the contrary, it is clear that if the defendant is indebted to the garnishee, funds of the judgment debtor thereafter coming into the possession of the garnishee in satisfaction of that obligation are not covered by or included within the scope of the attachment execution.
*135As we stated above, tbe attaching creditor is the equitable assignee of the debtor. He has no rights greater than those of the judgment debtor in relation to the garnishee. The garnishee here had under the contract a valid and enforceable lien against property acquired in the future. It was prior in time and superior in quality to any rights whatever of the attaching creditor. It must necessarily follow then, admitting that the bonds coming into the possession of the bank could be subjected to it, that the rights of the respective parties in the fund representing the proceeds of those bonds can be no greater or no less than the rights in the property which was liquidated to create it. These bonds were subject to the garnishee’s claim under its contract and the judgment debtor had no rights in them or their proceeds whatever; neither had his attaching creditor.
Judgment affirmed.