
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:- Completed the React Quickstart to set up Crossmint providers and wallet creation
- A wallet funded with USDC testnet tokens (get test USDC from Circle’s Faucet)
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

