Context: For Solana smart contract development, we normally store state in PDA because the program is stateless. eg. For ERC20 token, you need to deploy a new contract for every token while for solana SPL token, the token Program only need to be deployed once (by the Solana core dev), and every new token created by initiating token mint account.
When does it makes sense to deploy Program for every new instance?
Question: For Wormhole Crosschain tokens (Native Token Transfer), for each crosschain token, we need to deploy a new Program Binary. Why do we need to do this?
https://github.com/wormhole-foundation/native-token-transfers/issues/595
Some potential rationale:
- Security isolation - Each token's logic runs in a separate program instance
- Simplified upgrades - Tokens can be upgraded independently
- Cleaner permissions - Each token has its own mint/custody authorities
Do these make sense ever in Solana contract development?