Paladin Swap

io.github.paladinfi由 GitHub 帳號 paladinfi 發布v0.1.0更新於 Oct 25, 2026

Multi-aggregator swap router for AI agents on Base. 10 bps fee. MCP-native, non-custodial.

發布方自己的服務:Trust Check Mcp

已驗證Streamable HTTP可網頁執行金融開發者工具

概覽

AI 產生的概覽

一個遠端 MCP 伺服器,讓 AI 代理取得 Base 鏈上代幣兌換報價與可直接執行的 calldata,另附範例信任預覽與健康檢查。

可以做什麼
取得跨兩個上游聚合器的競爭性兌換報價,回傳路由位址、calldata、最低買入量與已內嵌的 10 個基點費用,供代理錢包在 Base(鏈 ID 8453)上簽署並送出。檢視範例固定資料的代幣信任預覽,結果一律帶非真實標記與 sample- 前綴的建議。檢查服務健康狀態、費用設定、各來源計數器與金絲雀狀態。
適用情境
適合需要讓代理在 Base 上準備 ERC20 兌換、又不想自行撰寫聚合器、滑價與費用邏輯的情境,且由使用者自己的錢包簽署並廣播交易。不適合作為正式環境的信任篩檢,因為預覽工具只回傳範例資料。
執行需求
需要遠端 Streamable-HTTP 端點;未宣告需要安裝套件、API 金鑰或環境變數。用戶端須支援 Streamable-HTTP 傳輸。實際執行兌換需要能在 Base 上簽署並送出交易的錢包。有速率限制(MCP 端點每秒 10 次加突發,每個 IP 5 個並行連線)。
安裝前請注意
報價工具回傳的交易 calldata 須由使用者錢包簽署並廣播;買入代幣上已內嵌 10 個基點費用並轉入營運方金庫。信任預覽僅為範例資料,不得用來把關真實兌換或簽署。付費信任檢查端點透過 x402 每次呼叫收費 0.001 USDC。託管後端為專有軟體,請求日誌會保留被查詢位址與來源 IP。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Paladin Swap,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.paladinfi%2Fpaladin-swap/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "paladin-swap": {
      "type": "http",
      "url": "https://swap.paladinfi.com/mcp"
    }
  }
}

README

paladin-swap-mcp

Open client and API spec for PaladinFi Swap — a competitive multi-aggregator swap router for AI agents on Base. This repository contains the public REST and MCP API specification, working code examples, and thin client wrappers. The hosted backend at swap.paladinfi.com is proprietary.

Routing scope. PaladinFi Swap queries integrated upstream aggregators (currently 0x and Velora) in parallel and returns whichever delivers the higher post-fee buy amount. We do not represent any returned route as the best available, lowest-cost, or optimal across the broader DeFi market. Phrases like "best execution" are reserved-meaning terms in U.S. securities law and are deliberately not used here.

[Status] [Chain] [Backend] [Fee] [MCP] [CI] [License] [paladinfi/paladin-swap-mcp MCP server]


What is PaladinFi Swap?

A swap router built for AI agents that need to execute on-chain swaps. Your agent calls a single tool; the service returns ready-to-execute calldata your wallet signs and submits:

  • Router address to send the transaction to
  • Calldata with all routing pre-baked
  • Min buy amount (slippage protection enforced on-chain)
  • Affiliate fee already injected — no separate accounting on your side

Agents skip writing aggregator glue, slippage handling, and fee logic. One call, ready bytes.

The Service is non-custodial: PaladinFi never holds, signs, or moves user funds. Every transaction is signed and submitted by the user's own wallet (or their agent acting on their behalf).

Install (MCP)

For Claude Code or any MCP-compatible client supporting Streamable-HTTP transport:

bash
claude mcp add --transport http --scope user paladin-swap https://swap.paladinfi.com/mcp

Restart your client. Three tools become available:

  • swap_quote(sellToken, buyToken, sellAmount, taker, chainId?, slippageBps?) — competitive route across 0x and Velora (highest post-fee buy amount); returns ready-to-execute calldata.
  • trust_check_preview(address, chainId?) — sample-fixture preview of the trust gate. Returns _real: false, every factor is real: false, and the recommendation is prefixed sample- (e.g., sample-allow). Do not use the preview verdict to gate real swaps, signing, or any production agent decision. For production trust evaluation, POST to /v1/trust-check (paid, $0.001 USDC/call via x402) or use the npm plugins @paladinfi/eliza-plugin-trust / @paladinfi/agentkit-actions.
  • swap_health() — liveness, fee config, per-source counters, decimals-cache state, last Velora startup-canary verdict, selector-enforcement state.

See mcp-tools.json for the full tool schemas.

MCP standards compliance

RequirementStatus
Tool title + annotations (readOnlyHint, openWorldHint, idempotentHint, destructiveHint)✓ since v0.11.74; verify via the MCP tools/list method
Tool name ≤64 chars✓ longest is trust_check_preview (19 chars)
Streamable HTTP transport✓ at https://swap.paladinfi.com/mcp
Public OpenAPI 3.0 schema✓ at /openapi.yaml
Documented rate limits✓ at paladinfi.com/swap (5 r/s + burst 30 on /v1/quote; 10 r/s + burst 30 on /mcp; 5 concurrent connections per IP)
x402 paid-tool challenge✓ on the /v1/trust-check paid endpoint. The MCP trust_check_preview tool is gated to sample-fixture output with explicit misuse banners (_real: false, _HUMAN_DO_NOT_USE_AS_REAL_VERDICT, sample- recommendation prefix) — preview by design, never a real verdict
Tool descriptions narrow + accurate✓ see mcp-tools.json for exact schemas
Browser-origin clients (CORS)✓ since v0.11.75 on /v1/quote; allowlist is paladinfi.com + www.paladinfi.com only — other origins blocked at preflight
Free real-data on-ramp endpoint✓ since v0.11.77 — POST /v1/trust-check/ofac runs the OFAC SDN wallet-screen leg only (anonymous, 1 r/s rate-limit + burst 3, daily Treasury XML refresh). Response includes _paid_endpoint_info upgrade hint to the full multi-source composition at /v1/trust-check. Wallet-OFAC scope (token-contract sanctions list planned for future versions).
MCP Registry listing✓ this package is listed as io.github.paladinfi/paladin-swap. The §4.A-clean trust-check-only variant (no payment surface, no calldata, no transaction execution) ships separately as com.paladinfi/trust-check-mcp — Streamable HTTP at trust.paladinfi.com/mcp. Use the trust-check variant when payment-surface adjacency would be a deployment blocker.

Per MCP ToolAnnotations:

  • swap_quote — title "Get Swap Quote"; readOnlyHint: true (returns calldata, never mutates server state), openWorldHint: true (calls upstream aggregators 0x AllowanceHolder + Velora Augustus v6.2 on Base)
  • trust_check_preview — title "Token Trust Check (Preview)"; readOnlyHint: true, idempotentHint: true (deterministic sample fixture per address), openWorldHint: true (paid-mode upstream factor sources cross the process boundary; defensive contract-violation handlers exist for shape drift)
  • swap_health — title "Swap Service Health"; readOnlyHint: true, openWorldHint: false (introspection of our own service state only)

Agent usage walkthrough

A representative call chain when an MCP-aware agent (e.g., Claude Code) handles a swap intent. Specific tool-call formatting varies by client; the key point is that the swap router returns ready-to-execute calldata so the agent never composes routing logic itself.

User: "Swap 100 USDC for WETH on Base."

1. Optional pre-trade trust check (free, sample-fixture only). Before composing the swap, the agent may call trust_check_preview to inspect the buy-token contract's risk shape.

json
// Tool call{  "tool": "trust_check_preview",  "arguments": {    "address": "0x4200000000000000000000000000000000000006",    "chainId": 8453  }}
json
// Response (truncated){  "_real": false,  "_HUMAN_DO_NOT_USE_AS_REAL_VERDICT": "Preview-only fixture. See README.",  "trust": {    "recommendation": "sample-allow",    "_preview": true,    "factors": [      { "real": false, "source": "ofac",      "signal": "clear" },      { "real": false, "source": "goplus",    "signal": "clear" },      { "real": false, "source": "etherscan", "signal": "verified-contract" }    ]  }}

The preview is sample-fixture only — agents must check _real === true before consuming a verdict. For production gating, call /v1/trust-check (paid, $0.001 USDC/call via x402) or use the npm plugins @paladinfi/eliza-plugin-trust / @paladinfi/agentkit-actions.

2. Competitive quote with calldata. The agent calls swap_quote to get the route + ready-to-execute transaction.

json
// Tool call{  "tool": "swap_quote",  "arguments": {    "sellToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",    "buyToken":  "0x4200000000000000000000000000000000000006",    "sellAmount": "100000000",    "taker":      "0xUserAgentWallet",    "chainId":    8453,    "slippageBps": 50  }}
json
// Response (illustrative; values depend on live pool state){  "source":           "velora",  "chainId":          8453,  "router":           "0x6a000f20005980200259b80c5102003040001068",  "calldata":         "0xe3ead59e000000000000000000000000...",  "buyAmount":        "43200000000000000",  "minBuyAmount":     "42984000000000000",  "sellAmount":       "100000000",  "gas":              "318707",  "ourFeeBps":        10,  "ourFeeRecipient":  "0xeA8C33d018760D034384e92D1B2a7cf0338834b4"}

source indicates whichever upstream aggregator (0x or Velora) delivered the higher post-fee buy amount for this pair. The 10 bps fee is already injected into the calldata; the buyAmount you see is the user's net (post-fee, pre-slippage). minBuyAmount reflects the requested 50 bps slippage tolerance.

3. Sign + submit. The agent surfaces the transaction shape to the user's wallet for signing — to=router, data=calldata, value=0 (for ERC20 → ERC20). PaladinFi never sees the signature; the wallet broadcasts the transaction directly to Base.

4. Confirm. Slippage is enforced on-chain: the swap reverts if the actual fill would deliver less than minBuyAmount. The agent reports the transaction hash; the user's wallet shows the settled buy amount on Base. The 10 bps fee transfers to the published treasury address (/health) atomically as part of the same transaction — no second on-chain step.

Non-custodial end-to-end. At no point does PaladinFi hold, sign, or move funds. The MCP server returns metadata; the wallet executes. A compromised swap router could only return calldata; even malicious calldata is bounded by the v0.11.71 outer-router + selector + 0x Settler-target allowlist (see Roadmap below) and the user's own wallet-side approval limits.

Install (REST)

No MCP needed — hit the endpoint directly:

bash
curl -sS https://swap.paladinfi.com/v1/quote \  -H 'content-type: application/json' \  -d '{    "chainId": 8453,    "sellToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",    "buyToken":  "0x4200000000000000000000000000000000000006",    "sellAmount": "5000000",    "taker": "0xYOUR_AGENT_WALLET"  }'

Full REST spec in openapi.yaml.

For free OFAC SDN wallet screening (no MCP, no key, no signup), see the drop-in cURL + React hook walkthrough at paladinfi.com/docs/screen-wallets/ — POST /v1/trust-check/ofac returns an allow or block verdict, anonymous, rate-limited at 1 r/s + burst 3.

Endpoints

MethodPathPurposePricing
GET/healthLiveness, fee config, per-source counters, decimals-cache state, last Velora canary verdict, selector-enforcement stateFree
POST/v1/quoteCompetitive route quote with calldata — highest post-fee buy amount across 0x and VeloraFree
POST/v1/trust-checkLive token-contract trust evaluation (OFAC SDN, GoPlus, Etherscan, anomaly heuristics)$0.001 USDC/call via x402
POST/v1/trust-check/previewSample-fixture preview of the trust-check response shape (no live data sources evaluated)Free
POST/mcpMCP Streamable-HTTP transport (3 tools — see mcp-tools.json)Free

Response shape (abridged)

json
{  "source": "velora",  "chainId": 8453,  "router": "0x6a000f20005980200259b80c5102003040001068",  "calldata": "0x...",  "buyAmount": "2160000000000000",  "minBuyAmount": "2138000000000000",  "sellAmount": "5000000",  "gas": "318707",  "ourFeeBps": 10,  "ourFeeRecipient": "0xeA8C33d018760D034384e92D1B2a7cf0338834b4",  "estimatedOurFeeAmount": "2160000000000",  "estimatedOurFeeToken": "0x4200000000000000000000000000000000000006"}

source is the upstream aggregator that won this quote ("0x" or "velora"). Submit the transaction as to=router, data=calldata, value=0 (for ERC20→ERC20) from taker.

Examples

Fees

A flat 10 basis points (0.1%) is taken on the buy token. The fee is calculated against the actual fill amount, not the quoted estimate, so you never pay more than expected even if the pool moves between quote and fill. PaladinFi's 10 bps is taken from the buy-token side via the upstream aggregator's integrator-fee mechanism (0x's swapFeeBps / Velora's partnerFeeBps), so the buyAmount you see in the response already reflects both any upstream protocol fee and our 10 bps — no additional deduction at fill time.

Fees route directly to the PaladinFi treasury — no on-chain receipt step on your side. The fee recipient address is published in /health so it's auditable on-chain. The /v1/quote endpoint stays free to query, with no per-call charges or spread on top. (/v1/trust-check is the only paid endpoint, at $0.001 USDC/call via x402.)

Supported assets

  • Chain: Base (8453). Ethereum mainnet, Arbitrum, Optimism, BNB are on the roadmap.
  • Tokens: Any ERC20 supported by either 0x or Velora on Base. Coverage is the union of both aggregators — canonical pairs (USDC, WETH, cbBTC, USDT, DAI, AERO) are routable on both; long-tail tokens often route on only one of the two.

Trust Check data sources

The paid /v1/trust-check endpoint evaluates a token contract against a defined set of public data sources and returns a single recommendation: "allow" | "warn" | "block" verdict alongside per-source breakdown. Sources currently consulted, with verifiability pointers:

SourceWhat it screensVerifiability
OFAC SDN list (U.S. Department of the Treasury)Sanctioned addresses (the contract itself, deployer, and known associated wallets)List refreshed daily on the hosted backend from the Treasury Sanctions List Service feed at https://sanctionslistservice.ofac.treas.gov/api/PublicationPreview/exports/SDN_ADVANCED.XML. The address dataset extracted is the union of Feature[@FeatureTypeID="345"]/FeatureVersion/VersionDetail[@DetailTypeID="1432"] entries (FeatureTypeID 345 = ETH/EVM addresses; DetailTypeID 1432 = Digital Currency Address Detail). Loaded count as of last verification: 87 ETH addresses (2026-04-30). The underlying Treasury feed is publicly downloadable so any client can independently re-derive the dataset and verify a positive match.
GoPlus Token Security APIHoneypot patterns, mint authority, ownership renouncement, transfer pause, blacklist function, anti-whale, hidden owners, slippage modifiersQueried per-call via https://api.gopluslabs.io/api/v1/token_security/8453?contract_addresses=<address>. We normalize the GoPlus response into the factors array we surface; the full GoPlus response is publicly queryable so buyers can independently audit any signal.
Etherscan / BaseScan source verification (via the unified Etherscan v2 API)Verified-source presence and proxy-pattern detection (via Proxy / Implementation fields in the getSourceCode response)Queried per-call via https://api.etherscan.io/v2/api?chainid=8453&module=contract&action=getsourcecode&address=<address>. Public source code (when verified) is independently inspectable on basescan.org.
Anomaly heuristics (PaladinFi-internal)Contract age windows (under 1h / 24h / 7d), address-kind classification (contract vs. EOA via eth_getCode), and no-outbound transaction history (nonce=0 check)Heuristic logic runs in the hosted backend module address_anomaly.py; each emitted signal (contract_age_under_*, address_kind_*, no_outbound_history) is surfaced in the response so a buyer can reproduce or override the conclusion via direct RPC calls.

Preview vs paid distinction. /v1/trust-check/preview (free) returns a static fixture with _real: false markers — none of the live data sources above are queried. /v1/trust-check (paid, $0.001 USDC via x402) consults all four. The preview exists so integrators can validate request shape and inspect the response schema without paying; agents must check the top-level _real field is true before consuming a verdict.

Request logging. Per call, PaladinFi retains a request log entry containing timestamp, the queried address, source IP, and billing/rate-limit reference. This is used for revenue accounting, rate-limit enforcement, and abuse detection — not for analytics or resale. PaladinFi does not maintain a separate database of evaluated tokens or buyer query history.

Roadmap

  • 0x Settler routing on Base
  • Highest-of-two routing across 0x and Velora on Base (v0.11.66+, 2026-05-04)
  • MCP Streamable-HTTP transport with swap_quote, swap_health, and trust_check_preview tools
  • /v1/trust-check paid endpoint via x402 ($0.001 USDC/call)
  • Per-source 4-byte calldata selector + Settler-target allowlist (v0.11.71 — defense in depth against router-substitution / dispatcher-hijack attacks)
  • Ethereum mainnet, Arbitrum, BNB, Optimism — planned
  • Permit2-native flow (skip the approve tx) — planned

Status

Production. The endpoint is live, monitored, and verified end-to-end with on-chain test transactions on Base. See /health for current fee config, version, and per-source counters.

What's in this repository

File / folderPurpose
README.mdThis file
LICENSEMIT — covers everything in this repo
SECURITY.mdVulnerability disclosure path + scope
openapi.yamlOpenAPI 3.0 spec for the public REST API
mcp-tools.jsonMCP tool schemas
examples/Working code examples (Python, TypeScript)
.github/workflows/ci.ymlCI: YAML/JSON syntax + OpenAPI 3.0 schema validation on push/PR

Not in this repository: the hosted backend (proprietary). This repo is the public client surface — install instructions, schemas, and integration code samples.

Contact

Legal

Operated by Malcontent Games LLC, doing business as PaladinFi, a Michigan limited liability company. The Service routes quotes through third-party aggregators (currently 0x and Velora). You retain custody — your agent signs every transaction. PaladinFi never holds user funds.

Use of the hosted Service is subject to the PaladinFi Terms of Service and Privacy Policy.

License

The contents of this repository are released under the MIT License. The hosted backend is proprietary and not covered.

來源:README.md,提交 a19d62b

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式必需10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Paladinfi 整合