Description
Quest funding rules need explicit accounting for how much a quest has escrowed, how much has already been committed, and how much remains available for refunds or future approvals.
User Story
As the Learnault Protocol,
I want to track quest escrow consumption explicitly,
so that payouts, refunds, and boosted rewards cannot overrun the intended quest budget.
Requirements and Context
- Files:
contracts/quest-engine/src/lib.rs, contracts/quest-engine/src/types.rs, contracts/quest-engine/src/test.rs
- Track quest funding, consumed payout amount, refunded amount, and remaining available escrow
- Update the accounting when submissions are approved, boosted, batch-approved, or refunded
- Use this accounting to enforce payout and refund eligibility
Suggested Implementation
// 1. Extend quest state with escrow accounting fields or add dedicated accounting storage.
// 2. Increment consumed amount on approval.
// 3. Decrement/close remaining amount on refund.
// 4. Validate that payouts cannot exceed available quest funding.
Acceptance Criteria
Submission Guidelines
- Branch:
feat/quest-escrow-accounting
- Depends on:
[QuestEngine] Deliver uncapped staking multiplier payouts, [QuestEngine] Build quest refund mechanism
- PR:
feat(quest-engine): add explicit escrow budget tracking
Description
Quest funding rules need explicit accounting for how much a quest has escrowed, how much has already been committed, and how much remains available for refunds or future approvals.
User Story
As the Learnault Protocol,
I want to track quest escrow consumption explicitly,
so that payouts, refunds, and boosted rewards cannot overrun the intended quest budget.
Requirements and Context
contracts/quest-engine/src/lib.rs,contracts/quest-engine/src/types.rs,contracts/quest-engine/src/test.rsSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/quest-escrow-accounting[QuestEngine] Deliver uncapped staking multiplier payouts,[QuestEngine] Build quest refund mechanismfeat(quest-engine): add explicit escrow budget tracking