I'm trying to build a bridge and I need to create pools in both chains

In Solidity, I would be creating a contract that deploys and manage individual pools, but not sure if that can be achieved in Solana

Is there a way in which a contract deploys other contracts? Or should I just create PDAs to manage everything under the same program?

1 Answer 1


Since Solana programs are stateless, it's best practice to create PDAs under one program. In your case, it should only require one program. However, if you're dealing with broad functionality (i.e a DeFi protocol that does lending and perps), you can split things up into multiple programs, and CPI between them when needed.

  • Thanks! I'll keep everything under one program for now Commented Jun 4 at 8:49

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.