Mass. Gen. Laws ch. 106, § 9-615
(a) Application of proceeds. A secured party shall apply or pay over for application the cash proceeds of disposition under Section 9–610 in the following order to:
(3) the satisfaction of obligations secured by any subordinate security interest in or other subordinate lien on the collateral if:
(d) Surplus or deficiency if obligation secured. If the security interest under which a disposition is made secures payment or performance of an obligation, after making the payments and applications required by subsection (a) and permitted by subsection (c):
(e) No surplus or deficiency in sales of certain rights to payment. If the underlying transaction is a sale of accounts, chattel paper, payment intangibles, or promissory notes:
(f) Calculation of surplus or deficiency in disposition to person related to secured party. The surplus or deficiency following a disposition is calculated based on the amount of proceeds that would have been realized in a disposition complying with this part to a transferee other than the secured party, a person related to the secured party, or a secondary obligor if:
(g) Cash proceeds received by junior secured party. A secured party that receives cash proceeds of a disposition in good faith and without knowledge that the receipt violates the rights of the holder of a security interest or other lien that is not subordinate to the security interest or agricultural lien under which the disposition is made: