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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions