Skip to content

fix: account for mint delay in reward calculations - #51

Merged
rsolari merged 1 commit into
mainfrom
rsolari/mint-delay-compensation
Feb 11, 2026
Merged

fix: account for mint delay in reward calculations#51
rsolari merged 1 commit into
mainfrom
rsolari/mint-delay-compensation

Conversation

@rsolari

@rsolari rsolari commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The RequestMint script now accounts for the configurable mint delay when calculating required rewards. Previously, it calculated remaining rewards at the current timestamp, but since the mint executes after a delay, additional rewards stream out by execution time, causing undershooting of the target APR.

The fix projects remaining rewards forward by the mintDelay amount, ensuring the minted tokens compensate for rewards streamed during the delay period.

Test plan

  • Verify with --dry-run that the calculated mint amount reflects delay compensation
  • Check the output shows delay in hours and notes the compensation
  • Run against mainnet contracts to confirm APR targets are now met

🤖 Generated with Claude Code

…estMint

The RequestMint script calculates how many rewards to mint based on current
remaining rewards, but the actual mint executes after a configurable delay.
By that time, additional rewards have streamed out, causing the resulting
APR to undershoot the target. Now we project remaining rewards forward by
the mintDelay, so we mint enough to hit the target APR at execution time.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Coverage after merging rsolari/mint-delay-compensation into main will be

73.33%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   ZkStaker.sol68.42%100%50%73.33%79, 85, 90, 95

@rsolari
rsolari merged commit c986166 into main Feb 11, 2026
4 checks 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.

1 participant