Question's regarding rewardDebtAtBlock

Hi all,

I was just reading over the luaMasterFarmer contract, and I’ve noticed that unless _harvest is called, rewardDebtAtBlock is not updated, and if rewardDebtAtBlock isn’t updated then the next time we call _harvest - 75% will be locked - is this true even with rewards that are being minted now (outside of hyperinflation)?

For arguments sake, what happens if we don’t call _harvest at all over the next year? Will those rewards be immediately available to claim via release? Or will they still be locked? How does this work? It’s not explained in the blog post?

1 Like

rewardDebtAtBlock saves the block of the last time you harvest.
There are 2 instances when you harvest:

  1. If the rewardDebtAtBlock is greater than FINISH_BONUS_AT_BLOCK, your entire reward will not be locked.
  2. If the rewardDebtAtBlock is less than FINISH_BONUS_AT_BLOCK. 75% of your reward will be locked.

What happens to your reward in case you do not harvest the reward for an extended period even if the bonus period has ended.

Your 75% reward will still be locked upon harvest however you can unlock it immediately, eventually getting 100% off your reward.

Thanks Tung!

When you say they can be unlocked immediately, is that only in the case where harvest hasn’t been called for the next year?

If I leave unharvested rewards to build up now, they will be part of the rewards that will start to be unlocked in January of next year? They wont be immediately available for release now, or will they?

Which contract is responsible for releasing rewards?