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

# On-Chain Metrics and Monitoring

> Monitor on-chain Gateway activity - TicketBroker contract events, Arbiscan watchlists, deposit and reserve verification, gas price impact, and deposit depletion tracking on Arbitrum.

> [!NOTE]
>
> This page applies to **Gateways running in on-chain operational mode** (Video AI Dual). Off-chain Gateways do not interact with Arbitrum contracts and can skip this page.

On-chain metrics show what is actually happening at the contract layer on Arbitrum

* where ETH is moving,
* which tickets Orchestrators are redeeming, and
* whether gas costs are affecting the payment system.

The Gateway's deposit and reserve on the `TicketBroker` contract fund all PM ticket redemptions.

When the deposit is exhausted:

* Orchestrators reject tickets,
* job routing stops **silently**, and
* Prometheus shows `livepeer_gateway_deposit` at zero.

Arbiscan can help debug the cause (which Orchestrators redeemed, how much, when).

For full context on PM mechanics, see [Payments Guide](/v2/gateways/guides/payments-and-pricing/payment-guide.md).

## Arbiscan

[Arbiscan](https://arbiscan.io) is the block explorer for Arbitrum One. For on-chain Gateway operators, it is the primary tool for viewing transactions, watching TicketBroker redemption events, monitoring deposit changes, and checking gas price history.

### Find the Gateway

The Gateway's ETH address is shown in `livepeer_cli` \*\*Option 1 (Get node status) \*\*under **ETH Account**.

Navigate to:

```icon="terminal" theme={null}
https://arbiscan.io/address/<GATEWAY_ETH_ADDRESS>
```

Key Arbiscan tabs:

<table>
  <tr>
    Tab

    What it shows
  </tr>

  <tr>
    **Transactions**

    All outgoing transactions (bridging, deposits)
  </tr>

  <tr>
    **Internal Txns**

    Contract-initiated transfers - ticket redemptions appear here
  </tr>

  <tr>
    **Token Transfers**

    ERC-20 token movements (LPT bridging)
  </tr>
</table>

### Contract Events

The `TicketBroker` contract emits events for every deposit, reserve, and redemption action:

<table>
  <tr>
    Event

    Meaning

    When it fires
  </tr>

  <tr>
    `FundDeposit`

    ETH added to Gateway deposit

    livepeer\_cli Option 11 (Deposit broadcasting funds)
  </tr>

  <tr>
    `FundReserve`

    ETH added to reserve

    Reserve set during deposit flow
  </tr>

  <tr>
    `RedeemWinningTicket`

    Orchestrator redeemed a winning ticket

    Each winning ticket redemption
  </tr>

  <tr>
    `Unlock`

    Withdrawal unlock period started

    Unlock called on deposited funds
  </tr>

  <tr>
    `Withdraw`

    Funds withdrawn after unlock period

    Withdrawal after unlock expires
  </tr>
</table>

To find redemptions against a Gateway: filter Arbiscan events by the TicketBroker contract address, then filter by `RedeemWinningTicket` events where the `sender` field matches the Gateway address.
For the current TicketBroker address, see [Contract Addresses](/v2/about/resources/reference/livepeer-contract-addresses.md).

### Watchlist Alerts

Arbiscan allows email alerts when a watched address is involved in a transaction. This is the fastest way to detect unexpected deposit activity.

1. Create an Arbiscan account at [arbiscan.io](https://arbiscan.io)
2. Navigate to **My Account > Watch List > Add Address**
3. Enter the Gateway ETH address
4. Select notification triggers: "Transaction sent to" and "Transaction sent from"
5. Enable email notifications

An email arrives each time a ticket redemption occurs against the deposit, allowing early detection of unexpected drain rates.

## Deposit Verification

Prometheus shows the deposit via `livepeer_gateway_deposit`, but the [TicketBroker]("https://arbiscan.io/address/0xea1b0F6c8D158328a6e3D3F924B86A759F41465c") contract can also be queried directly to verify node-reported values against chain state.

### Status: livepeer\_cli

```bash icon="terminal" CLI: Get Node Status theme={null}
livepeer_cli -host 127.0.0.1 -http 5935
# Select Option 1: Get node status
# Look for: BROADCASTER STATS > Deposit, Reserve
```

The CLI uses the legacy term "Broadcaster" for Gateway.

### Status: Arbitrum RPC

Query the [TicketBroker]("https://arbiscan.io/address/0xea1b0F6c8D158328a6e3D3F924B86A759F41465c") contract directly via **JSON-RPC** to get deposit and reserve independently of the running node:

```bash icon="terminal" CLI: Get Node Status theme={null}
# Encode call to getSenderInfo(<gateway_address>)
# Function selector: first 4 bytes of keccak256("getSenderInfo(address)")
# Advanced technique - see Arbitrum/Solidity docs for ABI encoding

curl -X POST https://arb1.arbitrum.io/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [{
      "to": "<TICKET_BROKER_CONTRACT_ADDRESS>",
      "data": "<ENCODED_CALL>"
    }, "latest"],
    "id": 1
  }'
```

For most operators, `livepeer_cli` is sufficient. Direct contract queries are useful when the node is offline or when verifying that node-reported state matches chain state.

## Gas Monitoring

> [!TIP]
>
> Arbitrum gas fees are generally 90% to over 99% cheaper than Ethereum mainnet, with typical transactions costing only a few cents (approx. $0.01–$0.30).
> \
> \
> &#x20;As a Layer 2 rollup, Arbitrum bundles transactions, significantly reducing costs compared to the high fees often seen on Ethereum, especially during congestion
>
> Gas Prices are not generally a cause of error since the mirgration to Arbitrum from Ethereum Mainnet.

Arbitrum One gas prices can fluctuate.
When gas is expensive, Orchestrators pay more to redeem winning tickets - this cost is reflected in their pricing to Gateways. High gas periods can cause Orchestrators to increase prices above the `-maxPricePerUnit` cap, leading to routing failures even when the deposit is healthy.

### Current Gas Price

```bash icon="terminal" Query Gas Price theme={null}
curl -X POST https://arb1.arbitrum.io/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}'
```

The response is in wei. Convert to Gwei (divide by 1e9) for a human-readable figure.

### Prometheus gas metric

```promql icon="gauge-high" Query Gas Price theme={null}
# Current suggested gas price from node's oracle (in wei)
livepeer_suggested_gas_price

# Convert to Gwei
livepeer_suggested_gas_price / 1e9
```

Alert when `livepeer_suggested_gas_price` spikes significantly above its baseline - this is a leading indicator that Orchestrators may raise prices above the cap, causing job routing to slow.

### Gas spike response

During sustained high-gas periods:

1. **Raise `-maxPricePerUnit` temporarily** to keep jobs routing to Orchestrators absorbing higher redemption costs
2. **Monitor `livepeer_payment_create_errors`** - increases during gas spikes indicate ticket-related failures
3. **Use USD-mode pricing** (`-priceFeedAddr`) for stable USD-denominated caps that auto-adjust with ETH price. See [Pricing Strategy](/v2/gateways/guides/payments-and-pricing/pricing-strategy.md)

## Depletion Tracking

Understanding how fast the deposit depletes helps plan top-ups before service interruptions.

### From Prometheus

```promql icon="terminal" theme={null}
# Deposit depletion rate (wei per second, negative = spending)
deriv(livepeer_gateway_deposit[1h])

# Estimated time to deposit exhaustion at current rate (seconds)
livepeer_gateway_deposit /
  abs(deriv(livepeer_gateway_deposit[1h]))
```

### From Arbiscan

Sort `RedeemWinningTicket` events by timestamp to see redemption frequency and value patterns. Unusually large or frequent redemptions from a single Orchestrator may indicate that Orchestrator is experiencing high gas costs, or in a worst case, receiving a disproportionate share of winning tickets.

## Diagnostic Checklist

If the Gateway stops routing jobs without clear error messages, work through this checklist in order:

### 1. Check Prometheus deposit

`livepeer_gateway_deposit` - if zero, top up immediately via [Funding Guide](/v2/gateways/guides/payments-and-pricing/funding-guide.md). If non-zero, continue.

### 1. Check livepeer\_cli

Option 1: Get node status. Under BROADCASTER STATS (legacy term for Gateway), both Deposit and Reserve must be non-zero.

### 1. Check Arbiscan redemptions

Look for a burst of `RedeemWinningTicket` events in the last 30-60 minutes. A sudden burst may have drained the deposit faster than expected.

### 1. Test Arbitrum RPC

`curl -X POST <ethUrl> -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'` - if this fails, the RPC is the problem, not the deposit.

### 1. Check gas price

`livepeer_suggested_gas_price` - if gas spiked, Orchestrators may have raised prices above `-maxPricePerUnit`.

### 1. Verify Orchestrators

Visit [Livepeer Explorer](https://explorer.livepeer.org) to confirm the configured Orchestrators are active.

## Related Pages

> [card] [Contract Addresses](/v2/about/resources/reference/livepeer-contract-addresses.md)
>
> TicketBroker, BondingManager, and all Livepeer contracts on Arbitrum.

> [card] [Funding Guide](/v2/gateways/guides/payments-and-pricing/funding-guide.md)
>
> Top up deposit and reserve via livepeer\_cli.

> [card] [Monitoring Setup](/v2/gateways/guides/monitoring-and-tooling/monitoring-setup.md)
>
> Prometheus + Grafana for node-level metrics.


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