Skip to content

Add o1.exchange trading plugin#70

Open
JerryPan2718 wants to merge 2 commits into
base:masterfrom
JerryPan2718:06-02-o1.exchange_mcp_plugin
Open

Add o1.exchange trading plugin#70
JerryPan2718 wants to merge 2 commits into
base:masterfrom
JerryPan2718:06-02-o1.exchange_mcp_plugin

Conversation

@JerryPan2718
Copy link
Copy Markdown

Summary

  • Adds a new Base MCP plugin for the o1.exchange trading API
  • Supports token swaps on Base and BSC via http-api integration → send_calls
  • Includes Bearer token auth, MEV protection, optional Permit2 gasless approvals, and slippage controls

Test plan

  • Verify frontmatter conforms to plugin-spec.md (chains, integration type, risk tags, auth)
  • Confirm api.o1.exchange is reachable and /order endpoint returns expected unsigned tx shape
  • Validate send_calls mapping: { to, data, value } from unsigned object, gasLimit/chainId stripped
  • Test example prompts end-to-end on Base with a real API token

🤖 Generated with Claude Code

JerryPan2718 and others added 2 commits June 2, 2026 16:19
@cb-heimdall
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 1
Sum 2

Copy link
Copy Markdown
Collaborator

@stephancill stephancill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission. The documented endpoints resolve and the response shapes match, but the Permit2 signing flow has a blocking issue:

Required

  • The Permit2 flow string-replaces a fixed 65-byte SIGNATURE_PLACEHOLDER in unsigned.data with the signature. This only holds for EOA signatures. Base smart-account signatures (ERC-1271/6492) are variable-length (unbounded; >200 bytes in practice) and the signature is ABI-encoded as a dynamic bytes field with a length prefix and offset. Splicing such a signature into a fixed 65-byte slot produces malformed calldata, so the flow fails for smart-contract wallets — the common Base account type. Encode the signature as dynamic bytes (and support ERC-1271 verification), or have the build endpoint accept the signature and re-encode server-side.

Minor

  • Submitting the order through send_calls bypasses o1's /order/complete private-mempool relay, so mevProtection does not apply to these submissions. State this so it isn't presented as MEV-protected.
  • The API-token URL is inconsistent across sections; use the one that resolves.
  • ## Auth should document token lifetime/refresh, and ## Submission should state the value hex-wei contract.
  • Consider adding low-liquidity to risk for arbitrary-token / pool-targeted trades.

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.

3 participants