Roadmap

Make Metis Swaps CPI Compatible

Hey Jup team,

I’d love to request a feature (or flag/option) in the Metis API that allows swaps to be returned in a format suitable for use inside a CPI call.

Right now, Metis returns versioned transactions that rely on Address Lookup Tables. While that’s great for optimization in general usage, it unfortunately makes the routes incompatible with CPI, since ALTs can’t be used inside CPI instructions. Rebuilding the swap manually from a quote is possible, but in most cases the full route exceeds Solana’s CPI instruction size limits (1232 bytes), making it an impractical solution

My Request:

It would be incredibly valuable to have a CPI-safe mode that:

  • Returns an optimized Metis route that does not rely on ALTs

  • Keeps account sizes and instructions within CPI byte limits

  • Can be toggled via something like a ?cpiSafe=true param or similar

The whole power of Metis is in its deep route optimization and reliability, so the goal here isn’t to fall back to less efficient swaps, it’s to make the same power available to smart contract devs like myself who rely on PDAs and CPI for fully automated transactions (i.e. no user signature flow).

Thanks!