Skip to content

feat: replace hardcoded Uniswap API key with per-operator developer-portal key#145

Open
Ponx wants to merge 1 commit into
base:masterfrom
Ponx:claude/uniswap-api-key-auth-826805
Open

feat: replace hardcoded Uniswap API key with per-operator developer-portal key#145
Ponx wants to merge 1 commit into
base:masterfrom
Ponx:claude/uniswap-api-key-auth-826805

Conversation

@Ponx

@Ponx Ponx commented Jul 9, 2026

Copy link
Copy Markdown

Why

The Uniswap plugin shipped a shared, hardcoded x-api-key in ## Auth. This is counter to Uniswap's legal posture and operationally fragile:

  • A public key lets anyone call the API without being bound to Uniswap's developer terms (they never accept anything).
  • All usage pools onto one key's RPS budget, so any single user can starve the rest.
  • A public key predictably accumulates spam traffic.

The fix is to have each operator generate their own free key on the Uniswap developer portal, which binds their usage to the terms and scopes rate limits to them.

What changed

skills/base-mcp/plugins/uniswap.md:

  • Removed the hardcoded key; the header block now uses a <UNISWAP_API_KEY> placeholder (also required by the plugin spec — no secret values in plugin files).
  • Rewrote ## Auth:
    • "Obtaining a key" flow → sign up at https://developers.uniswap.org/dashboard/welcome (Google/GitHub/email); account creation auto-generates a key.
    • Two completion paths: operator-driven (default — prompt the human for their key) and agent-driven (only when the harness controls both a browser and an inbox, it may register itself and read the key from the dashboard).
    • Key-handling rules: prefer a harness secret/env var, paste the key in full, never echo/log it or place it in send_calls calldata, one key per operator.
  • Added a second > [!IMPORTANT] onboarding callout flagging the key as a prerequisite, plus a Notes pointer to the portal.
  • Bumped version 0.2.0 → 0.3.0.

skills/base-mcp/SKILL.md:

  • Updated the Uniswap catalog row to note the free developer-portal API-key requirement. (Maintainer-managed file — included for catalog accuracy; happy to drop if reviewers prefer the diff scoped to the plugin file.)

Notes for reviewers

  • Header name (x-api-key) and the auto-generation-on-signup flow were confirmed against Uniswap's Trading API quickstart / overview. The exact post-signup dashboard UI is behind auth and was not directly verified.

🤖 Generated with Claude Code

@cb-heimdall

cb-heimdall commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

…ortal key

The plugin shipped a shared, hardcoded x-api-key. A public key lets anyone
call the API without being bound to Uniswap's developer terms, and pools RPS
across everyone while attracting spam. Direct each operator to generate their
own free key on the Uniswap developer portal instead.

- Remove the hardcoded key; use a <UNISWAP_API_KEY> placeholder
- Rewrite ## Auth: portal sign-up flow (auto-generates a key), operator-driven
  (default) vs agent-driven (browser + inbox) completion paths, and key-handling
  rules (prefer secrets, paste in full, never echo/log or put in calldata)
- Add an onboarding IMPORTANT callout and a Notes pointer to the portal
- Note the API-key requirement in the SKILL.md plugin catalog row
- Bump plugin version 0.2.0 -> 0.3.0

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Ponx Ponx force-pushed the claude/uniswap-api-key-auth-826805 branch from 5ab6d28 to 16bf34c Compare July 9, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants