Skip to content

Conversation

@urnotsam
Copy link
Contributor

@urnotsam urnotsam commented Aug 5, 2025

PR Type

Enhancement


Description

  • Deducts burned supply from circulating supply calculation

  • Adds burnedSupply parameter to configuration


Changes walkthrough 📝

Relevant files
Enhancement
index.ts
Add burnedSupply parameter to configuration                           

src/config/index.ts

  • Introduced new burnedSupply parameter in config
  • Set default burned supply to 500,000 SHM
  • +1/-0     
    supplyStats.ts
    Subtract burned supply in circulating supply calculation 

    src/stats/supplyStats.ts

  • Updated circulating supply formula to subtract burned supply
  • Now deducts config.burnedSupply from circulating supply
  • +1/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link
    Contributor

    github-actions bot commented Aug 5, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🏅 Score: 85
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Circulating Supply Calculation

    The new calculation for circulatingSupply subtracts both totalShmBurned and config.burnedSupply. Review to ensure this does not result in double-counting burned supply, as both may represent overlapping values.

    const circulatingSupply = BASE_SUPPLY - totalShmBurned + totalShmRewarded - secureAccountsBalance - config.burnedSupply
    Hardcoded Burned Supply

    The burnedSupply value is hardcoded in the config. Consider whether this should be configurable via environment variables or external sources for flexibility and maintainability.

    burnedSupply: 500000, // 500,000 SHM burned

    const secureAccountsBalance = await calculateSecureAccountsBalance()

    const circulatingSupply = BASE_SUPPLY - totalShmBurned + totalShmRewarded - secureAccountsBalance
    const circulatingSupply = BASE_SUPPLY - totalShmBurned + totalShmRewarded - secureAccountsBalance - config.burnedSupply
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggestion: Subtracting both totalShmBurned and config.burnedSupply may result in double-counting burned supply if totalShmBurned already includes the value from config.burnedSupply. Ensure that totalShmBurned and config.burnedSupply are mutually exclusive to avoid underreporting circulating supply. [possible issue, importance: 7]

    Suggested change
    const circulatingSupply = BASE_SUPPLY - totalShmBurned + totalShmRewarded - secureAccountsBalance - config.burnedSupply
    // Ensure totalShmBurned does not already include config.burnedSupply to avoid double-counting
    const circulatingSupply = BASE_SUPPLY - (totalShmBurned + config.burnedSupply) + totalShmRewarded - secureAccountsBalance

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

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants