base-usdc-aave-v3-lending, Aave V3’s USDC reserve on Base, found by filtering GET /v1/yields for types=lending, network=base, and inputToken=USDC. Add providers=aave if you already know the protocol you want. Swap in whatever id your own discovery step returns; see Discover yields.
Lending here is supply-side only. You supply an asset and earn the variable rate paid by borrowers; you are not borrowing against collateral. That’s a separate product: the Borrow API.
Prerequisites
- A yield.xyz API key, sent as
x-api-keyon every request. - A lending yield enabled for your project. See Discover yields.
- A signer for the target chain. This guide uses a generic
signAndBroadcastplaceholder; see Transaction signing for chain-specific code.
Discover and compare lending yields
Filter the catalog down to lending markets for one asset on one network:Response (excerpt)
rewardRate.totalis a live variable supply rate, expressed as a decimal fraction (0.0431is 4.31%) withrateTypetelling you APR or APY. It moves with pool utilization.status.entermust betruebefore you offer the yield. A reserve that is frozen or paying zero interest reportsenter: falsehere.state.capacityState.remaining, when present, is how much more the reserve can accept before its supply cap.stateis optional on the yield object: check it exists before readingcapacityStateoff it, since not every yield type populates it.rewardRate.components[]breaks the total down by source, each entry with its ownrate,yieldSource, andtoken. Here the only component is thelendingrate itself; a reserve that also pays an incentive token lists it as an additional component.
Read the enter schema
Never hardcode{ amount }. Read mechanics.arguments.enter.fields from GET /v1/yields/{yieldId} and build the request from it, the same pattern as Enter and exit flows:
Response (excerpt)
amount is required. receiverAddress redirects the aTokens to a different address than the signer. executionMode is covered below.
Enter the position
1
Request the enter action
cURL
Response (excerpt)
SKIPPED when an existing ERC-20 allowance already covers amount; otherwise it’s CREATED and has to be signed like the supply transaction.2
Sign and submit, in order
Follow Enter and exit flows for the full branch, sign, submit, and poll loop: drive
transactions in stepIndex order, skip anything already SKIPPED or otherwise terminal, and poll each to a terminal status before moving on.Batched execution for smart accounts
WhenexecutionMode: "batched" is set in arguments, the enter (or exit) action returns a single BATCH-type transaction instead of separate approval and supply steps: its unsignedTransaction is a JSON array of { to, data, value } calls meant to be sent together as one smart-account user operation, rather than two sequential EOA transactions. Only use it with a signer that can execute a batch of calls in one operation.
Confirm the position
Once the supply transaction confirms, read the balance:cURL
Response (excerpt)
amount on this active balance grows on its own as interest accrues, with no separate pricePerShare step and no claim action to run. There’s nothing to poll here beyond re-reading balances; interest is reflected the next time you read the position, not delivered through a pendingActions entry. See Balances and positions for the full balance model.
Exit the position
Exit with either a specificamount or useMaxAmount to withdraw everything:
cURL
WITHDRAW transaction with no cooldown: sign and submit it the same way as enter, and the underlying asset settles as soon as that transaction confirms. Not every lending integration exits this directly; check the returned balance’s pendingActions after any exit, as Enter and exit flows covers.
Errors that block the task
Other lending integrations
Swapping the provider, for example to Compound or Spark, changes what you read and sign, not the shape of the task: re-readmechanics.arguments for that yield rather than assuming Aave’s fields, and check its exit behavior, since not every market exits in a single transaction the way Aave does. Some lending integrations are non-EVM, for example Kamino on Solana, which signs and submits through Solana signing instead of EVM transactions. See Lending for the full list of covered protocols.
Next steps
Enter and exit flows
The full branch, sign, submit, and poll loop reused above.
Tracking balances
Build portfolio views across multiple lending positions.

