Description: Implement a RewardContract that distributes platform tokens (in-loop/SDC or similar) to users based on prediction accuracy, idea quality votes, and community engagement milestones.
Acceptance Criteria:
distribute_prediction_reward(user: Address, prediction_id: i128, accuracy_bonus: u32) – calculates and transfers reward based on accuracy tier
stake_tokens(user: Address, amount: i128, duration: u64) – lock tokens for staking rewards; returns stake ID
claim_stake_reward(stake_id: i128, claimer: Address) – releases stake + accumulated rewards after duration
get_pending_rewards(user: Address) -> i128 – view-only pending reward balance
Reward tiers: Bronze (< 50% accuracy), Silver (50-75%), Gold (> 75%) with multiplier bonuses
Reward source: contract holds a token balance (funded externally); transfer_to(to: Address, amount: i128) for payouts
Slippage/overflow protections on all arithmetic
Event RewardDistributed(user, prediction_id, amount, tier) on payout
Description: Implement a RewardContract that distributes platform tokens (in-loop/SDC or similar) to users based on prediction accuracy, idea quality votes, and community engagement milestones.
Acceptance Criteria:
distribute_prediction_reward(user: Address, prediction_id: i128, accuracy_bonus: u32) – calculates and transfers reward based on accuracy tier
stake_tokens(user: Address, amount: i128, duration: u64) – lock tokens for staking rewards; returns stake ID
claim_stake_reward(stake_id: i128, claimer: Address) – releases stake + accumulated rewards after duration
get_pending_rewards(user: Address) -> i128 – view-only pending reward balance
Reward tiers: Bronze (< 50% accuracy), Silver (50-75%), Gold (> 75%) with multiplier bonuses
Reward source: contract holds a token balance (funded externally); transfer_to(to: Address, amount: i128) for payouts
Slippage/overflow protections on all arithmetic
Event RewardDistributed(user, prediction_id, amount, tier) on payout