1

Can I use any package to create the DEX on Solana, or do I have to deploy the Rust contract and then use those contracts for my own DEX?

1 Answer 1

2

I don't think there are packages that allow you to create a dex on the fly. But there are some ways to go about this.

  1. You can use existing dex's apis and just create a frontend. You won't be able to set any additional fee, its all from the dex themselves. For eg. Jupiter as good docs for their swap apis Jup.ag Api Docs etc

  2. Or you can use example opensource projects like the one from solana and deploy it your self https://github.com/solana-labs/dexterity or https://github.com/openbook-dex/program (by Jon C) .

  3. Write a wrapper program around the existing dex programs, basially what jupiter is doing as an aggregator.

If you are a beginner I would suggest you to understand the workings using the existing dex apis and build things around it. Once you are aware of what you are doing you implement dex on solana programs yourself.

6
  • Thanks Bharath for your reply. Can I use the Serum package as well? Essentially, I want to create a DEX with AMM and CLMM functionalities, just like a replica of Raydium.
    – Bobz
    Commented Feb 15 at 7:47
  • Serum looks abandoned though you can use it as a ref at your own risk.
    – Bharath
    Commented Feb 15 at 8:13
  • 1
    So, would Jupiter API be suitable for creating the complete DEX?
    – Bobz
    Commented Feb 15 at 8:28
  • Yes, but you need to write your own frontend with wallet connector for that. You can reuse Serum's UI and do some updates. That should mostly do the trick.
    – Bharath
    Commented Feb 15 at 8:31
  • 1
    To add on to the great answers, the openbook (formerly serum) source code is available at github.com/openbook-dex/program
    – Jon C
    Commented Feb 23 at 22:33

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.