Skip to content

API: Bebop Solana quotes are unreachable and unexecutable #12585

Description

@linear

Context

Found during review of the executable-sell-chain work. Two independent defects on the same path, both pre-dating that branch (introduced with #12502). Bebop's Solana path is the same class of problem CoW Swap was disabled for, but it is still enabled.

1 — the quote can never be reached

bebopApi.getTradeQuote dispatches on the presence of the key, not its value (packages/swapper/src/swappers/BebopSwapper/endpoints.ts:22):

return 'supportsEIP1559' in quoteInput
  ? getBebopTradeQuote(quoteInput, deps)      // evm
  : getBebopSolanaTradeQuote(quoteInput, deps)

getQuote.ts sets supportsEIP1559: false unconditionally on every quote input, so a Solana sell with swapperName: 'Bebop' routes into the EVM implementation and fails. getRates.ts adds the key only for EVM chains (...(isEvmChainId(...) && { supportsEIP1559: false })), so rates and quotes disagree: Bebop can serve a Solana rate that no client can then quote.

Not reproduced live — Bebop returned NoRouteFound / CrossChainNotSupported for the SOL pairs tried during verification, so it never offered a rate to misroute. The mechanism is plain in the code regardless.

Fix is likely to make getQuote mirror getRates and only set supportsEIP1559 for EVM sells, but the dispatch-on-key-presence pattern is the underlying fragility.

2 — even reached, it can't be executed by an API client

BebopSolanaMessageToSign (packages/swapper/src/types.ts:650) notes Bebop broadcasts by submitting the signature to their own API, keyed by the RFQ quoteId. The wire only carries solana_serialized_tx: { serializedTx }, so a partner who signs and broadcasts it directly never settles the order — and the submission would go out under our API key, not theirs.

This is the same defect CoW Swap was removed from ENABLED_SWAPPER_NAMES for.

Work

  • Fix the dispatch so Solana quotes reach getBebopSolanaTradeQuote
  • Decide the execution story: either an API-side submit step (as CoW will need), or exclude Bebop's Solana routes from /v1/swap/rates so we stop advertising a route no client can complete
  • Until one of those lands, the consistent position is to exclude the path rather than serve rates for it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions