Skip to content

Add a graduated bonding curve that switches steepness at configurable supply milestones #829

Description

@Chucks1093

Summary

The current bonding curve has a single exponent applied across the entire supply range. A graduated curve that applies a steeper exponent above configurable supply milestones would allow creators to design a pricing curve that starts accessible and becomes more exclusive at higher supply levels.

Scope

  • Add configure_graduated_curve(key_id: BytesN<32>, milestones: Vec<(u32, u32)>) callable by the key creator
  • Each milestone is a (supply_threshold, exponent) pair; exponents must be between 1 and 5
  • In the buy price calculation, select the exponent corresponding to the current supply level
  • Apply the milestone config before any keys are sold; panic with CurveAlreadyActive if sales have started
  • Emit a graduated_curve_configured event with all milestone pairs

Acceptance Criteria

  • Correct exponent applied at each supply tier
  • Buy at supply below the first milestone uses the base exponent
  • Exponent steps up correctly at each configured milestone threshold
  • Configuration after sales have started panics with CurveAlreadyActive
  • graduated_curve_configured event emitted with all pairs

ETA: 24 hours


Coordinate on Telegram

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions