Skip to content

fix: stop accumulating DIP rewards after risk bundle is closed/burned - #39

Open
VQToan wants to merge 1 commit into
etherisc:developfrom
VQToan:fix-accumulate-rewards-after-burn
Open

fix: stop accumulating DIP rewards after risk bundle is closed/burned#39
VQToan wants to merge 1 commit into
etherisc:developfrom
VQToan:fix-accumulate-rewards-after-burn

Conversation

@VQToan

@VQToan VQToan commented May 14, 2026

Copy link
Copy Markdown

Fixes #31

Description

Prevents DIP rewards from accumulating after a risk bundle is closed or burned. Currently, stakers continue to accrue rewards even after the risk bundle is inactive, leading to incorrect reward distribution.

Changes

  • Overrode _afterCloseBundle and _afterBurnBundle in DepegRiskpool.sol to hook into bundle state transitions.
  • Included logic to call setTargetRewardRate(nftId, 0) on the staking facade when the bundle is closed or burned, stopping further DIP reward accrual.
  • Updated IStakingFacadeExt.sol to include the setTargetRewardRate method definition so it can be called correctly.

This PR was created with AI assistance.

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.

[Bug]: It is possible to accumulate DIP rewards after the risk bundle was closed, USDT unstaked/bundle burned

1 participant