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
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
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
contracts/quest-engine/src/lib.rs,contracts/quest-engine/src/test.rsreview_submission, keep the 15% platform fee logic and compute the boosted learner amount from the post-fee base amountbase_learner_amountStakeVault::get_multiplierSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/real-multiplier-payouts[QuestEngine] Platform fee extraction,[StakeVault] Get user reward multiplier (view)feat(quest-engine): deliver uncapped staking multiplier payouts