The appellant or any person in his behalf, instead of filing a bond as provided in the preceding section, may deposit with the clerk, within the time required for filing a bond, a reasonable amount, to be fixed by the clerk or justice, as security for the prosecution of the appeal and the payment of costs. A certificate of such deposit shall be issued to the depositor by the clerk or justice, and the deposit shall be transmitted by him with the papers to the clerk of the superior court, who shall thereupon deliver a receipt therefor to such clerk or justice and shall hold such deposit until the final disposition of the case, when he shall pay it, or any part thereof, to the appellee for his costs, or to the depositor thereof, as the court may order. The superior court may give directions as to the manner of keeping such deposit.
Mass. Gen. Laws ch. 231, § 99