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

# Guardian

> Guardian is the pause key.

Guardian is the pause key. It is set as `Stockline.guardian` and forwards pause and unpause calls from a single key address. Pause blocks borrow, withdrawCollateral, liquidate, and USDG withdrawal from the pool. It never blocks repay, supplyCollateral, deleverage, or USDG deposit, and it cannot change any parameter. The key is a hot wallet held by the team so a pause can happen in minutes. The Timelock cannot pause, and the Guardian cannot write the registry, so neither role can do the other's job. A compromised key can stop risk-increasing actions for a while but cannot move funds or change the line on any account.

`Guardian` lets you:

* Pause risk-increasing actions in an emergency
* Unpause them
* Read the key and core addresses

Addresses per network. Every address is also on [Addresses](/resources/addresses).

| Network                 | Address                                                                                                                                       |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Robinhood Chain testnet | [0x6d049Bb64DF9F62F8661dae530dbF35c1d69fD60](https://explorer.testnet.chain.robinhood.com/address/0x6d049Bb64DF9F62F8661dae530dbF35c1d69fD60) |

The source code is [`src/governance/Guardian.sol`](https://github.com/stockline-xyz/contracts/blob/main/src/governance/Guardian.sol) on GitHub. The ABI is [`/abis/Guardian.json`](/abis/Guardian.json).

## Write methods

### pause

```solidity theme={"system"}
function pause() external
```

Calls `Stockline.pause`. Key only. After this call, borrow, withdrawCollateral, liquidate, and USDG pool withdrawals revert with Paused. Repay, supplyCollateral, deleverage, and USDG deposits keep working. Use it when a feed, the sequencer, or a listing is behaving in a way the oracle regimes do not already cover.

<Warning>
  Key only. Reverts with NotKey otherwise.
</Warning>

<Note>
  Pausing does not stop interest from accruing. Borrowers keep paying while paused, and the line on each account does not move.
</Note>

### unpause

```solidity theme={"system"}
function unpause() external
```

Calls `Stockline.unpause`. Key only. Every action returns to the state the oracle regime allows. Liquidations that became possible during the pause can execute in the same block as the unpause, so announce an unpause before sending it.

<Warning>
  Key only. Reverts with NotKey otherwise.
</Warning>

## Errors

### ZeroAddress

```solidity theme={"system"}
error ZeroAddress()
```

The key or core was zero at deployment.

### NotKey

```solidity theme={"system"}
error NotKey()
```

The caller is not the key.
