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

Max at available balance in previewRewards #413

Merged
merged 3 commits into from May 8, 2024

Conversation

shahthepro
Copy link
Collaborator

@shahthepro shahthepro commented May 2, 2024

In the event that the contract has fewer reward tokens than are scheduled to be sent, send the reward tokens we have on hand and restart the rewards accrual.

@shahthepro shahthepro requested a review from DanielVF May 2, 2024 09:47
@shahthepro shahthepro mentioned this pull request May 2, 2024
5 tasks
@DanielVF DanielVF merged commit 2a51241 into shah/ogn-rewards-source May 8, 2024
3 checks passed
@DanielVF DanielVF deleted the shah/fix-preview-rewards branch May 8, 2024 15:27
@DanielVF DanielVF changed the title Check available balance in previewRewards Max at available balance in previewRewards May 16, 2024
DanielVF added a commit that referenced this pull request May 16, 2024
* Add OGNRewardsSource contract

* Make collectRewards only callable by RewardsTarget

* Draft xOGN staking contract

* Correct maxStakeDuration

* Add penalty event

* Change names

* Fix lockup ID

* Revert change and cast properly

* Gas opts

* Remove casting

* Add `getLockupsCount` method (#411)

* Allow non-duration change amount increase staking extends

* Add tests, add move lockupid code

* Add Migrator (#410)

* Add Migrator contract

* Fix some tests

* Code review changes

* Update OgvStaking tests

* Disable delegation tests

* Allow just unstakes

* Fix comment

* More cleanup

* Fix brownie tests

* Return 0 if uninitialized (#415)

* Check available balance in `previewRewards` (#413)

* Check available balance in `previewRewards`

* Chore: forge fmt

---------

Co-authored-by: Daniel Von Fange <daniel@leancoder.com>

---------

Co-authored-by: Daniel Von Fange <daniel@leancoder.com>
shahthepro added a commit that referenced this pull request May 22, 2024
* Add OGNRewardsSource contract

* Make collectRewards only callable by RewardsTarget

* Draft xOGN staking contract

* Correct maxStakeDuration

* Add penalty event

* Change names

* Fix lockup ID

* Revert change and cast properly

* Gas opts

* Remove casting

* Add `getLockupsCount` method (#411)

* Allow non-duration change amount increase staking extends

* Add tests, add move lockupid code

* Add Migrator (#410)

* Add Migrator contract

* Fix some tests

* Code review changes

* Update OgvStaking tests

* Disable delegation tests

* Allow just unstakes

* Fix comment

* More cleanup

* Fix brownie tests

* Return excess OGN rather than burn

* Simplify calculation

* Return 0 if uninitialized (#415)

* Check available balance in `previewRewards` (#413)

* Check available balance in `previewRewards`

* Chore: forge fmt

---------

Co-authored-by: Daniel Von Fange <daniel@leancoder.com>

* Fix: Remove unused errors (#416)

* First draft of deploy file

* Add fork test tooling (#419)

---------

Co-authored-by: Shahul Hameed <10547529+shahthepro@users.noreply.github.com>
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.

None yet

2 participants