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

# 24/7 Wallet Monitoring

> Every WaaS and CaaS wallet is watched around the clock; deposits fire webhooks.

Rach monitors **every WaaS and CaaS wallet 24/7**. You don't poll the chain or run
indexers — when funds arrive at a monitored address, Rach detects the deposit, records it,
and sends your backend a signed [webhook](/guides/webhooks). Monitoring runs on a
dedicated always-on service, independent of your API traffic.

## How it works

<Steps>
  <Step title="An address is monitored">
    WaaS: derive an address with `enable_monitoring: true`. CaaS: every provisioned wallet
    is monitored automatically.
  </Step>

  <Step title="Funds arrive on-chain">
    Rach's monitor watches the relevant chains continuously and picks up the incoming
    transfer.
  </Step>

  <Step title="Deposit detected (pending)">
    Rach records a pending deposit, finds its on-chain transaction, and POSTs
    `wallet.deposit.detected` with the real `tx_hash`. **Nothing is credited yet** — dedupe
    on `deposit_id`.
  </Step>

  <Step title="Hash resolved (only if it was not indexed yet)">
    If the transaction was not indexed when the balance moved, `detected` carries a
    `pending_…` placeholder (`hash_pending: true`), and `wallet.deposit.hash_resolved`
    supplies the real hash as soon as it is found.
  </Step>

  <Step title="Deposit confirmed → you credit">
    Once the transaction reaches the network's
    [confirmation depth](/guides/networks#wallet-as-a-service-and-monitoring), Rach POSTs
    `wallet.deposit.confirmed` with `safe_to_credit: true` and the real `tx_hash` — that's
    your signal to credit the customer.
  </Step>
</Steps>

## WaaS monitoring

Turn monitoring on when you derive an address:

```bash theme={null}
curl https://api.rach.finance/api/v1/wallet/cust_001/derive \
  -H "X-API-Key: $RACH_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "network": "ETH", "enable_monitoring": true }'
```

Monitored addresses report `"monitored": true`. Deposits are detected and confirmed on all
13 networks, for the network's own coin and its stablecoins: ETH, BNB, POL, AVAX, CELO,
TRX, SOL, BTC, LTC, BCH and XRP, plus USDT and USDC on the EVM chains and Solana and USDT
on TRON. The [networks page](/guides/networks#wallet-as-a-service-and-monitoring) lists
each network's confirmation depth and how long detection takes. When a deposit confirms,
Rach fires `wallet.deposit.confirmed` and the funds show up in
`GET /wallet/{id}/balances`.

<Tip>
  Enable your wallet webhook stream by configuring a URL with `wallet_webhook_enabled: true`
  (see [Webhooks](/guides/webhooks)).
</Tip>

## CaaS monitoring

CaaS smart-contract wallets are monitored from the moment they're provisioned. An inbound
transfer to a wallet you operate fires a `transfer.received` webhook — including transfers
sent to a phone number that was never provisioned (Rach creates the wallet on the fly and
notifies the recipient by SMS).

## Reconciliation

If your endpoint was down, you won't miss anything:

* Rach **retries** failed deliveries.
* Every delivery is recorded in a **delivery ledger** you can review.
* You can always re-read balances — `GET /wallet/{id}/balances` (WaaS) or
  `GET /v1/users/balance` (CaaS) — and reconcile by `deposit_id`.

<Note>
  For WaaS reconciliation, add **`?live=true`** to read the chain directly rather than Rach's
  stored figure. The stored figure is kept in step with the chain by the monitor and is right
  for everyday use, but when you are specifically auditing for drift you want the chain read.
</Note>

<Tip>
  **Reusing a deposit address is safe.** Rach tracks each address's balance in both
  directions, so a later deposit is detected correctly even if it is smaller than a previous
  one the customer has since spent.
</Tip>

Next: wire up [Webhooks](/guides/webhooks) to receive and verify these events.


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