Skip to content
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

Open
micahalcorn opened this issue Jul 20, 2022 · 3 comments
Open

Don't collect rewards on extend #266

micahalcorn opened this issue Jul 20, 2022 · 3 comments
Labels
enhancement New feature or request P4 Something to consider, a feature request that we may not pursue

Comments

@micahalcorn
Copy link
Member

Just tracking this as a possible feature request 📌 #253 (comment)

@micahalcorn micahalcorn added enhancement New feature or request solidity P4 Something to consider, a feature request that we may not pursue labels Jul 20, 2022
@micahalcorn micahalcorn moved this from Backlog to To-do in Origin DeFi (OUSD + OETH) Jul 20, 2022
@micahalcorn micahalcorn moved this from To-do to Backlog in Origin DeFi (OUSD + OETH) Jul 20, 2022
@micahalcorn
Copy link
Member Author

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.

@micahalcorn micahalcorn added P1 Large amount of significant user impact, a meaningful feature is broken and removed P4 Something to consider, a feature request that we may not pursue labels Jul 23, 2022
@tomhirst
Copy link
Contributor

Yeah, this isn't a good experience at all.

@DanielVF A similar question as in #265 - why do we collect rewards here:

_collectRewards(msg.sender);

@DanielVF
Copy link
Contributor

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.

@micahalcorn micahalcorn added P4 Something to consider, a feature request that we may not pursue and removed P1 Large amount of significant user impact, a meaningful feature is broken labels Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P4 Something to consider, a feature request that we may not pursue
Projects
Status: Backlog
Development

No branches or pull requests

4 participants