How It works
Each vault within the DUCAT protocol includes a liquidation path as a spending script, which is locked using the hash from a price quote. The vault also records the quoted exchange price, threshold price, and timestamp in the vault return data field.
When a liquidator is interested in a vault, they use the return data to request a copy of the quote from the price oracle. The oracle checks whether the exchange price has crossed the threshold price, starting from the timestamp of the quote. If the threshold has been crossed, the oracle returns the secret key along with the price quote. Otherwise, the key remains secret and is returned as null.
Using the secret key, the liquidator can spend the underwater vault into their own vault, which must contain enough capital to re-collateralise the debt. This transaction is verified and co-signed by the guardian nodes before being broadcast to the network.
Protocol Flows
Vault Action
Vault User wants to perform an action on their vault. The user calculates the threshold price for their updated vault, then requests a price quote from an oracle.
Oracle receives a request for the latest BTC/USD exchange price and returns a signed price quote, including the requested threshold price and key hash.
Vault User constructs a vault update transaction using the data from the price quote. They also prepare a request to update the vault and send this information to a guardian, along with the price quote.
Guardian verifies the update terms, price quote, and transaction. If everything checks out, the guardian co-signs the transaction and broadcasts it to the network.
Vault Liquidation
Liquidator wants to liquidate a vault that has fallen below the threshold price. The liquidator uses the data in the vault to request the corresponding historical quote from the oracle.
Oracle receives the request and checks whether the exchange price has surpassed the threshold price. If it has, the oracle returns the secret key along with the original quote.
Liquidator constructs a vault liquidation transaction using the secret key and sends this to a guardian along with the price quote.
Guardian verifies the liquidation terms, price quote, and transaction. If valid, the guardian co-signs and broadcasts the transaction to the network.
Last updated
Was this helpful?