Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 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 function is overridden to restrict access to an address set to the DEVOPS_ROLE. The DEVOPS_ROLE is reserved for the most sensitive Protocol admin actions (including upgrades) and is held only by the OwnerlessSafe. Actions reach the OwnerlessSafe through a 24-hour timelock, during which Term multisig holders and TERM token holders can veto them and a pause can halt execution. The architecture is detailed below.

The configuration on this page is for Ethereum mainnet. It has been formally verified with the Certora Prover and checked against on-chain state. See Formal verification. For chains other than Ethereum, see Other chains.

DEVOPS_ROLE Governance Architecture

DEVOPS_ROLE governance on Ethereum mainnet: execute, veto and pause paths
DEVOPS_ROLE transactions pass through a 24-hour timelock that TERM token holders and Term multisig holders can veto, and that can be paused

Execute path

  1. The DevOps-Proposer Safe (5/11) queues a transaction on the Zodiac Delay Modifier. It is the Delay Modifier's only module, so it is the only account that can queue.

  2. The transaction waits through a 24-hour cooldown, during which it can be vetoed or paused.

  3. Once the cooldown has passed, anyone can execute the transaction during the following 24-hour window (between 24 and 48 hours after it was queued). After that it expires and must be queued again.

  4. The Delay Modifier executes the transaction through the OwnerlessSafe, the only holder of DEVOPS_ROLE, which calls the protocol contract.

The OwnerlessSafe's own signers can also act directly, without the delay, but only with all 9 of 9 signatures.

Veto path

Vetoes cancel queued transactions by advancing the Delay Modifier's transaction nonce (setTxNonce). Only the Delay Modifier's owner, the DelayOwnerSafe (5/11), can do this. A veto can only cancel transactions; it cannot create one.

There are two ways to veto:

  • Term multisig holders sign a setTxNonce transaction on the DelayOwnerSafe. The DelayOwnerSafe has the same 11 signers as the DevOps-Proposer Safe.

  • TERM token holders pass a vote on the TERM Governor. The Governor acts through a Zodiac Roles Modifier that is a module of the DelayOwnerSafe. The Roles Modifier has no owner, and its single permission lets the Governor call only setTxNonce on the Delay Modifier. A SetTxNonceGuard on the Roles Modifier enforces the same restriction.

TERM Governor setting
Value

Voting token

Voting delay

0 (voting opens as soon as a proposal is created)

Voting period

22 hours

Proposal threshold

1,000 TERM

Quorum

1% of total supply (1,000,000 TERM), counting For and Abstain votes

Timelock

None

Because the voting period (22 hours) is shorter than the Delay Modifier's cooldown (24 hours), a veto proposal created shortly after a transaction is queued can pass before that transaction becomes executable.

Pause path

A PauseGuard is installed as the Delay Modifier's guard. While it is paused, no queued transaction can be executed. A transaction that expires while paused must be queued again.

PauseGuard role
Holder
Permissions

Pauser

Pause

ADMIN_ROLE

Unpause, change the Pauser

DEFAULT_ADMIN_ROLE

None (address(0))

Nobody can grant or revoke ADMIN_ROLE

Like a veto, a pause can stop a queued transaction but cannot create one.

Configuration locks

The setup is protected against reconfiguration:

  • A ConfigLockGuard is installed on the DevOps-Proposer Safe, the OwnerlessSafe and the DelayOwnerSafe. On transactions signed by a Safe's owners, the Safe cannot change its own guard, modules or fallback handler, or make a delegate call. On the DelayOwnerSafe it also locks the Delay Modifier's owner, modules, guard and target.

  • The Roles Modifier's owner is address(0), so its configuration, including the Governor's single permission, can never change.

  • The Governor has no timelock, and its voting token, proposal threshold, voting threshold and quorum cannot be changed.

What
Who can change it

Signers of the DevOps-Proposer Safe

DevOps-Proposer Safe signers

Signers of the DelayOwnerSafe

DelayOwnerSafe signers

Signers of the OwnerlessSafe

OwnerlessSafe signers (9/9), or the DevOps-Proposer Safe through the execute path

Guard, modules and fallback handler of the OwnerlessSafe

The DevOps-Proposer Safe, only through the execute path (timelocked, vetoable and pausable)

Delay Modifier cooldown and expiration

DelayOwnerSafe signers

Guard, modules and fallback handler of the DevOps-Proposer Safe and DelayOwnerSafe

Nobody

Delay Modifier owner, target, modules and guard

Nobody

Roles Modifier configuration

Nobody

Governor voting token, proposal threshold, voting threshold and quorum

Nobody

Formal verification

The properties on this page are established in the Governance Configuration Proof (PDF), which combines two kinds of evidence:

  • Formal verification with the Certora Prover shows that, given the stated configuration, the Safes, modifiers, guards and Governor enforce these properties, including that there are no other execution paths. The specs are in packages/evm/certora.

  • On-chain reads at stated mainnet blocks show that the deployed contracts have that configuration.

The proof concludes:

  1. Only Term multisig holders on the DevOps-Proposer Safe and on the OwnerlessSafe can execute DEVOPS_ROLE methods, provided the call is not vetoed.

  2. Only TERM token holders and Term multisig holders can veto Delay Modifier transactions.

  3. The Roles Modifier's configuration and the Governor's voting token, proposal threshold, voting threshold and quorum cannot be changed by anyone.

  4. The remaining settings can be changed only by Term multisig holders, as listed in the table above.

If Ethereum's DEVOPS_ROLE governance is redeployed, it will use the 2.1.0 contracts, and the proof for this page will be the Governance with TERM Token Veto Configuration Proof (PDF). That proof covers the 2.1.0 contracts, which would replace the ones listed on this page, in the same design, including the TERM token veto. The 2.1.0 contracts also lock the Delay Modifier's cooldown and expiration, and fix the PauseGuard's admin to the DevOps-Proposer Safe. Until such a redeployment, the Governance Configuration Proof above is the one that matches the chain.

Contract addresses (Ethereum)

Contract
Address
Configuration

OwnerlessSafe

Safe v1.3.0, 9 of 9 · holds DEVOPS_ROLE · module: Delay Modifier · guard: ConfigLockGuard

DevOps-Proposer Safe

Safe v1.3.0, 5 of 11 · no modules · guard: ConfigLockGuard

DelayOwnerSafe

Safe v1.4.1, 5 of 11 · module: Roles Modifier · guard: ConfigLockGuard

Admin Gnosis Safe

Safe v1.3.0, 4 of 10 · PauseGuard ADMIN_ROLE

PauseSafe

Safe v1.4.1, 2 of 9 · PauseGuard Pauser

Delay Modifier

24h cooldown, 24h expiration · owner: DelayOwnerSafe · module: DevOps-Proposer Safe · target: OwnerlessSafe · guard: PauseGuard

Roles Modifier

Owner: address(0) · module: Governor · target: DelayOwnerSafe · guard: SetTxNonceGuard

PauseGuard

Guard on the Delay Modifier

ConfigLockGuard

Guard on the OwnerlessSafe, DevOps-Proposer Safe and DelayOwnerSafe

SetTxNonceGuard

Guard on the Roles Modifier

TERM Governor

See the Governor settings above

TERM token

Governor voting token

Other chains

Chains other than Ethereum have no TERM token, so their DEVOPS_ROLE governance has no token veto. The Governance without TERM Token Veto Configuration Proof (PDF) is the proof for the governance setup these chains will have: each chain's existing DevOps-Proposer and Ownerless Safes with the 2.1.0 guards, a new DelayOwnerSafe and a new PauseSafe.

Last updated