8.3 Customizing Token Deployment
By default, the TokenFactory uses a standard ERC-20 for tokens. If you want all tokens to have certain features (for example, a deflationary burn on each transfer, or a maximal supply limit, etc.), you can:
-
Modify the ERC-20 template contract (the one TokenFactory deploys) to include that logic. If you add transfer fees or deflationary mechanics, it might interact in unexpected ways with the bonding curve (the price formula doesn’t account for tokens being burnt later or removed from supply by transfers).
-
If you want to allow the token creator (user) to have some input (like choosing a supply cap or initial price), you can modify the
createTokenfunction to accept parameters and perhaps store them in a struct for that token. For instance, a user might choose an initial price multiplier (a) if you allow it, or choose a different end threshold for their token. This would increase complexity as now each token could have different curve params – you’d need to store a and b per token and use those in calculations (instead of global constants).