0

I've found this repository https://github.com/jup-ag/sol-swap-flash-fill

It claims that it can swap ANY SPL token for SOL. After having examined the code, though, I haven't found any place in it where a token address would be specified.

How does it work then? Is it really capable of swapping ANY token that I'll send to it provided that I've deployed the program?

P.S. Assume that there's enough of liquidity on Jupiter of a selected token

1 Answer 1

1

This program appears to be a flash loan program, so the idea is you can borrow the SOL at the start of the transaction to do any trade in the middle, as long as you repay that SOL later in the transaction.

This means that it works with any protocol, and the mints must be included in some instructions in the middle of the transaction.

8
  • where's the token address specified in it then?
    – kriss100
    Mar 18 at 2:14
  • In the other instructions in your transaction
    – Jon C
    Mar 18 at 11:51
  • Which? Will you show me an example?
    – kriss100
    Mar 18 at 12:49
  • Sure, Raydium, Jupiter, Orca, Phoenix, Openbook -- any of the trading protocols on Solana
    – Jon C
    Mar 18 at 15:32
  • Once again: WHERE is the address of a token that's exchanged is specified? In regards to the code on github I've pointed to. Will show me an example of it? The code.
    – kriss100
    Mar 18 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.