We are delegating the fee estimate at quote time to jupiter as they are building the TX instructions, it's safer and more opti in term of execution time
We need to use the wrapped SOL assetId instead of the SOL, jupited is unwrapping and wrapping directly in their program
Added affiliate fees account and BPS
⚠️ Waiting for the DAO fee address for affiliate
Issue (if applicable)
closes #8017
Risk
High because swapper but behind a feature flag
High Risk PRs Require 2 approvals
What protocols, transaction types, wallets or contract interactions might be affected by this PR?
Testing
Try to do a swap from SOL to any SPL token
Try to do a swap from SPL to SPL
Try to do a swap from SPL to SOL
Try all of those but with a manual receive address (SPL to SOL shouldn't provide a quote because it's not effectively supported by Jupiter (it leave some wSOL in the receive address which is not acceptable for us))
Please try to swap to fresh accounts, and send again so it already have an associated token account, it's 2 different mechanisms, also try to swap a token you never had in your wallet
Try to swap some Token2022 tokens too (catwifhat is one of those), specially with a manual receive address
Smoke test swapper but shouldn't change anything to the rest
Engineering
n/a
Operations
n/a
[x] :checkered_flag: My feature is behind a flag and doesn't require operations testing (yet)
Description
Implementing the Jupiter swapper:
Issue (if applicable)
closes #8017
Risk
High because swapper but behind a feature flag
Testing
Engineering
n/a
Operations
n/a
Screenshots (if applicable)
SOL to SPL
SPL to SOL
https://jam.dev/c/ce54f3bb-43f1-4e1f-9f44-c8b44a19fb73
SPL to SPL
⚠️ It was a high volatility SPL token, I had to increase the slippage tolerange https://explorer.solana.com/tx/3jfq6B3z44Y7ffJxfVm2wRAKFJMba8fANUitHSguzmiKgb8NYfyRfWRHyqvokxHbRe8Qi5mUyuESoAuUEZzwTau5
https://jam.dev/c/16c8e5f0-d5e2-4530-865b-b324a6980e25
TX history
Txs links
https://explorer.solana.com/tx/23xAVVo18sgD2ykyqH5Kx9C37j6bLNjbFXi2rRW4ge5YArm1ywsTFGXKzSRmAQV6Dx13GnXZP5W7f1UNjmrAqDau https://explorer.solana.com/tx/5k2r33Dd2oPKf5NESmQZz2G2fQ23wSy7xfL82PhCKwZuT5kojmynuHrVDy3uzhsf2UFq13wKjcvJMr61cdsGDGBL https://explorer.solana.com/tx/2ucg29ZHH58uVZ9MCbE3VCCfwgHVdcozcxG4NfELDmTQTew4T6HQKh6E8eBx7Xr12K2xjZEEHpHDfdi1fQxg7Tyv https://explorer.solana.com/tx/4XgfBYeqrn5pq2vTGmYrktYmgii1EiUXR7vZNzmULNNQgePMQVMKZsVWPbChURtUrYN9w8cD2aFteVtP1fCet8LV