> ## Documentation Index
> Fetch the complete documentation index at: https://docs.range.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart Contract and Program Security

> Alert rules for program and proxy contract upgrades, program authority and contract ownership changes, proxy admin changes, and pause or unpause events.

The control surface of a protocol is its code and the keys that can change it. These
rules alert you the moment a monitored program or contract is upgraded, has its
authority or ownership changed, or is paused, the events most associated with
takeovers and rug-pulls.

## Summary

| Rule | Account types | Status |
| - | - | - |
| Program Upgrade | Program | 🟢 Active |
| Program Authority Change | Program (upgradeable) | 🟢 Active |
| Proxy Upgrade Monitor | Upgradeable proxy contracts | 🟢 Active |
| Proxy Admin Changed | Upgradeable proxy contracts | 🟢 Active |
| Contract Ownership Transfer | Ownable contracts | 🟢 Active |
| Contract Pause / Unpause | Pausable / token contracts | 🟢 Active |
| Program and token lifecycle | Program / token | ⚪ Deprecated |

## Rules

<AccordionGroup>
  <Accordion title="🟢 Program Upgrade">
    **Detects.** A monitored program's onchain code is upgraded.

    | | |
    | - | - |
    | **Trigger** | A program is upgraded (or deployed). One rule can monitor multiple programs. |
    | **Account types** | Program |
    | **Status** | Active |
  </Accordion>

  <Accordion title="🟢 Program Authority Change">
    **Detects.** A program's upgrade authority is changed or removed.

    | | |
    | - | - |
    | **Trigger** | The authority of a monitored program is reassigned to a new key or removed entirely. |
    | **Account types** | Program (upgradeable) |
    | **Status** | Active |
  </Accordion>

  <Accordion title="🟢 Proxy Upgrade Monitor">
    **Detects.** A monitored upgradeable proxy swaps its implementation to a new
    address.

    | | |
    | - | - |
    | **Trigger** | An ERC-1967 proxy upgrade event; the proxy points to new implementation code. |
    | **Account types** | ERC-1967 upgradeable proxy contracts |
    | **Status** | Active |
  </Accordion>

  <Accordion title="🟢 Proxy Admin Changed">
    **Detects.** The admin that controls upgrading a proxy is changed.

    | | |
    | - | - |
    | **Trigger** | An ERC-1967 proxy admin change; whoever can upgrade the implementation is now a different account. |
    | **Account types** | ERC-1967 upgradeable proxy contracts |
    | **Status** | Active |
  </Accordion>

  <Accordion title="🟢 Contract Ownership Transfer">
    **Detects.** A contract's owner changes, or ownership is permanently renounced.

    | | |
    | - | - |
    | **Trigger** | An OpenZeppelin Ownable ownership transfer; renunciation (transfer to the zero address) is flagged as the most serious case. |
    | **Account types** | OpenZeppelin Ownable contracts |
    | **Status** | Active |
  </Accordion>

  <Accordion title="🟢 Contract Pause / Unpause">
    **Detects.** A contract is paused (frozen) or unpaused (re-enabled).

    | | |
    | - | - |
    | **Trigger** | A pause or unpause event, supporting both OpenZeppelin Pausable and stablecoin-style pause events. |
    | **Account types** | OZ Pausable / token contracts |
    | **Status** | Active |
  </Accordion>
</AccordionGroup>

## Deprecated

<AccordionGroup>
  <Accordion title="⚪ Deprecated rules (migration context)">
    Retired from a previous runner, kept for completeness:

    * **New Program Deployed**: a new program is deployed.
    * **Program Account Closed**: a program account is closed.
    * **Program Interaction**: a program instruction is executed.
    * **Program Error**: a program error occurs.
    * **SPL Token Authority Change**: an SPL token authority is changed.
    * **Attestation Service New Accounts**: new attestation accounts are created.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.