# Upgrades and roles

Who can change Maxy's contracts, through which delay, and with how many signers. It is for security reviewers who check governance on chain. What each contract enforces: [Contract architecture](https://maxy.co/docs/contract-architecture).

Every address and role holder on this page was read on chain. The commands under each table read them again on any public RPC.

## Timelocks

No one can replace the settler's code in a hurry. Every upgrade passes through a 48-hour timelock on all five chains, so partners and users always have two days to review a change before it can take effect. Pausing the settler never blocks a cancel, a slash or a refund, so no escrow can be trapped.

Each settler is an EIP-1967 transparent proxy. Its admin is a ProxyAdmin contract owned by an OpenZeppelin `TimelockController`, so an upgrade must be scheduled on the timelock and runs only after the timelock's delay. Anyone may execute a scheduled operation once the delay has passed.

| Chain | Timelock | ProxyAdmin | `getMinDelay()` |
| --- | --- | --- | --- |
| Base | `0xc2779e2E262acC362662716E7eFEF817508f0243` | `0x87a845621eed6ade7fa61d6de559b85976449c63` | 172800 (48 hours) |
| Arbitrum | `0x76cA52dfC033034b11c64BF246BD02Bca3df5528` | `0x565497e73c1fffc00fa3e2e57de7c7ae1517331f` | 172800 (48 hours) |
| Robinhood Chain | `0x76cA52dfC033034b11c64BF246BD02Bca3df5528` | `0x565497e73c1fffc00fa3e2e57de7c7ae1517331f` | 172800 (48 hours) |
| BNB Chain | `0x402D5b4bEEA3Bb9e656C5E27D268d0B7C356Dcf8` | `0x8cc7fc6bedee5cd58837e36ca20ea1a078419a50` | 172800 (48 hours) |
| Avalanche | `0x402D5b4bEEA3Bb9e656C5E27D268d0B7C356Dcf8` | `0x8cc7fc6bedee5cd58837e36ca20ea1a078419a50` | 172800 (48 hours) |

Check a timelock's delay in one line, or start from the settler, on any chain:

```sh
cast call $TIMELOCK "getMinDelay()(uint256)" --rpc-url $RPC

ADMIN_SLOT=0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103
PA=0x$(cast storage $SETTLER $ADMIN_SLOT --rpc-url $RPC | cut -c27-)
TL=$(cast call $PA "owner()(address)" --rpc-url $RPC)
cast call $TL "getMinDelay()(uint256)" --rpc-url $RPC
```

`PA` is the ProxyAdmin and `TL` the timelock. Each `getMinDelay` prints the delay in seconds: 172800 is 48 hours.

## Roles

Every privileged role on Maxy's contracts is held by a multisig or by the timelock. No single key can replace a contract's code or change what a payment proof must show, and no one can move an escrow outside its four exits. Pausing stops new escrows and commits, and never blocks a cancel, a settlement, a slash or a refund.

The timelock owns the settler's ProxyAdmin and holds the admin role of the settler, the verifier (its minimum confirmations and one-time checkpoint), the Bitcoin output registry and the price oracle. Each chain's governance Safe proposes and can cancel timelock operations, and holds the settler's governance and pauser roles, the verifier's fee admin role, the oracle admin role and the registry's pauser role. What each admin function does: [Contracts](https://maxy.co/docs/contracts#admin-functions).

| Chain | Timelock | Type | Governance | Type |
| --- | --- | --- | --- | --- |
| Base | `0xc2779e2E262acC362662716E7eFEF817508f0243` | Timelock | `0x35a17b79c60812f84ec69371c7ff3843d72116e1` | Safe multisig |
| Arbitrum | `0x76cA52dfC033034b11c64BF246BD02Bca3df5528` | Timelock | `0xe4a257c5e1ec4257118016603a37ee7b36ba7b2f` | Safe multisig |
| Robinhood Chain | `0x76cA52dfC033034b11c64BF246BD02Bca3df5528` | Timelock | `0x8beb454ea0e70735e119e3519943cca7518037dd` | Safe multisig |
| BNB Chain | `0x402D5b4bEEA3Bb9e656C5E27D268d0B7C356Dcf8` | Timelock | `0xab7bc050910492b0363512a1d0351005d310de2f` | Safe multisig |
| Avalanche | `0x402D5b4bEEA3Bb9e656C5E27D268d0B7C356Dcf8` | Timelock | `0x526d99c9e2d25df232a306d531054f4c5faeab8c` | Safe multisig |

Check a Safe's signers and threshold, and who holds a role, with any public RPC:

```sh
cast call $SAFE "getThreshold()(uint256)" --rpc-url $RPC
cast call $SAFE "getOwners()(address[])" --rpc-url $RPC
cast call $SETTLER "hasRole(bytes32,address)(bool)" $(cast keccak "PAUSER_ROLE") $SAFE --rpc-url $RPC
```

## Solana

The Solana settlement program cannot be changed. Its upgrade authority has been revoked, which makes the deployed code immutable: the code that was reviewed is the code that runs. The remaining governance roles are held by three multisigs, so no single key can change a setting.

---
Source: https://maxy.co/docs/upgrades-and-roles (Maxy Docs › Maxy architecture › Smart contracts)
