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

> ## Agent Instructions
> Before reading these docs, install the relevant Circle Skill to get pre-loaded context — skills are LLM-optimized and cover architecture decisions, correct flows, and common pitfalls. 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. Available skills: use-usdc https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-usdc/SKILL.md (balances, transfers, approvals on EVM and Solana); EURC has no skill — see https://developers.circle.com/stablecoins/what-is-eurc.md; bridge-stablecoin https://github.com/circlefin/skills/blob/master/plugins/circle/skills/bridge-stablecoin/SKILL.md (crosschain transfers via CCTP, USDC, EURC, and third-party assets); use-arc https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-arc/SKILL.md (Arc chain config, contract deployment, USDC bridging — Arc docs: https://docs.arc.io/llms.txt); use-circle-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-circle-wallets/SKILL.md (choose wallet type); use-developer-controlled-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-developer-controlled-wallets/SKILL.md (custodial wallets for payouts and treasury); use-user-controlled-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-user-controlled-wallets/SKILL.md (embedded wallets with Web2 login); use-modular-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-modular-wallets/SKILL.md (smart contract wallets with passkeys and ERC-4337); use-gateway https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-gateway/SKILL.md (unified USDC balance, nanopayments); use-smart-contract-platform https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-smart-contract-platform/SKILL.md (deploy, interact, monitor contracts). Pair any skill with the Circle MCP server for live SDK signatures, contract addresses, and chain IDs: {"mcpServers":{"circle":{"url":"https://api.circle.com/v1/codegen/mcp"}}}.
> Read the product overview first. Each product has an overview explaining when and why to use it. Read it before quickstarts.
> Pick the right wallet type. Developer-controlled (you hold keys), user-controlled (end user holds keys via PIN/social login), or modular (smart contract wallets with passkeys). See https://developers.circle.com/wallets.md.
> Use CCTP V2 for crosschain transfers. CCTP natively transfers USDC and EURC via burn-and-mint, and supports permissionless wrapping of third-party assets via lock-and-mint. V1 is legacy; always use V2 unless V1 is specified or the chain requires it (Noble, Sui, and Aptos still require V1). Migration guide: https://developers.circle.com/cctp/migration-from-v1-to-v2.md.
> Use Bridge Kit for frontend bridging. Wraps CCTP with a simpler SDK for user-facing apps. Use CCTP directly for backend transfers.
> Gas Station vs Paymaster. Gas Station sponsors gas for Circle Wallet transactions. Paymaster lets users pay gas in USDC. Different use cases — read both overviews.
> Gateway Nanopayments for sub-cent payments. Gasless USDC micropayments down to $0.000001 via x402 and batched settlement. For pay-per-request APIs, AI agent payments, streaming.
> Look up USDC addresses per chain. Never hardcode — use https://developers.circle.com/stablecoins/usdc-contract-addresses.md.
> Prefer SDKs over raw API calls. Node.js and Python SDKs handle auth, retries, and errors.
> API key required. Bearer token in Authorization header. Testnet and mainnet use separate keys and may use different base URLs depending on the product.
> Set up webhooks when available. Most operations are async. Webhooks deliver transaction confirmations and state changes.
> When calling list endpoints, paginate using pageSize and pageAfter until no nextPageAfter cursor is returned—stopping at the first page silently misses records.
> Building an AI agent? Start with the Agent Stack—Circle CLI, agent wallets, and nanopayments built for autonomous use cases: https://developers.circle.com/agent-stack.md.

# Quickstart: Subscribe and redeem USYC using the Teller smart contract

The Teller contract is an audited smart contract that handles USYC subscriptions
and redemptions. It is implemented with Solidity and you can interact with it
using Solidity, TypeScript, or any other programming language that supports
Ethereum smart contracts.

<Note>
  This quickstart uses testnet addresses. For mainnet addresses, see [USYC
  Contract Addresses](/tokenized/usyc/smart-contracts).
</Note>

The following example shows you how to call the Teller contract to subscribe to
and redeem USYC:

<CodeGroup>
  ```solidity Solidity theme={null}
  import "../IERC20.sol";

  interface ITeller {
    function deposit(uint256 _assets, address _receiver) external returns (uint256);
    function redeem(uint256 _shares, address _receiver, address _account) external returns (uint256);
  }

  ITeller teller = ITeller(0x96424C885951ceb4B79fecb934eD857999e6f82B);

  // Subscribe to USYC
  IERC20 usdc = IERC20(0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238);
  uint256 usdcAmount = 100 * 1e6; // 100.000000 USDC
  address usycReceiver = address(this); // Address to receive USYC
  usdc.approve(address(teller), usdcAmount);
  uint256 usycPurchased = teller.deposit(usdcAmount, usycReceiver);

  // Redeem USYC
  IERC20 usyc = IERC20(0x38D3A3f8717F4DB1CcB4Ad7D8C755919440848A3);
  uint256 usycAmount = 100 * 1e6; // 100.000000 USYC
  address usdcReceiver = address(this); // Address to receive USDC
  address usycAccount = address(this); // Address that holds USYC
  uint256 usdcPayout = teller.redeem(usycAmount, usdcReceiver, usycAccount);
  ```

  ```typescript TypeScript theme={null}
  import { Address, erc20ABI, writeContract, getAccount } from "@wagmi/core";

  const USYC_TELLER_ABI = [
    {
      inputs: [
        { internalType: "uint256", name: "_assets", type: "uint256" },
        { internalType: "address", name: "_receiver", type: "address" },
      ],
      name: "deposit",
      outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
      stateMutability: "nonpayable",
      type: "function",
    },
    {
      inputs: [
        { internalType: "uint256", name: "_amount", type: "uint256" },
        { internalType: "address", name: "_receiver", type: "address" },
        { internalType: "address", name: "_account", type: "address" },
      ],
      name: "redeem",
      outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
      stateMutability: "nonpayable",
      type: "function",
    },
  ] as const;

  // Ethereum Sepolia Addresses
  const SEPOLIA_CHAIN_ID = 11155111;
  const USYC_TELLER_ADDRESS: Address =
    "0x96424C885951ceb4B79fecb934eD857999e6f82B";
  const USDC_ADDRESS: Address = "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238";
  const USYC_ADDRESS: Address = "0x38D3A3f8717F4DB1CcB4Ad7D8C755919440848A3";

  const ONE_HUNDRED_USDC = BigInt(100_000000); // USDC uses 6 decimals
  const ONE_HUNDRED_USYC = BigInt(100_000000); // USYC uses 6 decimals

  // Subscribe to USYC
  export const approveUSYCTellerToSpendUSDC = () =>
    writeContract({
      chainId: SEPOLIA_CHAIN_ID,
      address: USDC_ADDRESS,
      abi: erc20ABI,
      functionName: "approve",
      args: [USYC_TELLER_ADDRESS, ONE_HUNDRED_USDC],
    });

  const usycReceiverAddress: Address = getAccount(); // Address to receive USYC

  export const depositUSYC = () =>
    writeContract({
      chainId: SEPOLIA_CHAIN_ID,
      address: USYC_TELLER_ADDRESS,
      abi: USYC_TELLER_ABI,
      functionName: "deposit",
      args: [ONE_HUNDRED_USDC, usycReceiverAddress],
    });

  // Redeem USYC
  const usdcReceiverAddress: Address = getAccount(); // Address to receive USDC
  const usycAccountAddress: Address = getAccount(); // Address that holds USYC

  export const redeemUSYC = () =>
    writeContract({
      chainId: SEPOLIA_CHAIN_ID,
      address: USYC_TELLER_ADDRESS,
      abi: USYC_TELLER_ABI,
      functionName: "redeem",
      args: [ONE_HUNDRED_USYC, usdcReceiverAddress, usycAccountAddress],
    });
  ```
</CodeGroup>
