Yield Lifecycle
Every yield operation follows the same pattern: prepare, sign, execute, track.1. Prepare
CallPOST /v1/yield/prepare with an operation and your agent address. Rhaios returns strategy data plus setup/execution payloads.
intentId, needsSetup, and strategy metadata. If setup is needed, a setup block is returned (intentEnvelope: null); otherwise an execution block with intentEnvelope is returned.
2. Sign
IfintentEnvelope is present, your agent signs intentEnvelope.signing with its own key (EIP-712).
If needsSetup=true, execute the returned setup transaction first, then call POST /v1/yield/prepare again to get an executable intentEnvelope. The setup transaction type depends on setup.setupType:
"full": Sign a Type-4 (EIP-7702) transaction with authorization_list for first-time delegation + module initialization."modules": Sign a regular Type-2 (EIP-1559) self-call to re-initialize modules when delegation already exists.
3. Execute
Pass the signed envelope toPOST /v1/yield/execute.
intentId is optional and must match intentEnvelope.merkleRoot when present. The intent signer must match intentEnvelope.userOps[0].userOperation.sender.
4. Track
CallGET /v1/yield/status to monitor your positions.
GET /v1/yield/history to see historical APY data for any vault.
5. Withdraw
When ready to exit, callPOST /v1/yield/prepare with operation: "redeem" to prepare withdrawal calldata.
POST /v1/yield/execute — same flow as depositing.
You can also rebalance between vaults using operation: "rebalance", which atomically redeems from one vault and deposits into a better one.