# Upgradability

The contract upgrade mechanism is a fundamental feature of the FBTC project, allowing the system to evolve and improve over time without disrupting existing operations. By leveraging proxy contracts and a well-defined upgrade process, FBTC ensures that contract upgrades can be implemented smoothly and securely.

## Upgradability

FBTC achieves on-chain logic through a combination of proxy contracts and implementation contracts:

* **Proxy Contract**: This is the contract with which users and other system components interact. All data is stored in the proxy contract.
* **Implementation Contract**: This contract contains the core logic but does not store any data.

FBTC uses the OpenZeppelin `TransparentUpgradeableProxy` contract to enable contract upgradability. During an upgrade, the proxy contract points to the newly deployed implementation contract without changing the proxy contract's address.

For more details, please refer to:

* [Upgrades via the Proxy Pattern](https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies#upgrading-via-the-proxy-pattern)
* [Transparent Proxies](https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies#transparent-proxies-and-function-clashes)


---

# 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/upgradability.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.
