> ## 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.

# App Kit SDK: Earn

> Integrate Earn opportunities for USDC and EURC into your app using the App Kit SDK

The [App Kit SDK](/app-kit) includes the Earn capability that lets you offer
opportunities to earn USDC and EURC. Vaults are powered by underlying DeFi
lending protocols. Earn handles vault discovery and share-to-asset conversion,
so you don't need to integrate each vault contract directly.

Earn is available for USDC and EURC on Arc.

## How it works

When you deposit USDC into an Earn vault, you receive vault shares. The shares
appreciate over time as the underlying lending protocol generates returns. To
exit, you redeem your shares back to USDC, which by then is worth your deposit
plus any returns from the protocol.

```mermaid theme={null}
flowchart LR
  Wallet["Wallet:<br/>1,000 USDC"] -->|deposit| Shares["Vault shares:<br/>Appreciate over time"]
  Shares -->|withdraw| Out["Wallet:<br/>1,040 USDC<br/>(deposit + returns)"]
```

Earn is non-custodial: deposited USDC lives in the vault contract, and
integrators choose which vaults to deposit into.

## Quick look

This code snippet fetches vault details and deposits into a vault:

```typescript TypeScript theme={null}
// Fetch vault details
const { vaults } = await kit.earn.exploreVaults({
  chain: "Arc_Testnet",
  sortBy: "apy",
});

// Deposit into the first vault
const result = await kit.earn.deposit({
  from: { adapter, chain: "Arc_Testnet" },
  vaultAddress: vaults[0].vaultAddress,
  amount: "10.00",
});
```

For a complete end-to-end flow, follow the
[quickstart](/app-kit/quickstarts/earn-deposit).

## API key

Earn accepts an optional
[Circle API key](https://developers.circle.com/api-reference/keys) obtained from
the [Circle Console](https://console.circle.com/api-keys). Pass one as `apiKey`
in the operation config. Without one, requests share a rate limit. Production
traffic typically needs a key to avoid hitting it. For a restricted key, select
the "App Kits" product permission when creating the key.

API keys are environment specific. Testnet and mainnet each need their own key.

Keep the API key server-side. The App Kit SDK rejects an API key passed from a
browser context.

## Installation

[Install the App Kit SDK](/app-kit/tutorials/installation) to use Earn. If you
only need Earn and don't want to install the full App Kit SDK, install the
standalone Earn Kit for your preferred adapter:

<Tabs>
  <Tab title="Viem">
    <CodeGroup>
      ```bash npm theme={null}
      npm install @circle-fin/earn-kit @circle-fin/adapter-viem-v2 viem
      ```

      ```bash yarn theme={null}
      yarn add @circle-fin/earn-kit @circle-fin/adapter-viem-v2 viem
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Ethers">
    <CodeGroup>
      ```bash npm theme={null}
      npm install @circle-fin/earn-kit @circle-fin/adapter-ethers-v6 ethers
      ```

      ```bash yarn theme={null}
      yarn add @circle-fin/earn-kit @circle-fin/adapter-ethers-v6 ethers
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Circle Wallets">
    <CodeGroup>
      ```bash npm theme={null}
      npm install @circle-fin/earn-kit @circle-fin/adapter-circle-wallets
      ```

      ```bash yarn theme={null}
      yarn add @circle-fin/earn-kit @circle-fin/adapter-circle-wallets
      ```
    </CodeGroup>
  </Tab>
</Tabs>
