Overview
The yield functionality allows you to:- Get defaults — Portal’s curated list of recommended yield opportunities per chain and token, enriched with live data
- Discover available yield opportunities across different protocols and networks
- Get validators — fetch available validators for staking yields that require validator selection
- Enter yield positions by depositing tokens into yield opportunities
- Manage existing positions (claim rewards, voting, etc.)
- Exit yield positions to withdraw aggregated tokens and rewards
- Track yield balances and historical yield actions
Prerequisites
Before using yield operations, ensure you have:- A properly initialized Portal client (see Create a client)
- An active wallet with the required token(s) on the target network (see Create a wallet)
- Yield.xyz integration enabled in your Portal Dashboard (see Yield.xyz Integration)
Default Yield Opportunities
Portal maintains a curated list of recommended yield opportunities for each supported chain and token. Use theGET /api/v3/clients/me/integrations/yield-xyz/yields/defaults endpoint to retrieve these defaults. By default, the response is lightweight — just yield IDs. Pass includeOpportunities=true to enrich with live data (APY, TVL, status, etc.) from Yield.xyz.
For complete API documentation, see the Client API reference.
data is an object keyed by {caip2ChainId}:{tokenSymbol}, so you can look up entries directly:
yieldId— the recommended Yield.xyz yield ID, ornullif no recommendation existsopportunity— full yield opportunity details whenincludeOpportunities=trueis passed, otherwisenull
When using
includeOpportunities=true, check opportunity.status.enter and opportunity.status.exit before initiating deposits or withdrawals — if either is false, the opportunity is temporarily unavailable.Discovering Yield Opportunities
Use theGET /api/v3/clients/me/integrations/yield-xyz/yields endpoint to find available yield opportunities.
For complete API documentation, see the Client API reference.
Getting Validators
Some yield opportunities (e.g. native staking) require selecting a validator. You can check this by looking atmechanics.requiresValidatorSelection in the yield opportunity response. Use the GET /api/v3/clients/me/integrations/yield-xyz/yields/{yieldId}/validators endpoint to fetch available validators.
For complete API documentation, see the Client API reference.
When entering a yield that requires validator selection, pass the chosen validator’s
address as the validatorAddress argument in the enter action request body.Entering Yield Positions
To enter a yield position, first discover the specific yield, then use thePOST /api/v3/clients/me/integrations/yield-xyz/actions/enter endpoint to create the action and get transactions. You’ll then sign and submit these transactions using the Enclave MPC API.
For complete API documentation, see the Client API reference.
For the example below, we will use the yield opportunity with the ID "ethereum-sepolia-link-aave-v3-lending". Fund your Portal client with the required LINK token to enter the position (here is the correct LINK token on Sepolia testnet Etherscan).
Step 1: Create the Enter Action
Take note of the
transactionId and unsignedTransaction fields in the response’s data.rawResponse.transactions array items. You will need to use these to track the transaction.Step 2: Process and Sign Transactions
The response will include an array of transactions. Process them sequentially, sign each using the Enclave MPC API, track it, and wait for on-chain confirmation before proceeding to the next.Step 3: Track Transaction
After signing and broadcasting, submit the transaction hash to Yield.xyz:Learn more about processing these transactions sequentially in the section below.
Checking Yield Balances
Retrieve current yield positions and balances using thePOST /api/v3/clients/me/integrations/yield-xyz/yields/balances endpoint.
For complete API documentation, see the Client API reference.
Exiting Yield Positions
Use thePOST /api/v3/clients/me/integrations/yield-xyz/actions/exit endpoint to create an exit action, then sign and submit the resulting transactions.
For complete API documentation, see the Client API reference.
Managing Yield Positions
If your Portal client has entered into a yield balance, they may have a yield balance with availablependingActions. You can use the POST /api/v3/clients/me/integrations/yield-xyz/actions/manage endpoint to perform actions on existing yield positions. For example, if the balance has a pendingAction of WITHDRAW or CLAIM_REWARDS, you can use the manage method to withdraw or claim rewards from the yield balance.
For complete API documentation, see the Client API reference.
Getting Historical Actions
Retrieve the history of yield actions for an address using theGET /api/v3/clients/me/integrations/yield-xyz/actions endpoint.
For complete API documentation, see the Client API reference.
Transaction Processing
Yield operations can require multiple transactions. Process them sequentially, sign each using the Enclave MPC API, track it, and wait for on-chain confirmation (e.g. usingeth_getTransactionReceipt) before proceeding to the next.
For complete API documentation, see the Client API reference and get transaction details reference.
Example Transaction Processing Flow
Here’s a complete example of processing transactions from an enter action:The
unsignedTransaction field in the Yield.xyz response is a JSON string. Parse it and extract the transaction parameters before passing to the Enclave MPC API sign endpoint. Remove the gas parameters if you want Portal to estimate the gas for you.Best Practices
- Always check yield availability before attempting to enter positions
- Process transactions sequentially as yield operations often require multiple steps and are dependent on previous transactions being mined successfully
- Handle network errors gracefully and provide user feedback
- Monitor transaction status and provide progress updates to users
- Validate user balances before initiating yield operations
- Track all transactions using the Yield.xyz submit-hash endpoint to maintain accurate state
Supported Networks
The yield functionality supports various networks including:- Monad (
eip155:143) - Monad Testnet (
eip155:10143) - Arbitrum (
eip155:42161) - Avalanche C (
eip155:43114) - Base (
eip155:8453) - Base Sepolia (
eip155:84532) - Celo (
eip155:42220) - Core (
eip155:1116) - Ethereum (
eip155:1) - Ethereum Sepolia (
eip155:11155111) - Fantom (
eip155:250) - Gnosis (
eip155:100) - Harmony (
eip155:1666600000) - Hyperevm (
eip155:999) - Katana (
eip155:747474) - Linea (
eip155:59144) - Moonriver (
eip155:1285) - Optimism (
eip155:10) - Optimism Sepolia (
eip155:11155420) - Plasma (
eip155:9745) - Polygon (
eip155:137) - Polygon Amoy (
eip155:80002) - Sonic (
eip155:146) - Unichain (
eip155:130) - Viction (
eip155:88) - zkSync (
eip155:324) - Solana (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp) - Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1) - Stellar (
stellar:pubnet) - Stellar Testnet (
stellar:testnet) - Tron (
tron:mainnet)
Next Steps
- Learn about signing Ethereum transactions
- Explore sending tokens
- Check out the Client API Yield.xyz endpoints