-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't collect rewards on extend #266
Comments
Despite knowing about this, I was very alarmed just now after extending 1 of 6 existing stakes and then seeing my Accrued Rewards go down to almost 0. After a few seconds, I remembered this issue and noticed that my OGV balance had gone up. I don't see how any normal user would notice this and it certainly wasn't indicated when I was going through the process of extending my stake. |
Yeah, this isn't a good experience at all. @DanielVF A similar question as in #265 - why do we collect rewards here: ousd-governance/contracts/OgvStaking.sol Line 187 in 36c9bc7
|
This is how Masterchef style contracts work. Any time you make a change to your stake amount, a bunch of math happens, rewards are calculated and collected for everyone and rewards are paid to the user. Because this happens on any stake amount change, everyone is always earning the right amount. We could store how much "deferred" reward payout a user has, and pay it only when it's explicitly requested. We'd do all the math that we currently do, but then instead of transferring to the user, we'd just add it to their internal account. While it wouldn't be huge in code size, it would a change to a critical part of how the contract works. |
Just tracking this as a possible feature request 📌 #253 (comment)
The text was updated successfully, but these errors were encountered: