Do we need a proxy for cheaper deployment?

Should we use a minimal proxy to deploy similar vaults on-chain? This approach reduces deployment costs for repetitive contracts (e.g., vaults) by keeping the majority of core functionality within a single implementation contract.

1 Like

Hey @eesheng, yes, a minimal proxy can be an effective approach for deploying similar vaults on-chain and reducing deployment costs. You’d need to deploy a proxy contract that delegates calls to a single implementation contract. That will enable you to reuse the core functionality across multiple instances.

1 Like

@eesheng what type of “vault” are you building?

It’s generally encouraged to use “singleton” patterns in Fuel, instead of deploying many duplicated smart contracts (which is common in the EVM).

Hi @david, we want to build a yield optimizer. What do you mean by singleton?

A singleton means that only a single contract is needed, as opposed to multiple contracts.

For example, Uniswap V1, V2 & V3 use a “factory” model, where each pool is a separate smart contract. By contrast, Uniswap V4 uses a “singleton” model with only a single smart contract.

1 Like

Would it be advised to use a Singleton contract since we can deploy same contracts multiple times but with different assets using scripts?