Skip to content

[Bug][Contract] RemittanceNFT Mint and AdmRemint events emit unclamped initial score #2000

Closed

Description

@blurbeast

Issue #120

RemittanceNFT Mint and AdmRemint Events Emit Unclamped Initial Score

  • Title: [Bug][Contract] RemittanceNFT Mint and AdmRemint events emit unclamped initial score
  • Labels: bug, contracts, nft, smart-contract, good first issue
  • Location: contracts/remittance_nft/src/lib.rs:677-695, 771-790
  • Description:
    In both RemittanceNFT::mint (line 678) and RemittanceNFT::admin_remint (line 772), the stored credit score is clamped to [300, 850] via initial_score.clamp(Self::MIN_CREDIT_SCORE, Self::MAX_SCORE). However, the emitted events at line 694 ((Symbol::new(&env, "Mint"), user)) and line 789 ((Symbol::new(&env, "AdmRemint"), user)) publish (initial_score, recipient_commitment) using the raw unclamped initial_score parameter instead of metadata.score.
  • Impact:
    If mint or admin_remint is called with an out-of-bounds initial_score (e.g., 100 or 950), on-chain state stores 300 or 850, while the emitted event reports 100 or 950 to off-chain indexers.
  • Suggested Fix:
    Publish (metadata.score, recipient_commitment) instead of (initial_score, recipient_commitment) in both mint (line 694) and admin_remint (line 789), and add a test asserting the emitted event payload when initial_score < 300.

Activity

  1. added
    bugSomething isn't working
    contractsIssues related to smart contracts
    nftNFT functionality
    on Oct 18, 2026
  2. rupesh-kumar-sah commented on Oct 18, 2026

    @rupesh-kumar-sah

    Hi maintainers,

    I reviewed "[Bug][Contract] RemittanceNFT Mint and AdmRemint events emit unclamped initial score" and have a structured approach ready for implementation:

    I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.

    I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.

    Thank you!

  3. Talentgift24-ux commented on Oct 21, 2026

    @Talentgift24-ux

    @Talentgift24-ux has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    i would love to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Talentgift24-ux to this issue.

  4. mimi-esc commented on Oct 21, 2026

    @mimi-esc

    @mimi-esc has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello maintainer, I can work on this issue and submit PR within 1-2 days, please assign this to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @mimi-esc to this issue.

  5. Yemmy88 commented on Oct 21, 2026

    @Yemmy88

    @Yemmy88 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi Maintainer,
    Please, assign it to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Yemmy88 to this issue.

  6. kanuemmanuel commented on Oct 21, 2026

    @kanuemmanuel

    @kanuemmanuel has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainer, kindly assign

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @kanuemmanuel to this issue.

  7. Topmatrixmor2014 commented on Oct 21, 2026

    @Topmatrixmor2014

    @Topmatrixmor2014 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    i would love to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Topmatrixmor2014 to this issue.

  8. YoungBoss04 commented on Oct 21, 2026

    @YoungBoss04

    @YoungBoss04 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi Maintainer, I've studied the issue closely and understand the outcome you're after. I can deliver a solution that satisfies the requirements, and I'd be grateful for the assignment.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @YoungBoss04 to this issue.

  9. deborahogunjinmi592-byte commented on Oct 22, 2026

    @deborahogunjinmi592-byte

    @deborahogunjinmi592-byte has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainer
    Good day
    I've reviewed this issue and I know I can fix it to your satisfaction if I'm assigned

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @deborahogunjinmi592-byte to this issue.

  10. Marvellous805 commented on Oct 22, 2026

    @Marvellous805

    @Marvellous805 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi I can fix this

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Marvellous805 to this issue.

  11. bamiebot-maker commented on Oct 22, 2026

    @bamiebot-maker
    Contributor

    @bamiebot-maker has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi team! 🦊 I'm ready to tackle this task. My technical background aligns well with this issue, and I can have a clean, tested Pull Request ready for review within your expected timeframe. Please let me assign me so I can begin

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @bamiebot-maker to this issue.

  12. drips-wave commented on Oct 22, 2026

    @drips-wave

    Congratulations, @bamiebot-maker! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @bamiebot-maker: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  13. added a commit that references this issue on Oct 26, 2026
  14. grantfox-oss commented on Oct 26, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @bamiebot-maker's PR #2174 was approved and merged by @K1NGD4VID.

    🏆 @bamiebot-maker: You earned 40 FoxPoints for this contribution! Your current tier: Builder (2,268 total points). Track your full progress on GrantFox.

    👏 Great work, @bamiebot-maker! Keep contributing to LabsCrypt.

  15. drips-wave commented on Oct 26, 2026

    @drips-wave

    This issue has been completed by @bamiebot-maker as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @bamiebot-maker: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

  16. added a commit that references this issue on Oct 29, 2026
    4e24320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingcontractsIssues related to smart contractsgood first issueGood for newcomersnftNFT functionalitysmart-contractSoroban smart contract

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions