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
GET/api/agents/quotePreview quote and return wallet-bound intent_id
POST/api/v1/simulateMandatory pre-execution simulation
POST/api/agents/swapExecute simulated, authenticated swap with fee attached
GET/api/agents/historyFee revenue log & aggregate metrics

POST /api/agents/swap

Requires a fresh successful simulationId, authenticates the agent via EIP-191 signature, attaches feeBps, and returns ready-to-broadcast transaction calldata.

Request Body
{
  "fromChainId":  8453,
  "toChainId":    8453,
  "fromToken":    "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "toToken":      "0x4200000000000000000000000000000000000006",
  "fromAmount":   "1000000",
  "agentAddress": "0xYourAgentWallet",
  "toAddress":    "0xRecipientAgent",
  "simulationId": "sim_...",
  "intentId":     "fd_intent_...",
  "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:

v1: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 quoteRes = await fetch(
  'https://www.farmdash.one/api/agents/quote?fromChainId=8453&toChainId=8453&fromToken=' + USDC_ADDRESS + '&toToken=' + WETH_ADDRESS + '&fromAmount=1000000&walletAddress=' + account.address
);
const quoteIntent = await quoteRes.json();

const simRes = await fetch('https://www.farmdash.one/api/v1/simulate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ intent_id: quoteIntent.intent_id, wallet_address: account.address }),
});
const simulation = await simRes.json();
if (!simulation.success) throw new Error(simulation.revert_reason || 'simulation failed');

const nonce = Date.now().toString();

const payload = [
  'v1', '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://www.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,
    simulationId: simulation.simulation_id,
    intentId: quoteIntent.intent_id,
    nonce, signature,
  }),
});

const quote = await res.json();
// quote.txData is ready-to-broadcast — 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 →