When the defendant recovers judgment, all the money or property held by any writ of attachment shall be delivered to the defendant, subject to the plaintiff's rights on appeal, and the defendant may maintain an action on the plaintiff's bond for the assessed damages sustained by reason of the writ of attachment. Upon the entry of final judgment in favor of the defendant or on satisfaction of a plaintiff's judgment, the clerk of court shall, if real estate was attached, certify the fact of such judgment or satisfaction, and on filing such certificate with the recorder in any county in which attached lands are situated, such recorder shall enter such certificate upon the records of the recorder's office in discharge of such attachments.
N.D.C.C. § 32-08.1-20