You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Location:contracts/puzzle_pool_staking Estimated Time: 7 hours Difficulty: Hard
Description
Allow players to stake tokens into a shared puzzle reward pool. Each week, a portion of the pool is distributed proportionally among players who solved puzzles that week, weighted by their solve count and difficulty. Stakers also earn a passive yield share from the pool's weekly allocation.
Location:
contracts/puzzle_pool_stakingEstimated Time: 7 hours
Difficulty: Hard
Description
Allow players to stake tokens into a shared puzzle reward pool. Each week, a portion of the pool is distributed proportionally among players who solved puzzles that week, weighted by their solve count and difficulty. Stakers also earn a passive yield share from the pool's weekly allocation.
Tasks
StakePositionstruct:staker,amount,staked_at,last_claim_epochEpochstruct:epoch_id,start_at,end_at,total_solves,reward_budget,distributedstake(amount)— deposits tokens into pool, records positionunstake(amount)— withdraws stake after 7-day lock; partial unstake supportedrecord_solve(player, puzzle_difficulty)— callable by oracle; adds weighted solve credit for current epochclose_epoch()— admin closes epoch, sets reward distribution amountsclaim_epoch_reward(epoch_id)— player claims their proportional reward for that epochget_stake(player)— returns current stake and unclaimed epochsStaked,Unstaked,EpochClosed,RewardClaimed(player, epoch_id, amount)eventsAcceptance Criteria