legal ground
Article 386 of the Civil Code: If the debtor fails to perform the due debt or the parties agree to realize the security interest, the security interest holder shall enjoy the right of priority in compensation for the secured property according to law, unless otherwise stipulated by law. Article 387 Where a creditor needs security in order to ensure the realization of his creditor's rights in civil activities such as lending, buying and selling, he may establish a security interest in accordance with the provisions of this Law and other laws. If a third party provides a guarantee for the debtor to the creditor, it may require the debtor to provide a counter-guarantee. The provisions of this law and other laws shall apply to counter-guarantee.