Skip to content

[QuestEngine] Deliver uncapped staking multiplier payouts #87

Description

@Kaylahray

Description

The current Build Quest approval flow fetches the learner staking multiplier but caps the boosted payout back down to the post-fee base amount. This issue makes the multiplier produce a real boosted payout.

User Story

As a Staker,
I want to receive a real boosted payout on approved Build Quests,
so that staking yields higher B2B rewards rather than only computing a capped value.

Requirements and Context

  • Files: contracts/quest-engine/src/lib.rs, contracts/quest-engine/src/test.rs
  • In review_submission, keep the 15% platform fee logic and compute the boosted learner amount from the post-fee base amount
  • Remove the current cap that forces the final learner transfer back to base_learner_amount
  • Define the funding rule explicitly: either employers must escrow enough to cover possible boosted payouts, or the boost delta must come from a separate approved source
  • Preserve basis-point math semantics from StakeVault::get_multiplier

Suggested Implementation

// IN FUNCTION: review_submission (Approval Logic)
// 1. let fee = (quest.reward_amount * 15) / 100;
// 2. let base_learner_amount = quest.reward_amount - fee;
// 3. let multiplier = stake_vault_client.get_multiplier(&learner);
// 4. let boosted_amount = (base_learner_amount * multiplier as i128) / 100;
// 5. enforce an explicit funding source for any amount above base_learner_amount;
// 6. transfer fee to RewardPool and boosted amount to learner.

Acceptance Criteria

  • A learner with a 120 multiplier receives more than the non-staked learner for the same approved quest.
  • Basis-point math remains correct for 100, 120, and 200 multiplier tiers.
  • The contract fails deterministically if the configured funding source cannot cover the boosted payout.

Submission Guidelines

  • Branch: feat/real-multiplier-payouts
  • Depends on: [QuestEngine] Platform fee extraction, [StakeVault] Get user reward multiplier (view)
  • PR: feat(quest-engine): deliver uncapped staking multiplier payouts

Activity

  1. Birdmannn commented on Jul 25, 2026

    @Birdmannn
    Contributor

    Hi, i have experience in writing soroban smart contracts, and i can solve this issue. ETA: 36 hours

  2. grantfox-oss commented on Jul 25, 2026

    @grantfox-oss

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

    Next steps:

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

    Good luck! Track your progress on GrantFox.

  3. grantfox-oss commented on Jul 29, 2026

    @grantfox-oss

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

    @Birdmannn's PR #103 was approved and merged by @Kaylahray.

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

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

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