Skip to main content
Generate Yield
New to yield? Learn about yield strategies and mechanisms before diving into this implementation guide.

Live Demo

Explore a working fintech app where users deposit USDC and earn yield

Supported Networks

Yield.xyz supports Ethereum, Base, Solana, and 50+ other chains across EVM and non-EVM networks. Testnet support includes Stellar-Testnet, Base-Sepolia, Ethereum-Sepolia, and Solana Devnet. For the complete and up-to-date list, see the Yield.xyz Supported Networks documentation.
This guide uses Base network with testnet wallets connected to mainnet yield opportunities, giving you a realistic experience without using real funds.

Prerequisites

Before you start, make sure you have:
Since this guide uses testnet tokens, deposits will not actually earn yield. For production, use mainnet USDC and ensure your Crossmint wallet is configured for mainnet.Need help launching in production or getting access to Yield.xyz? Contact sales.
1

Get a Yield.xyz API Key

Request an API key from Yield.xyz and add it to your environment:
.env.local
2

Create the Yield API utilities

Create a file with all the Yield.xyz API functions and types:
  • Fetch Yields: Retrieve available USDC yield opportunities on Base
  • Enter Yield: Deposit USDC into a yield-generating position
  • Exit Yield: Withdraw USDC from an active yield position
  • Get Yield Balance: Check the current balance in a yield position
  • Get Active Positions: Retrieve all active yield positions for a wallet
yield-api.ts
3

Build a yield component with deposit and withdraw

Create a component that displays yields, handles deposits, and shows active positions:
yield-app.tsx
4

Render the yield app

Add the yield component to your application (inside your Crossmint providers):
page.tsx

Next Steps

Yield.xyz API Docs

Full API reference for yields, actions, and balances

Credit Cards

Let users spend their wallet balance with virtual credit cards