suberra / funnel-contracts

Funnels are smart contracts that enforces renewable allowance as a proxy
MIT License
9 stars 0 forks source link

[Experiment] Implement an alternative Factory with Clones #1

Closed zlace0x closed 2 years ago

zlace0x commented 2 years ago

Current factory uses solmate's CREATE3 function to deploy a bare minimal proxy that is dependent only on salt & msg.sender (factory itself)

An alternative is to use OZ's clone library to cheaply clone a proxy to an implementation.

Required changes:

Reference: https://github.com/ourzora/faucets

zlace0x commented 2 years ago

image Before clones

zlace0x commented 2 years ago

After clones

image