> ## 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 borrow fees work

> How Circle and integrator fees apply when originating a loan with the App Kit SDK

Two fees can apply when a loan is originated, including an
[integrator fee](/app-kit/howtos/borrow/configure-integrator-fee) you can
configure. Fees apply only at origination, not on subsequent operations against
the same loan, and both fees come out of the loan proceeds rather than adding to
the borrower's debt.

## Fees breakdown

Each origination can include the following fees:

| Fee | When it applies | Amount | Recipient |
| - | - | - | - |
| Circle fee | Always. On every origination. | 0%, subject to change | Circle |
| Integrator fee | Conditionally. When you [configure a non-zero rate](/app-kit/howtos/borrow/configure-integrator-fee). | You define, in basis points, up to 10,000. | 90% to your fee recipient; 10% to Arc |

A fee applies only when the loan's debt is zero at execution time: a first
borrow, or a borrow after a full repayment. Borrowing more against a loan that
already carries debt adds no fee. Repayments, collateral additions, collateral
withdrawals, and closes never charge a fee. A zero-rate fee produces no fee
entry and no onchain transfer.

## Loan proceeds and funds flow

The following example shows what happens when a borrower originates a 1,000 USDC
loan against cirBTC collateral on Arc, and you have configured a 25 basis point
integrator fee:

<Steps>
  <Step title="Borrower confirms an origination">
    The borrower confirms a 1,000 USDC borrow. This is the full principal the loan
    will carry.
  </Step>

  <Step title="Loan records the full principal">
    The loan is opened for 1,000 USDC of principal owed to the underlying lending
    protocol. This is the amount the borrower repays over time, regardless of any
    fees applied at origination. See
    [best practices](#best-practices-for-integrator-fees) for what to show the
    borrower before they sign.
  </Step>

  <Step title="Circle fee applies">
    The Circle fee is 0%, so no USDC is deducted for this leg.
  </Step>

  <Step title="Integrator fee is carved from the loan proceeds">
    Your 25 basis point (0.25%) integrator fee applies to the 1,000 USDC principal,
    carving 2.5 USDC out of the loan proceeds. Fees round down to the nearest USDC
    atom, and any remainder stays with the borrower.
  </Step>

  <Step title="The fee splits between your recipient and Arc">
    The 2.5 USDC integrator fee is transferred onchain in two legs:

    * 2.25 USDC (90% of the fee) to your configured fee recipient.
    * 0.25 USDC (10% of the fee) to Arc.
  </Step>

  <Step title="Borrower's wallet receives the net proceeds">
    The borrower's wallet receives 997.5 USDC:

    * Loan principal: 1,000 USDC.
    * Deduct 2.5 USDC integrator fee.
    * Net proceeds: 997.5 USDC.
  </Step>
</Steps>

This flow is illustrated in the following diagram:

Structured summary for tools that read raw MDX (Mermaid is not
machine-parseable): Nodes: Loan (1,000 USDC principal), CircleFee (0 USDC),
IntegratorFee (2.5 USDC = 25 bps of 1,000 USDC), FeeRecipient (your address,
2.25 USDC = 90% of fee), Arc (0.25 USDC = 10% of fee), Net (997.5 USDC),
Borrower (borrower's wallet). Flow: Loan principal splits into Circle fee (0),
integrator fee (2.5 USDC, which splits 90/10 between your fee recipient and
Arc), and net proceeds (997.5 USDC to borrower). Borrower owes the full 1,000
USDC principal over the life of the loan.

```mermaid theme={null}
flowchart TB
  Loan["Loan principal:<br/>1,000 USDC"]

  CircleFee["Circle fee:<br/>0 USDC (0%)"]
  IntegratorFee["Integrator fee:<br/>-2.5 USDC (25 bps)"]
  Net["Net proceeds:<br/>997.5 USDC"]

  Loan --> CircleFee
  Loan --> IntegratorFee
  Loan --> Net

  IntegratorFee --> FeeRecipient["Your fee recipient:<br/>2.25 USDC (90%)"]
  IntegratorFee --> Arc["Arc:<br/>0.25 USDC (10%)"]
  Net --> Borrower["Borrower's wallet"]
```

## Best practices for integrator fees

Follow these best practices when setting an integrator fee:

* Set the fee once during app setup with
  [`kit.borrow.setIntegratorConfig`](/app-kit/howtos/borrow/configure-integrator-fee).
  The rate and recipient apply to every subsequent origination and do not need
  to be passed per call.
* Use a fee recipient address on the same blockchain where the loan is
  originated.
* Preview the fee amount and net proceeds before the borrower signs. The
  [borrow quote](/app-kit/howtos/borrow/preview-a-loan-operation) returns a
  `fees` array with each active leg's `type`, `token`, and `amount`.
* Before the borrower confirms an origination, show:
  * Loan summary: principal owed, integrator fee, and net proceeds to the
    borrower's wallet.

```text Example UI display theme={null}
Loan principal (owed):          1,000.00 USDC
Circle fee:                    -    0.00 USDC
Integrator fee (0.25%):        -    2.50 USDC
Net proceeds to wallet:           997.50 USDC
```

* Return human-readable decimal strings. For example, return `"1000"` rather
  than `"1000000000"` for 1,000 USDC. The App Kit SDK handles base-unit
  conversion internally.
