# Custody

Custody management is a critical component of the FBTC protocol, designed to ensure the security and integrity of assets within the ecosystem. The protocol employs several mechanisms to handle custody-related tasks, such as asset rescue, emergency burns, and regular BTC custody operations. These measures provide robust protection for user assets and ensure the system can respond effectively to unforeseen issues or security threats.

## Regular BTC Custody

In non-emergency situations, the custody of BTC within the FBTC protocol is managed through a combination of on-chain and off-chain mechanisms. This ensures that BTC assets are securely stored and efficiently managed, supporting the minting and burning of FBTC tokens. More details [here](https://docs.fbtc.com/system-components/architecture).

## Rescue

The rescue functionality is integrated into the `Governable` contract and allows the contract owner to recover assets that are accidentally sent to the contract or otherwise become inaccessible. This feature ensures that user funds are not permanently lost due to operational errors or unforeseen circumstances.

**Workflow**:

1. **Identify Locked Assets**: The owner identifies assets that need to be rescued.
2. **Execute Rescue**: The owner calls the `rescue` function with the appropriate token address and recipient address.
3. **Transfer Assets**: The specified assets are transferred to the recipient address.

## Emergency Burn

The emergency burn functionality is designed to protect the system during critical situations by allowing authorized roles to burn tokens and prevent potential exploitation. This mechanism is typically integrated into the `FBTC1` contract, which can only be called by Safety Committee.

**Workflow**:

1. **Identify Threat**: The Safety Committee identifies a security threat that requires an emergency response.
2. **Execute Emergency Burn**: The committee calls the `emergencyBurn` function with the address and amount of tokens to be burned.
3. **Burn Tokens**: The specified tokens are burned, mitigating the identified threat.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fbtc.com/security/risk-management/custody.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
