Signal Architect

Agent API Zero Custody v1.0 — Non-custodial agent-to-agent swap router with feeBps fee routing

Revenue Dashboard

Total Fee Revenue
$0.00
Total Volume
$0.00
Total Swaps
0
Active Agents
0

Protocol Status

Li.Fi — Multi-chain (Primary)
0x — EVM (Secondary)
x402 — Base L2 (Beta)

Routing Activity

No swap events yet. Activity will appear here once agents start routing.

Architecture

FarmDash is the Matchmaker, not the Bank. The protocol executes the swap. FarmDash collects a haircut fee routed directly to treasury — no escrow, no custody, no money transmission.

Agent A (Initiator)
FarmDash Signal Architect
Oracle (Price Query)
Protocol (Li.Fi / 0x / x402)
Agent B (Recipient)

API Reference

MethodEndpointDescription
POST/api/agents/swapExecute authenticated swap with fee attached
GET/api/agents/quotePreview quote without executing (no auth)
GET/api/agents/historyFee revenue log & aggregate metrics

POST /api/agents/swap

Authenticates the agent via EIP-191 signature, selects the optimal protocol, attaches feeBps, and returns a ready-to-sign transaction.

Request Body
{
  "fromChainId":  8453,
  "toChainId":    8453,
  "fromToken":    "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "toToken":      "0x4200000000000000000000000000000000000006",
  "fromAmount":   "1000000",
  "agentAddress": "0xYourAgentWallet",
  "toAddress":    "0xRecipientAgent",
  "slippage":     0.5,
  "nonce":        "1709000000000",
  "signature":    "0xEIP191SignatureHere..."
}
Response
{
  "protocol":        "x402",
  "estimatedOutput": "550000000000000",
  "feeBps":          50,
  "feeAmountUSD":    "0.50",
  "gasEstimate":     "21000",
  "txData": {
    "to":      "0xProtocolContract",
    "data":    "0xEncodedCalldata...",
    "value":   "0",
    "chainId": 8453
  },
  "expiresAt": 1709000030000
}

Authentication

Agents sign a deterministic payload using EIP-191. The payload format is:

FARMDASH_SWAP:{fromChainId}:{toChainId}:{fromToken}:{toToken}:{fromAmount}:{agentAddress}:{toAddress}:{nonce}

All addresses must be lowercased. Nonce must be a timestamp within 60 seconds of the current time (replay protection).

Agent SDK Example

TypeScript
import { privateKeyToAccount } from 'viem/accounts';

const account = privateKeyToAccount(AGENT_PRIVATE_KEY);
const nonce = Date.now().toString();

const payload = [
  'FARMDASH_SWAP', 8453, 8453,
  USDC_ADDRESS.toLowerCase(),
  WETH_ADDRESS.toLowerCase(),
  '1000000',
  account.address.toLowerCase(),
  RECIPIENT.toLowerCase(),
  nonce,
].join(':');

const signature = await account.signMessage({ message: payload });

const res = await fetch('https://farmdash.one/api/agents/swap', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    fromChainId: 8453, toChainId: 8453,
    fromToken: USDC_ADDRESS, toToken: WETH_ADDRESS,
    fromAmount: '1000000',
    agentAddress: account.address,
    toAddress: RECIPIENT,
    nonce, signature,
  }),
});

const quote = await res.json();
// quote.txData is ready-to-sign — agent executes via own wallet

Fee Structure

TierVolumeFee (bps)Fee (%)
Standard< $10K500.50%
Mid$10K – $100K350.35%
Whale> $100K250.25%

GET /api/agents/quote

Preview pricing without authentication. Pass query params: fromChainId, toChainId, fromToken, toToken, fromAmount, protocol (optional).

GET /api/agents/history

Query fee event log. Params: agentAddress (optional filter), limit, offset. Add metrics=true for aggregate dashboard metrics.

Security Model

ThreatMitigationStatus
Replay attackNonce + 60s window validationBuilt In
Signature forgeryEIP-191 verifyMessage via viemBuilt In
Fee address swap (MITM)Treasury wallet is env-only, never in requestBuilt In
API key exposureServer-side only, never returned to clientBuilt In
Rate limit abuse20 req/min per agent addressBuilt In
Quote expiry ignored30s expiry enforced on all quotesBuilt In
Back to The Manifest →