You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The BondFactory uses a naive approach, that deploys a new Bond contract every time. Another approach is to instead create a clone.
Clones reduce the initialisation cost, but slightly increase general call costs. This means with volume there's a turning point where the cost saving of the deploy pales in comparison to additional cost to each call.
Create a comparison table between the naive and clone versions of the Bond through different version of the BondFactory.
q) What is the turning point? How many guarantors are needed to warrant a naive approach?
q) Should both a naive and clone factory be provided? (as the costs are pushed onto different actors, deploy is the admin/treasury and usage the community)
happy to take this one on after the initial bond contract is merged :) I know berlin increased the costs of this but I remember when I was looking at the uniswap clone factory post-berlin the tipping point was ~1000 interactions. Ours should be less due to smaller bytecode size but will be fun to look into.
I'm not certain of the best/quickest method for measure the gas, although I have noticed that a HardHat node can be run with config that outputs the transaction details (includig gas cost logged config exmaple. )
There are also additional option for setting the hardfork, creating a script that deploys to a HardHat node could be an option, but it's entirely your call 🙂
Feature Description
The
BondFactory
uses a naive approach, that deploys a newBond
contract every time. Another approach is to instead create a clone.Clones reduce the initialisation cost, but slightly increase general call costs. This means with volume there's a turning point where the cost saving of the deploy pales in comparison to additional cost to each call.
Create a comparison table between the naive and clone versions of the Bond through different version of the BondFactory.
q) What is the turning point? How many guarantors are needed to warrant a naive approach?
q) Should both a naive and clone factory be provided? (as the costs are pushed onto different actors, deploy is the admin/treasury and usage the community)
Additional Information
OpenZepplin Clones
OpenZepplin Cones examples
The text was updated successfully, but these errors were encountered: