# Upgradeability

Smart contract code can't be modified after being deployed to the blockchain. In order to facilitate potential upgrades, bug fixes or security updates, Term Finance smart contracts adopt OpenZeppelin's implementation of the [UUPS Proxy Pattern](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) to facilitate necessary updates, with the intent to gradually remove upgradeability altogether over time.

Consistent with OpenZeppelin's recommendation for smart contracts that adopt the UUPS proxy pattern, the [\_authorizeUpgrade](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable-_authorizeUpgrade-address-) function is overridden to restrict access to an address set to the DEVOPS\_ROLE. The Protocol assigns the DEVOPS\_ROLE to an "ownerless" Gnosis Safe with a 24-hour timelock restriction and invalidator controls to override unintentional or malicious upgrades. More details on the architecture is detailed below.

### DEVOPS\_ROLE Contract Architecture

The DEVOPS\_ROLE is reserved for the most sensitive Protocol admin actions (including upgrades) and is assigned to the DevOps "Ownerless" Safe. Transactions through the DevOps "Ownerless" Safe can only be executed via the Zodiac Delay Modifier. Specifically, the [DevOps-Proposer Gnosis Safe (5/9)](https://app.safe.global/home?safe=eth:0xd5E12854A3Dba99deF295A7635D3Ba16427d2A28) may initiate actions via the Zodiac Delay Modifier that imposes a 24-hour time-lock with a 24-hour expiration period. The [DevOps-Proposer Gnosis Safe (5/9)](https://app.safe.global/home?safe=eth:0xd5E12854A3Dba99deF295A7635D3Ba16427d2A28) is also able to invalidate any malicious or unintended transactions pending in queue during the 24-hour time-lock period.

<figure><img src="/files/MDZ3G6TY7WBHYWpSfhXu" alt=""><figcaption><p>DEVOPS_ROLE transactions secured by 24-hour timelock with the ability to invalidate any transactions as a fail-safe</p></figcaption></figure>


---

# 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://developers.term.finance/access-controls/further-details.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.
