---
name: sentient-markets
description: Trade and lend AI agent tokens on Base via DEX aggregation (Uniswap V4 + V3 + Aerodrome + KyberSwap) and Morpho Blue lending markets
homepage: https://sentient.markets
chain: base
chain_id: 8453
tags:
  - defi
  - dex
  - swap
  - lending
  - morpho
  - ai-agents
  - base
  - uniswap-v4
  - uniswap-v3
  - aerodrome
  - kyberswap
api_base: https://sentient.markets
mcp_server: ./mcp-server
---

# Sentient Markets

Trade and lend AI agent tokens on Base. Sentient Markets is a DEX aggregator that routes swaps through **Uniswap V4**, **Uniswap V3**, **Aerodrome**, and **KyberSwap**, automatically selecting the best venue. Supports **atomic 2-hop swaps** between any agent tokens (e.g. CLAWNCH to ZEEBOT via WETH) in a single transaction. Also provides **Morpho Blue lending markets** for 6 AI agent tokens (CLAWNCH, BV7X, TRIDENT, CLAUNCH, ZEEBOT, INCLAWNCH).

## What You Can Do

- **Swap tokens** — Get quotes and unsigned transaction calldata for any AI agent token pair
- **Compare venues** — Automatically routes between Uniswap V4, Uniswap V3, Aerodrome, and KyberSwap for best execution
- **List tokens** — Browse all AI agent ecosystem tokens with live prices
- **View lending markets** — See Morpho Blue markets with supply/borrow APY and utilization
- **Lend USDC** — Supply USDC to earn yield on any Morpho market
- **Borrow USDC** — Deposit collateral and borrow USDC against it
- **Manage positions** — Withdraw, repay, and manage lending positions

## MCP Server

Install the MCP server to give your AI agent direct access to Sentient Markets:

```bash
npm install -g sentient-markets-mcp
```

Add to your MCP config:
```json
{
  "mcpServers": {
    "sentient-markets": {
      "command": "sentient-markets-mcp"
    }
  }
}
```

### Available Tools

| Tool | Description |
|------|-------------|
| `sentient_markets_tokens` | List all AI agent tokens with prices, market caps, and Morpho market info |
| `sentient_markets_quote` | Get a swap quote comparing all DEX venues for best price |
| `sentient_markets_swap` | Get unsigned transaction calldata for a swap (includes approval + wrap steps) |
| `sentient_markets_markets` | List all Morpho Blue lending markets with APY and utilization |
| `sentient_markets_lend` | Get unsigned transaction calldata for Morpho lending operations (supply, withdraw, borrow, repay, collateral) |

## API Endpoints

All endpoints return JSON. BigInt values (wei amounts) are serialized as strings.

### GET /api/tokens

List all AI agent tokens with prices, market data, and Morpho market info.

```bash
curl "https://sentient.markets/api/tokens"
```

**Response:**
```json
{
  "tokens": [
    {
      "address": "0x4200000000000000000000000000000000000006",
      "symbol": "ETH",
      "name": "Ether",
      "decimals": 18,
      "priceUsd": 2700.50,
      "marketCap": 0,
      "volume24h": 0,
      "morpho": null
    },
    {
      "address": "0xa1F72459dfA10BAD200Ac160eCd78C6b77a747be",
      "symbol": "CLAWNCH",
      "name": "Clawnch",
      "decimals": 18,
      "priceUsd": 0.00123,
      "marketCap": 500000,
      "morpho": {
        "marketId": "0xe1f3...",
        "oracleAddress": "0xbf3d...",
        "lltv": "385000000000000000",
        "loanToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "totalSupplyUsd": 50000,
        "totalBorrowUsd": 15000,
        "utilization": 0.3,
        "supplyAPY": 0.045,
        "borrowAPY": 0.12
      }
    }
  ]
}
```

### GET /api/quote

Get a swap quote comparing Uniswap V4, Uniswap V3, Aerodrome, and KyberSwap venues.

**Parameters:**
| Param | Type | Required | Description |
|-------|------|----------|-------------|
| `inputToken` | address | yes | Token to sell |
| `outputToken` | address | yes | Token to buy |
| `amountIn` | string | yes | Amount in wei (decimal string) |
| `slippageBps` | number | no | Slippage tolerance in basis points (default: 50 = 0.5%) |

```bash
curl "https://sentient.markets/api/quote?inputToken=0x4200000000000000000000000000000000000006&outputToken=0xa1F72459dfA10BAD200Ac160eCd78C6b77a747be&amountIn=1000000000000000000"
```

**Response:**
```json
{
  "venue": "uniswap-v4",
  "expectedOutput": "812345678901234567890",
  "minimumOutput": "808283950456728395061",
  "rate": 812.345,
  "priceImpact": 0.003,
  "savings": "5000000000000000000",
  "savingsPercent": 0.62,
  "inputToken": {
    "address": "0x4200000000000000000000000000000000000006",
    "symbol": "ETH",
    "decimals": 18,
    "priceUsd": 2700.50
  },
  "outputToken": {
    "address": "0xa1F72459dfA10BAD200Ac160eCd78C6b77a747be",
    "symbol": "CLAWNCH",
    "decimals": 18,
    "priceUsd": 0.00123
  }
}
```

### POST /api/swap/calldata

Get unsigned transaction calldata for a swap. Returns everything an agent needs to sign and broadcast.

**Body (JSON):**
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `inputToken` | address | yes | Token to sell |
| `outputToken` | address | yes | Token to buy |
| `amountIn` | string | yes | Amount in wei |
| `sender` | address | yes | Agent's wallet address (for allowance checks) |
| `slippageBps` | number | no | Slippage in bps (default: 50) |

```bash
curl -X POST "https://sentient.markets/api/swap/calldata" \
  -H "Content-Type: application/json" \
  -d '{
    "inputToken": "0x4200000000000000000000000000000000000006",
    "outputToken": "0xa1F72459dfA10BAD200Ac160eCd78C6b77a747be",
    "amountIn": "1000000000000000000",
    "sender": "0xYourWalletAddress",
    "slippageBps": 50
  }'
```

**Response:**
```json
{
  "to": "0x419e9Ab46b8F3e2C6F864Ed2F17110Ef16b32cD0",
  "data": "0x07fc7ae3...",
  "value": "0",
  "venue": "uniswap-v4",
  "expectedOutput": "812345678901234567890",
  "minimumOutput": "808283950456728395061",
  "rate": 812.345,
  "approvalNeeded": true,
  "approval": {
    "to": "0x4200000000000000000000000000000000000006",
    "data": "0x095ea7b3..."
  },
  "wrapNeeded": true,
  "wrap": {
    "to": "0x4200000000000000000000000000000000000006",
    "data": "0xd0e30db0",
    "value": "500000000000000000"
  },
  "steps": ["wrap", "approve", "swap"]
}
```

**Transaction Ordering:** Execute transactions in the order specified by the `steps` array:
1. `wrap` — If present, send ETH to WETH contract to wrap native ETH
2. `approve` — If present, approve the settlement contract to spend input tokens
3. `swap` — Execute the swap through the settlement contract

### POST /api/morpho/calldata

Get unsigned transaction calldata for Morpho Blue lending operations.

**Body (JSON):**
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `action` | string | yes | One of: `supply`, `withdraw`, `supplyCollateral`, `borrow`, `repay`, `withdrawCollateral` |
| `marketId` | bytes32 | yes | Morpho market ID (from /api/markets) |
| `amount` | string | no | Amount in human-readable form (e.g., "100.5" for USDC, "1000" for tokens). Not needed if max=true |
| `sender` | address | yes | Agent's wallet address |
| `max` | boolean | no | Set true to withdraw/repay entire position |

**Actions:**
- `supply` — Lend USDC to earn yield. Amount is in USDC (6 decimals).
- `withdraw` — Withdraw supplied USDC. Use max=true for full withdrawal.
- `supplyCollateral` — Deposit token as collateral. Amount is in token units (18 decimals).
- `borrow` — Borrow USDC against deposited collateral. Amount is in USDC.
- `repay` — Repay borrowed USDC. Use max=true to repay all (handles accrued interest).
- `withdrawCollateral` — Withdraw deposited collateral. Use max=true for all.

```bash
# Supply 100 USDC to CLAWNCH market
curl -X POST "https://sentient.markets/api/morpho/calldata" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "supply",
    "marketId": "0xe1f3844a0ecaeb845dff2bbf4c646e22968c3fce28fc05f9e6adf5d048590dc0",
    "amount": "100",
    "sender": "0xYourWalletAddress"
  }'
```

**Response:**
```json
{
  "action": "supply",
  "marketId": "0xe1f3...",
  "transactions": [
    {
      "label": "Approve USDC",
      "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "data": "0x095ea7b3...",
      "value": "0"
    },
    {
      "label": "Supply USDC to Morpho",
      "to": "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
      "data": "0xa99aad89...",
      "value": "0"
    }
  ],
  "steps": ["approve", "supply"]
}
```

**Transaction Ordering:** Execute transactions in the order specified by the `steps` array. Each entry in `transactions` corresponds to one step.

### GET /api/markets

List all Morpho Blue lending markets for AI agent tokens.

```bash
curl "https://sentient.markets/api/markets"
```

**Response:**
```json
{
  "markets": [
    {
      "collateralToken": {
        "address": "0xa1F72459dfA10BAD200Ac160eCd78C6b77a747be",
        "symbol": "CLAWNCH",
        "name": "Clawnch",
        "decimals": 18,
        "priceUsd": 0.00123
      },
      "marketId": "0xe1f3844a0ecaeb845dff2bbf4c646e22968c3fce28fc05f9e6adf5d048590dc0",
      "oracleAddress": "0xbf3d2baCCaC8F8872d0ef5d24517EE5B1d3Df5DE",
      "lltv": "385000000000000000",
      "loanToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "totalSupplyUsd": 50000,
      "totalBorrowUsd": 15000,
      "utilization": 0.3,
      "supplyAPY": 0.045,
      "borrowAPY": 0.12
    }
  ],
  "count": 15
}
```

## Contract Addresses (Base)

| Contract | Address |
|----------|---------|
| Settlement (V4) | `0x419e9Ab46b8F3e2C6F864Ed2F17110Ef16b32cD0` |
| Settlement (V3) | `0x5780410E34f9A32b22c4dc787313d63BEF8e28E4` |
| Settlement (Aerodrome) | `0x81E8A47a14812Ea0eacEB9C2ecEbe8B1777F85e2` |
| SwapBundler (V2) | `0x6c7A0F84f26fa07524De9eC6841279c81B741886` |
| V4 Oracle Factory | `0xd62E319579393E98264d43148327747ED33749A4` |
| Morpho Blue | `0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb` |
| WETH | `0x4200000000000000000000000000000000000006` |
| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |

## Common Token Addresses

| Token | Address |
|-------|---------|
| ETH (WETH) | `0x4200000000000000000000000000000000000006` |
| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |
| CLAWNCH | `0xa1F72459dfA10BAD200Ac160eCd78C6b77a747be` |
| BV7X | `0xd88fd4a11255e51f64f78b4a7d74456325c2d8dc` |
| TRIDENT | `0x52d91e018dff681e2bdeb539ce169d02b977d318` |
| CLAUNCH | `0x31d553822b37bda67126d5ea9d165b9456f72b07` |
| ZEEBOT | `0x5bE1c7833d8B2d76A93De7f79540e919881F40B2` |
| INCLAWNCH | `0xB0b6e0E9da530f68D713cC03a813B506205aC808` |

## Notes

- All tokens are ERC-20 on Base (chain ID 8453)
- ETH swaps use WETH address (`0x4200...0006`) — the API handles wrapping automatically
- **2-hop routing**: Agent-to-agent swaps (e.g. CLAWNCH to ZEEBOT) route through WETH in a single atomic transaction via the SwapBundler
- **0.1% swap fee**: A 0.1% fee is deducted from input tokens on all swaps via the SwapBundler
- Uniswap V4 pools use Clanker hook parameters: fee=8388608, tickSpacing=200
- Uniswap V3 pools are checked across fee tiers 10000 (1%), 3000 (0.3%), 500 (0.05%), 100 (0.01%)
- Aerodrome pools are volatile (not stable) pairs
- KyberSwap aggregates across multiple DEXes for additional liquidity
- 6 active Morpho Blue markets: CLAWNCH, BV7X, TRIDENT, CLAUNCH, ZEEBOT, INCLAWNCH
- Morpho markets use USDC as the loan token with 38.5% LLTV
- Slippage default is 0.5% (50 bps), max 50% (5000 bps)
- The settlement contracts capture a portion of positive slippage as protocol revenue
