Skip to content

[Giveaway] Replace public distribution with winner claim lifecycle #405

Description

@3m1n3nc3

Description

The README describes a winner claim flow, but the current contract exposes distribute_prize() and sends the prize directly once the giveaway becomes claimable. Add an explicit winner-driven claim flow with clearer lifecycle semantics.

User Story

As a Winner,
I want to claim my prize explicitly,
so that giveaway completion matches the product flow and supports future claim windows or proof steps.

Requirements and Context

  • Files / refs: contracts/geev-core/src/giveaway.rs, contracts/geev-core/src/test.rs, contracts/README.md
  • Add claim_prize behavior that requires winner authentication
  • Distinguish winner selection from prize claiming in status transitions
  • Migrate or replace the current distribute_prize() path with explicit claim semantics
  • Preserve fee accounting and reputation updates

Suggested Implementation

1. Keep pick_winner focused on selecting the winner and setting Claimable state
2. Add claim_prize(winner, giveaway_id)
3. Require winner auth before transferring net prize
4. Mark giveaway Completed only after successful claim

Acceptance Criteria

  • Only the selected winner can claim the prize
  • Winner selection and payout are separate contract actions
  • Fee accounting and reputation updates still occur on successful payout

Submission Guidelines

  • Branch: feat/giveaway-claim-flow
  • Depends on: None
  • PR: feat(giveaway): add explicit winner claim lifecycle

Activity

  1. added theissue type on Jul 23, 2026
  2. mxrtins04 commented on Jul 23, 2026

    @mxrtins04

    Hi maintainer, can i be assigned this issue pleasee?

  3. added
    GrantFox OSSIssue tracked in GrantFox OSS
    Maybe RewardedIssue may be eligible for a GrantFox reward
    and removed
    Maybe RewardedIssue may be eligible for a GrantFox reward
    GrantFox OSSIssue tracked in GrantFox OSS
    on Aug 17, 2026
  4. Kaylahray commented on Aug 27, 2026

    @Kaylahray
    Contributor

    Hi Maintainer, Please assign to me

  5. grantfox-oss commented on Aug 27, 2026

    @grantfox-oss

    🦊 GrantFox — @Kaylahray has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #405)
    2. Your PR will be reviewed by the geevapp maintainers

    Good luck! Track your progress on GrantFox.

  6. grantfox-oss commented on Aug 28, 2026

    @grantfox-oss

    🦊 GrantFox — @mxrtins04 has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #405)
    2. Your PR will be reviewed by the geevapp maintainers

    Good luck! Track your progress on GrantFox.

  7. Birdmannn commented on Aug 28, 2026

    @Birdmannn
    Contributor

    gm gm dev. i’m pascal and i have experience working with soroban smart contracts. eta: 5 hours

  8. grantfox-oss commented on Aug 29, 2026

    @grantfox-oss

    🦊 GrantFox — @Birdmannn has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #405)
    2. Your PR will be reviewed by the geevapp maintainers

    Good luck! Track your progress on GrantFox.

  9. grantfox-oss commented on Aug 30, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @Birdmannn's PR #447 was approved and merged by @3m1n3nc3.

    🏆 @Birdmannn: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (281 total points). Track your full progress on GrantFox.

    👏 Great work, @Birdmannn! Keep contributing to geevapp.

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions