By the Court,
Mullin, P. J.Had the plaintiffs treated the .bond as a promise by the defendants to Roberts to pay their debt, and brought the action on that promise, it is possible they could have recovered the amqunt due, without any deduction on account of the note. (Lawrence v. Fox, 20 N. Y. 268.) But, having sued as assignees of the bond, the plaintiffs can only recover whatever was justly due thereon after *585deducting all sums that were allowable against the assignors.
The defendants are jointly and severally liable on the bond. In an action against both obligors, a separate judgment may be entered for or against either of them, and hence the amount due from Roberts on the note was a defence, pro tanto, in favor of Nichols, against the plaintiffs. (Code, §§120, 274.)
The note is neither a set-off, nor a counter claim against the claim of the plaintiffs. It is not a set-off, because it is not a demand existing against the plaintiffs, nor is it due to all the defendants jointly. (2 Stat. at Large, 365, § 18, subd. 6, 7.)
It is not a counter claim as defined by §§ 149, 150 of the Code, because it is not one existing in favor of the defendants and against the plaintiffs. (McIlvaine v. Egerton, 2 Rob. 422, and cases cited.)
The note is available to the defendants only as an equitable defence to the action on the bond, on the principle that the plaintiff took the bond subject to all the equities existing in favor of the obligors. And that equity is, to be allowed, as payment thereon, all sums justly due to them by the plaintiffs’ assignor, at the time of the assignment. (Buck v. Lathrop, 22 N. Y. 535, 489.)
The evidence is that the note was due at the time the bond was given. It would seem to follow that the referee was right in deducting from the amount due on the bond the balance due on Roberts’ note.
It is well settled that when a surety is provided by his principal with a fund, or with collateral security, for the debt for which he has become bound, the creditor is in equity entitled to have it applied to the satisfaction of his debt. (Pratt v. Adams, 7 Paige, 615.)
The plaintiffs would seem to have an ample remedy for the collection of their debt without recourse to the bond. But they have not seen fit to resort to it, but to an action on the bond ; and so long as they stand upon that, *586they must be satisfied to rest under the responsibilities of their assignor.
[Fourth Department, General Term, at Rochester, April 1, 1873.The judgment must be affirmed, (a)
Mullin, Talcott and E. D. Smith, Justices.]
Affirmed by Court of Appeals. (See 55 N. Y. 270.)