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

> ## Agent Instructions
> Before reading these docs, install the Circle Skill for Arc to get pre-loaded context: use-arc (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-arc/SKILL.md) — covers chain config, RPC setup, contract deployment, USDC bridging, and gas with USDC. In Claude Code: run /plugin marketplace add circlefin/skills then /plugin install circle-skills@circle. With Vercel Skills CLI: run npx skills add circlefin/skills.
> USDC is the gas token. Arc uses USDC for gas fees, not ETH. Configure gas payment in USDC when submitting transactions.
> Read EVM differences before writing Arc code. Arc targets the Osaka EVM baseline. Most contracts deploy unchanged, but several runtime behaviors diverge from Ethereum: USDC uses 18 decimals natively (not 6), the system emitter `0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE` logs all USDC Transfer events, the mempool enforces a 20 Gwei `maxFeePerGas` floor, blocklist reverts consume gas without a receipt, and `address(0)` sends revert rather than succeed. https://docs.arc.io/arc/references/evm-differences.md is the canonical reference for all Arc-specific runtime behaviors. Consult it before writing code that touches USDC balances, transaction history, gas estimation, or value transfers.
> Sub-second finality. Transactions are final in under 1 second. No need to wait for multiple block confirmations.
> Use App Kits for multichain payment and liquidity capabilities. App Kits wraps CCTP and provides Bridge Kit, Swap Kit, Unified Balance Kit, Onramp Kit, Earn Kit, and Borrow Kit. Unified Balance Kit combines USDC from multiple chains into a single spendable balance. Earn Kit integrates earn opportunities into your app. Borrow Kit lets users borrow USDC against cirBTC collateral on Arc.
> Use Arc Foundry for contract development. Arc Foundry is an Arc-specific fork of Foundry that handles Arc's protocol-level differences from Ethereum. It provides arc-forge, arc-cast, and arc-anvil. Install it before deploying contracts: https://docs.arc.io/arc/tutorials/install-arc-foundry.md.
> Arc is available on both Testnet and Mainnet. See https://docs.arc.io/arc/references/connect-to-arc.md for RPC endpoints and https://faucet.circle.com for testnet tokens.
> Always check Contract Addresses: https://docs.arc.io/arc/references/contract-addresses.md
> Building beyond Arc? Circle offers skills for the full platform: use-usdc (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-usdc/SKILL.md), use-circle-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-circle-wallets/SKILL.md), use-developer-controlled-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-developer-controlled-wallets/SKILL.md), use-user-controlled-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-user-controlled-wallets/SKILL.md), use-modular-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-modular-wallets/SKILL.md), use-gateway (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-gateway/SKILL.md), use-smart-contract-platform (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-smart-contract-platform/SKILL.md). Full Circle developer docs: https://developers.circle.com/llms.txt.

# How-to: Monitor a loan

> Read a wallet's loans and register webhooks for asynchronous health updates

Monitor a Borrow loan by reading its current state on demand or by registering a
webhook to receive updates when the loan enters a different
[health band](/app-kit/concepts/borrow-loan-health#health-factor-bands).

## Prerequisites

Before you begin, ensure that you've:

* [Installed the App Kit SDK](/app-kit/tutorials/installation) and an adapter
* Opened a loan whose owner matches the connected wallet

## Check loan state

Call `getLoans` with a wallet address and blockchain to fetch a page of the
wallet's loans (up to 100 per call), along with each loan's collateral, debt,
health factor, band, LTV, and liquidation price. Pass the returned
`pagination.pageAfter` cursor back to fetch the next page.

If you already have a `loanId`, call `kit.borrow.getPosition({ loanId })` to
read that specific loan. It returns the same shape, except the owner field is
named `wallet` instead of `walletAddress`.

```typescript TypeScript theme={null}
const { loans } = await kit.borrow.getLoans({
  walletAddress: "0x...",
  chain: "Arc_Testnet",
});

console.dir(loans, { depth: null });
```

Each `Loan` looks like:

```text theme={null}
{
  loanId: "11111111-1111-4111-8111-111111111111",
  chain: "Arc_Testnet",
  marketId: "0x...",
  walletAddress: "0x...",
  dataStatus: "READY",
  status: "active",
  collateral: { token: "cirBTC", tokenAddress: "0x...", amount: "0.05", decimals: 8 },
  borrowed: { token: "USDC", tokenAddress: "0x...", amount: "1000.03", decimals: 6 },
  principalBorrowed: { token: "USDC", tokenAddress: "0x...", amount: "1000.00", decimals: 6 },
  accruedInterest: { token: "USDC", tokenAddress: "0x...", amount: "0.03", decimals: 6 },
  borrowApy: 0.032,
  ltv: 0.42,
  healthFactor: 2.05,
  healthFactorBand: "SAFE",
  liquidationPrice: { token: "USDC", tokenAddress: "0x...", amount: "23230.00", decimals: 6 }
}
```

For what the health fields mean, see
[How loan health works](/app-kit/concepts/borrow-loan-health).

## Subscribe to health updates

Register a webhook to receive updates when a loan enters a different health
band.

### Register a webhook

Call `registerWebhook` with the loan's `loanId` and your `webhookUrl`. The
connected wallet must equal the loan's persisted owner.

```typescript TypeScript theme={null}
const result = await kit.borrow.registerWebhook({
  from: { adapter, chain: "Arc_Testnet" },
  loanId: "11111111-1111-4111-8111-111111111111",
  webhookUrl: "https://example.com/borrow-webhook",
});
```

The wallet signs the registration. There is no onchain transaction.

### Unregister a webhook

Omit `webhookUrl` (or pass `null`) to remove a loan's current webhook.

```typescript TypeScript theme={null}
await kit.borrow.registerWebhook({
  from: { adapter, chain: "Arc_Testnet" },
  loanId: "11111111-1111-4111-8111-111111111111",
});
```
