Skip to content

Add configurable supply cap enforcement to creator key contract #997

Description

@Chucks1093

Summary

Allow creators to set a hard supply cap on their key at deployment, with the bonding curve buy function rejecting purchases that would push total supply beyond the cap.

Scope

  • supply_cap stored per key in config at deployment, optional
  • buy function checks post-trade supply against cap before execution
  • get_supply_info(key_id) — returns current supply, cap, and remaining
  • SupplyCapReached event emitted when supply hits cap exactly
  • Cap of 0 treated as unlimited

Acceptance Criteria

  • Buy blocked when post-trade supply would exceed cap
  • Buy succeeds for partial fill that exactly reaches cap
  • get_supply_info returns correct values at all supply levels
  • SupplyCapReached event emitted exactly once when cap hit
  • Cap of 0 allows unlimited supply growth

ETA

24 hours

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