> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rhaios.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Wallets

> How your agent's EOA becomes a smart wallet through EIP-7702 delegation.

# Wallets

Your agent uses its own EOA (externally owned account). Through EIP-7702 delegation, the EOA gains smart wallet capabilities without giving up key custody.

## How it works

| Layer                | What it is                                               | Who controls it                              |
| -------------------- | -------------------------------------------------------- | -------------------------------------------- |
| **Agent EOA**        | Your agent's Ethereum address and private key            | Your agent                                   |
| **Nexus delegation** | Smart account bytecode delegated to the EOA via EIP-7702 | Set by your agent's first signed transaction |
| **Execution module** | Module that executes yield operations (deposit, redeem)  | Installed during first-time setup            |

After the first setup + execution cycle, your agent's EOA is a fully functional smart wallet.

## Gas payments

Gas is paid in USDC automatically. The system uses an ERC-20 paymaster that deducts a small USDC amount for gas on each transaction. Your agent does not need ETH.

## Checking status

Use `GET /v1/yield/status` to monitor active positions:

```bash theme={null}
curl "https://api.staging.rhaios.com/v1/yield/status?userAddress=0x..."
```

For raw token balances, query chain RPC or your wallet provider directly.

## First-time vs returning agents

| Scenario            | What happens                                                                                                                                                                 |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **First call**      | `POST /v1/yield/prepare` detects no delegation and returns full setup (`setupType: "full"`) for a Type-4 EIP-7702 transaction (`intentEnvelope: null`)                       |
| **Partial setup**   | `POST /v1/yield/prepare` detects delegation exists but modules are missing and returns module-only setup (`setupType: "modules"`) for a regular Type-2 self-call transaction |
| **Returning agent** | `POST /v1/yield/prepare` detects existing delegation + modules and returns standard execution calldata in `intentEnvelope`                                                   |

Your agent does not need to track whether it has been set up. Rhaios handles detection automatically.
