
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
概览
一个远程 MCP 服务器,为 AI 智能体提供 Base 链上代币兑换报价和可直接执行的 calldata,另含示例信任预览与健康检查。
- 可以做什么
- 获取跨两个上游聚合器的竞争性兑换报价,返回路由地址、calldata、最低买入量和已注入的 10 个基点费用,供智能体钱包在 Base(链 ID 8453)上签名并提交。查看示例固定数据的代币信任预览,结果始终带非真实标记和 sample- 前缀的建议。检查服务健康状态、费用配置、各来源计数器和金丝雀状态。
- 适用场景
- 适合需要让智能体在 Base 上准备 ERC20 兑换、又不想自行编写聚合器、滑点和费用逻辑的场景,且由用户自己的钱包签名并广播交易。不适合作为生产环境的信任筛查,因为预览工具只返回示例数据。
- 运行要求
- 需要远程 Streamable-HTTP 端点;未声明需要安装软件包、API 密钥或环境变量。客户端须支持 Streamable-HTTP 传输。实际执行兑换需要能在 Base 上签名并提交交易的钱包。存在速率限制(MCP 端点 10 次/秒加突发,每 IP 5 个并发连接)。
安装
在 SourceWeft 中
- 打开 控制台中的 Paladin Swap,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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:
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 isreal: false, and the recommendation is prefixedsample-(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
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.
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.
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:
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
Response shape (abridged)
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
examples/python/quote_and_swap.py— Python with web3.pyexamples/typescript/quote_and_swap.ts— TypeScript with viem
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:
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, andtrust_check_previewtools -
/v1/trust-checkpaid 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
Not in this repository: the hosted backend (proprietary). This repo is the public client surface — install instructions, schemas, and integration code samples.
Contact
- Email: [email protected]
- Marketing: paladinfi.com
- API: swap.paladinfi.com/health
- Landing: paladinfi.com/swap/
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版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式必需10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分