Whenever a writ shall command the attachment of the shares of the defendant in any corporation, or of his or her personal estate in the hands or possession of any person, co-partnership or corporation, as trustee, the defendant may, at any time after the service of the writ upon the trustee, and before final judgment or decree, deliver to the officer who served the writ a bond, in the penal sum of the amount of damages stated in the writ, signed by the defendant or someone in his or her behalf, with surety or sureties to the satisfaction of the officer, with a condition in the surety that the surety shall be null and void if the final judgment or decree, in the action or cause in which the writ was served, shall be immediately paid and satisfied after the rendition of the final judgment or decree.
R.I. Gen. Laws § 10-5-22