Enter Position
Generate the transactions needed to enter (deposit into) a yield position using the Yield.xyz Actions API. This skill covers the complete workflow: validating the yield, constructing the enter action, iterating through unsigned transactions, and submitting transaction hashes.When to Use
Activate this skill when the user asks to:- Stake tokens (e.g., “Stake 1 ETH with Lido”)
- Deposit into a lending protocol (e.g., “Deposit 1000 USDC into Aave on Ethereum”)
- Enter a vault (e.g., “Deposit into Morpho vault”)
- Provide liquidity
- Start earning yield on any token
Authentication
Base URL
Step-by-Step Instructions
Step 1: Verify the Yield Exists and Accepts Deposits
status.enter is true. If false, the yield is not accepting new deposits.
Step 2: Check Argument Requirements
From the yield metadata response, inspect theargs.enter field to determine required arguments:
Step 3: Select a Validator (if Required)
For staking yields that require a validator:preferred: true.
Step 4: Create the Enter Action
Endpoint:POST /v1/actions/enter
Request Body (CreateActionDto):
Step 5: Sign and Submit Each Transaction
For each transaction in thetransactions array, in order:
- Sign the
unsignedTransactionusing the user’s wallet or signing mechanism - Broadcast the signed transaction to the blockchain
- Submit the hash to Yield.xyz for tracking:
PUT /v1/transactions/{transactionId}/submit-hash
POST /v1/transactions/{transactionId}/submit
Step 6: Verify Action Completion
Endpoint:GET /v1/actions/{actionId}
status is SUCCESS or FAILED.
Amount Formatting
Amounts must be in the token’s smallest unit (base units):
Formula:
baseUnits = amount * 10^decimals
Transaction Types
An enter action may produce multiple transactions that must be executed in order:Error Handling
Edge Cases
- Approval transactions: EVM DeFi yields (lending, vaults) often require a token approval transaction before the deposit. Always execute transactions in the order returned.
- Minimum amounts: Some yields have minimum deposit amounts. If the amount is too low, you’ll receive a 400 error.
- Geoblocking: Enter actions enforce geolocation restrictions. A 403 error means the user’s region is blocked.
- Transaction ordering: Transactions MUST be executed sequentially in the order they appear in the response. Do not parallelize.
- Gas estimation: The unsigned transaction includes gas parameters, but the signer may need to re-estimate gas on some networks.
- ETH native staking minimum: Ethereum native staking requires exactly 32 ETH per validator.
- skipPrechecks: Pass
"skipPrechecks": truein arguments to bypass pre-execution balance checks if you know the balance is sufficient.

