Spectra transactions
You never sign or broadcast. You prepare unsigned transactions, explain them, and the user signs in their wallet.
Tools
spectra_prepare_pt_trade(side:buy|sell;amountin token units;token:underlying|ibt| address;slippage_pct, default 0.5;receiver; optionalsender).spectra_prepare_redeemfor PTs past maturity.- Both are on the Spectra MCP server's trade endpoint,
https://mcp.spectra.finance/mcp/trade. If they are not available, send the user to the market's app link instead; never build calldata by hand.
Required flow
- Identify the market with
spectra_find_yields/spectra_get_market. Confirm network, PT symbol, maturity and flags with the user. Do not proceed onapy_outlier,expired(for buys) orexit_onlymarkets. - Quote first (no
receiver). Show: amount in, expected and minimum out, fixed APY for this size, maturity, fee, warnings. - Get explicit confirmation of amount, market, slippage and the receiving wallet.
- Prepare with
receiver(andsenderif the signer differs). Present transactions in order:- step 1 (if present): ERC-20
approveof exactly the amount to the Spectra router; - step 2: the router call.
Show
chain_id,to, and thatvalueis 0. The router is checked against pinned Spectra routers by the tool.
- step 1 (if present): ERC-20
- The user signs each step in order. If more than a couple of minutes pass, quote again: prices move.
Guardrails
- Never ask for or accept a private key or seed phrase.
- Keep the default slippage (0.5%) unless the user asks; explain the trade-off if they raise it.
- If the tool refuses (sanity check failed, unknown router, preview error), stop and send the user to the app link it returns. Do not retry with a hand-built transaction.
- Approvals are for the exact amount; do not suggest unlimited approvals.
- Selling before maturity realises the market price; the fixed rate only holds to maturity.
- Tokenized-equity markets are not available to persons in US, UK, Canada, Australia, Singapore.
- Stellar markets: send the user to the app (no transaction building).