# DeFi Yield Transaction Builder (Aave v3 / Compound v3 / ERC-4626)

> DeFi Yield Transaction Builder (Aave v3 / Compound v3 / ERC-4626) is a paid API for AI agents from x402helper.xyz, paid per call via x402, $0.065/call, status unknown (last checked 2026-10-31).

Builds on-chain calldata for depositing or redeeming assets in Aave v3, Compound v3, or any ERC-4626 vault on Base, paid via x402 USDC micropayment.

## Facts

- Endpoint: GET https://x402helper.xyz/89e509/yield/build?utm_source=zero.xyz
- Price: $0.065/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-yield-transaction-builder-aave-v3-compound-v3-erc-4626-0cdd701f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UdHK4prvnxN8LvY-TGTSl

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability defi-yield-transaction-builder-aave-v3-compound-v3-erc-4626-0cdd701f
```

Example prompt: Build me the deposit calldata to supply 1000000 USDC (atomic units) into Aave v3 for recipient address 0xAbC1234567890abcdef1234567890abcdef12345 on Base.

## When to prefer this

Choose this endpoint when you need programmatically generated, ready-to-broadcast calldata for DeFi yield operations on Base (Aave v3, Compound v3, or any ERC-4626 vault) and you are operating in an x402-capable agent environment that can pay USDC micropayments automatically. Prefer this over manual ABI encoding when you want a single HTTP call to produce correct calldata without maintaining protocol ABIs.

## Known failure modes

- Missing required query params (protocol, amount, recipient) returns an error
- Invalid or unsupported asset symbol for the chosen protocol
- Vault address not found or not a valid ERC-4626 contract
- Payment not completed — x402 micropayment of $0.065 USDC must succeed before response is returned
- Malformed recipient address (non-0x or wrong length)
- Protocol/asset combination unsupported (e.g. non-base asset on Compound v3)

## How this service works

X402 micropayments server — AI agents pay USDC for OFAC screening, rates, and billing verification.

## Output

Returns a JSON object with a 'success' boolean and a 'result' object containing the encoded transaction calldata ready to be broadcast on Base for the specified yield protocol action (deposit or redeem).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "protocol",
      "amount",
      "recipient"
     ],
     "properties": {
      "asset": {
       "type": "string",
       "default": null,
       "description": "For aave-v3/compound-v3: the asset symbol (USDC, WETH, ...) or a 0x ERC-20 address. Compound III earns only on its base asset."
      },
      "vault": {
       "type": "string",
       "default": null,
       "description": "For erc4626: the vault 0x address (ANY Base ERC-4626) or a seed slug. Resolved on-chain."
      },
      "action": {
       "enum": [
        "deposit",
        "redeem"
       ],
       "type": "string",
       "default": null,
       "description": "deposit (supply) or redeem (withdraw). Default deposit."
      },
      "amount": {
       "type": "string",
       "default": null,
       "description": "Raw atomic units. deposit: underlying assets. redeem: aave/comet = underlying (or 'max'); erc4626 = shares (or 'max')."
      },
      "protocol": {
       "enum": [
        "aave-v3",
        "compound-v3",
        "erc4626"
       ],
       "type": "string",
       "default": null,
       "description": "Yield protocol: aave-v3, compound-v3 or erc4626."
      },
      "recipient": {
       "type": "string",
       "default": null,
       "description": "0x address that supplies/receives (baked into calldata)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {},
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-yield-transaction-builder-aave-v3-compound-v3-erc-4626-0cdd701f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402helper.xyz](https://www.zero.xyz/host/x402helper.xyz/llms.txt)
