Memetroplis ProductionGuideReference

8.1 Adjusting Bonding Curve

For Deverlopers

8.1 Adjusting the Bonding Curve

If you want to change the bonding curve parameters or formula:

  • Changing $a$ or $b$: In the current design, $a$ and $b$ might be constants defined in the TokenFactory or library. You can modify these to tweak how fast price grows. For example, using a smaller $b$ yields a gentler curve (more tokens will be sold for the same price increase). Ensure any change still achieves your target cap. You might add constructor parameters for $a$ and $b$ if you want different tokens to have different curves.

  • Different Curve Shapes: You could replace the exponential curve with a different formula entirely (like a linear or polynomial curve). This would involve changing the

    TokenFactoryHelper

    calculations. For instance, a linear curve $P = m S + c$ would use cost = m2[(S+ΔS)2−S2]+c⋅ΔS \frac{m}{2}[(S+\Delta S)^2 - S^2] + c \cdot \Delta S2m​[(S+ΔS)2−S2]+c⋅ΔS. Keep in mind different curves have different behaviors; test thoroughly if you do this. The code is structured so that much of the logic (events, cross-chain) remains the same if the price function changes – only the math library would differ.

  • Adding Fees or Taxes: If you want the protocol to take a fee from each buy or sell (for revenue or burning, etc.), you can modify the buy/sell functions to take a percentage of the base currency or of the tokens. For example, you could send X% of the ETH to a fee address instead of into the bonding curve pool. Be careful with cross-chain – you’d need to coordinate fee logic across chains too.

8.2 Multi-Chain Expansion