Integration engineering

Treat proprietary AMM liquidity as a source capability

Represent proprietary AMM sources by documented routing and execution capabilities instead of assuming constant-product behavior.

A proprietary AMM label does not tell an adapter how to price, encode or simulate that source. Treat the source as a documented capability of the routing engine and preserve the provider's execution data.

The PancakeSwap Unified API payload reference includes propamm_pcs among pool-family values. That field identifies a route component; it is not a complete mathematical specification of the source.

Avoid reconstructing prices from the label

Do not infer constant-product reserves, a public liquidity-token interface or a static fee just because the response calls something a pool. Use the quote engine's documented output and encoding flow. If your product independently verifies source economics, it needs source-specific interfaces and assumptions.

Keep display labels separate from operational capabilities. A route can be understandable to users without the frontend implementing every source's pricing model.

Preserve source-specific data

Pass required route metadata unchanged to the matching builder. Generic normalization should extract common display fields without deleting unfamiliar fields that construction may require.

Document whether the route depends on current contract state, signed quotes, time limits or another source-specific condition. Do not equate all proprietary AMM routes with RFQ orders or assume that every such source has the same expiry semantics.

Gate supported execution

If your adapter cannot build or validate a newly returned source type, mark that capability unsupported and request a documented alternative if available. Do not cast the source to a familiar AMM family to get past a type checker.

Simulate the completed route in the intended account context and retain the source identifiers in diagnostics. Simulation can catch execution failures but does not explain the source's economic design.

A useful fixture introduces an unknown pool family with otherwise valid amounts. The display may retain a generic source label, while execution remains gated until the builder and validation policy explicitly support it.

Sources & verification (1)

Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.

  1. Response payloads

    Candidate response shapes

    https://developer.pancakeswap.finance/contracts/unified-swap-api/payloads

Continue reading

Swap API integration: quote, approve, simulate, submit