Repaying UNIT
Last updated
Was this helpful?
Last updated
Was this helpful?
In a two-transaction process, the user returns some of their borrowed UNIT stablecoins to their vault. This lower debt lowers the Bitcoin price at which liquidation would be triggered (further from the current price), giving the user a greater margin of safety. The user initiates a transaction to repay their borrowed UNIT runes, sending these back to their vault UTXO along with the transaction. The MPC Network verifies the repayment amount and processes the return of UNIT runes. The transaction builder constructs a PSBT that reduces the vault's borrowed amount while maintaining the same BTC collateral. The output reflects the reduced debt and unchanged collateral position in an updated vault UTXO. In a second transaction, the new vault state is processed, handling the network fees for both transactions to ensure atomicity. This generates an updated vault token reflecting the reduced borrowed amount and improved collateralization ratio. The vault UTXO maintains both the user update path and guardian/oracle liquidation path, though with the improved collateral ratio reducing liquidation risk. An OP_RETURN output records the new vault state with the reduced borrowed amount and updated collateral ratio.
Both these processes work in concert with the Open Vault function to provide a complete vault management system, allowing users to borrow against, repay, and maintain their BTC-collateralized positions while ensuring proper record-keeping and safety mechanisms throughout.