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
rapidddenis
changed the title
[Bug]: claimRewards() rewards is always sending 0 DIP rewards and resets user's rewardsBalance when called before unstake()
[Bug]: claimRewards() is always sending 0 DIP rewards and resets user's rewardsBalance when called before unstake()
Apr 1, 2023
Missing call to _updateRewards() during claimRewards(), thus info[].rewardBalance stays 0 and no DIP is transferred. While _decreaseRewards() updating info[].updatedAt to current block which resets rewards calculations
What happened?
Steps to reproduce:
https://mumbai.polygonscan.com/tx/0xe0535fb6ec7782dceb8a488675425b40a97901a5bbd7eeed23eb5f4c5b2f48c0
https://mumbai.polygonscan.com/tx/0x036d950af16481c409ba7a3b168df5a3623d66ee072df4b9c7e9fd89dac721af
Expected behaviour: DIP transferred >= "Accumulated Rewards" value in staking UI
Actual behaviour: DIP transferred = 0, "Accumulated Rewards" resets to 0.
First claim:
https://mumbai.polygonscan.com/tx/0x3626d3b0f1c9aeba6f724259a9fbd9a8d69cfc9d91f869957f9164e86e765af3
Second claim:
https://mumbai.polygonscan.com/tx/0xff684a1b10c60e4e3ec3a9335598314b4e50cd186cc47973fb46b92e29f88402
Close risk bundle
https://mumbai.polygonscan.com/tx/0x2160d9fc129a9f40f0b9ab94bd33e02c889873a440d8227c6cbdb2b4172f5d05
Unstake DIP without claiming rewards.
https://mumbai.polygonscan.com/tx/0xd6633cce0acf2c401ea9fd14db999750dd307de9453c7575c69e313481ae4be6
Claim rewards. This time DIP transferred > 0 but value is smaller than first and second claims combined.
https://mumbai.polygonscan.com/tx/0x0763820d43e80609555ea51643a5e1b5a80b7f5c235d8f1485e652a55651da67
What operating system are you seeing the problem on?
Mac OS
What browsers are you seeing the problem on?
Safari
What wallet extension are you using?
Metamask
Rules
The text was updated successfully, but these errors were encountered: