Money paid into the courts in any county shall, if possible be placed at interest by the clerks thereof, and the interest shall be available for the uses of the commonwealth unless the court directs it to be paid to the parties to the litigation in connection with which such money was paid into court. All interest in the custody of any clerk of said courts not directed to be paid as aforesaid, remaining after payment by order of the court of the principal fund to parties litigant entitled thereto, shall annually be paid to the state treasurer between the first and tenth days of each fiscal year, to be used for the general purposes of the commonwealth.
Mass. Gen. Laws ch. 35, § 23