You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DeFi protocol coverage is currently O(N) in implementation effort: every new protocol (Compound, Aave, Curve, Morpho, Kamino, MarginFi, Lido, Rocket Pool, EigenLayer, Marinade, Jito, …) requires bespoke prepare_* tools per action. Phase 2/3 added ~30 tools across 10+ protocols, each with its own ABI handling, parameter validation, slippage logic, and pre-sign annotations. The cost compounds:
Every new protocol = N new tools (supply / withdraw / borrow / repay / claim …).
The catalog grows past what the agent can reasonably load (token cost — see #).
Alternative to research
Expose a generic transaction-handling tool — call it prepare_arbitrary_call or extend prepare_custom_call — and let the user's cooperating agent write a small script per protocol on demand. The MCP would supply:
ABI fetching (get_contract_abi exists).
Read helpers (read_contract exists).
A signing-grade prepare_arbitrary_call(to, data, value, chainId, gasParams?) that runs the same pre-sign invariants the per-protocol tools run.
Optional templates / library code the agent can adapt.
The agent then composes the protocol-specific tx itself — fetch the pool address, encode the calldata, hand the unsigned tx to the MCP for invariant-checked signing.
UX: per-protocol tools give the user a clear name in the audit log (prepare_aave_supply). Generic-call shows opaque calldata. Does that meaningfully erode the trust UI?
Comparable systems: how does Safe app, Rabby, MetaMask Snaps, or Phantom's signing flow handle the long tail? Anyone using a generic-call + agent-script pattern in production?
Threat model delta: an agent-authored script is in-context — a rogue agent already gets to choose the calldata in either model. The trust boundary stays at Ledger clear-sign + MCP invariants. Confirm or refute.
Deliverable
A short design note (not code): recommend (a) status quo, (b) full generic-call pivot, (c) hybrid with a clear cutoff rule. Cite which existing MCP scaffolding already covers the generic path.
Scope
Research only. Do not implement until the design is decided.
Problem
DeFi protocol coverage is currently O(N) in implementation effort: every new protocol (Compound, Aave, Curve, Morpho, Kamino, MarginFi, Lido, Rocket Pool, EigenLayer, Marinade, Jito, …) requires bespoke
prepare_*tools per action. Phase 2/3 added ~30 tools across 10+ protocols, each with its own ABI handling, parameter validation, slippage logic, and pre-sign annotations. The cost compounds:Alternative to research
Expose a generic transaction-handling tool — call it
prepare_arbitrary_callor extendprepare_custom_call— and let the user's cooperating agent write a small script per protocol on demand. The MCP would supply:get_contract_abiexists).read_contractexists).prepare_arbitrary_call(to, data, value, chainId, gasParams?)that runs the same pre-sign invariants the per-protocol tools run.The agent then composes the protocol-specific tx itself — fetch the pool address, encode the calldata, hand the unsigned tx to the MCP for invariant-checked signing.
Questions to research
prepare_custom_callalready meet this need, or is its current refusal surface too narrow / too wide? What gates would need to relax / tighten? (Curve allowlist saga from feat(pre-sign): approve-allowlist as security recommendation (closes #617) #618 / fix(curve-swap): destination-allowlist ack on swap leg (closes #626) #628 is relevant — generic-call is harder to apply pool-specific allowlists to.)prepare_aave_supply). Generic-call shows opaque calldata. Does that meaningfully erode the trust UI?Deliverable
A short design note (not code): recommend (a) status quo, (b) full generic-call pivot, (c) hybrid with a clear cutoff rule. Cite which existing MCP scaffolding already covers the generic path.
Scope
Research only. Do not implement until the design is decided.