Skip to content

feat(quest-engine): add explicit escrow budget tracking - #101

Merged
Kaylahray merged 1 commit into
learnault:mainfrom
augusthottie:feat/quest-escrow-accounting
Jul 28, 2026
Merged

feat(quest-engine): add explicit escrow budget tracking#101
Kaylahray merged 1 commit into
learnault:mainfrom
augusthottie:feat/quest-escrow-accounting

Conversation

@augusthottie

Copy link
Copy Markdown
Contributor

Track total_funded, consumed_amount, and refunded_amount on each Quest so payouts, refunds, and boosted rewards cannot overrun the intended quest budget.

  • review_submission and batch_review_submissions now check the quest's remaining budget before paying out and increment consumed_amount.
  • Multiplier boosts are capped by the remaining escrow (never overspent).
  • refund_quest returns only the unspent balance and records it as refunded_amount, allowing partial refunds after rejections while panicking when there is nothing left to return.
  • Add get_quest_budget view and QuestBudgetUpdated event for observability.

Closes #96

Track total_funded, consumed_amount, and refunded_amount on each Quest
so payouts, refunds, and boosted rewards cannot overrun the intended
quest budget.

- review_submission and batch_review_submissions now check the quest's
  remaining budget before paying out and increment consumed_amount.
- Multiplier boosts are capped by the remaining escrow (never overspent).
- refund_quest returns only the unspent balance and records it as
  refunded_amount, allowing partial refunds after rejections while
  panicking when there is nothing left to return.
- Add get_quest_budget view and QuestBudgetUpdated event for observability.

Closes learnault#96
@Kaylahray
Kaylahray merged commit b3884c9 into learnault:main Jul 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QuestEngine] Add quest escrow budget tracking

2 participants