> For the complete documentation index, see [llms.txt](https://docs.fbtc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fbtc.com/security/risk-management/upgradability.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
