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

feat: reward ratio calculation #461

Merged
merged 88 commits into from
Jan 19, 2025
Merged

Conversation

mconcat
Copy link
Contributor

@mconcat mconcat commented Jan 15, 2025

No description provided.

@onlyhyde onlyhyde force-pushed the mconcat/staker-reward-optimization branch from 956ba16 to e3a1a46 Compare January 15, 2025 13:09
staker/staker.gno Show resolved Hide resolved
staker/staker.gno Show resolved Hide resolved
staker/staker.gno Outdated Show resolved Hide resolved
staker/staker.gno Outdated Show resolved Hide resolved
@onlyhyde onlyhyde marked this pull request as ready for review January 19, 2025 14:18
@onlyhyde onlyhyde requested a review from r3v4s January 19, 2025 14:18
staker/README.md Outdated Show resolved Hide resolved
Copy link
Member

@dongwon8247 dongwon8247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@notJoon notJoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@notJoon notJoon merged commit a9e1f35 into main Jan 19, 2025
1 of 2 checks passed
@notJoon notJoon deleted the mconcat/staker-reward-optimization branch January 19, 2025 18:56
@r3v4s r3v4s mentioned this pull request Jan 20, 2025
moul pushed a commit that referenced this pull request Jan 20, 2025
* add reward ratio calculation

* reward ratio logic works

* prototyping

* remove unncesary comments

* callback: emission

* warmup works

* save

* warmup with test works

* add reward ratio calculation

* reward ratio logic works

* warmup works

* warmup with test works

* external reward WIP

* add callbacks

* test works

* remove unused code

* rename

* prototyping

* remove unncesary comments

* callback: emission

* save

* add callbacks

* test works

* remove unused code

* rename

* internal + emission working

* fix: emission callback panic issue

* fix: callbackStakerEmissionChange is nil

* emission change applied works

* external reward works

* fix emission

* external unclaimable works

* test: full test

* fix modifyDeposit

* test: full test update

* fix

* fix

* test : test code update

* fix : pool tier

* fix: full test // wip

* fix: missing init // by @mconcat

* fix: full test // wip

* fix: nil error when pool has only external incentive

* fix: external incentive is not being calculated

* fix: full test // most of tc runs good, reward amount seems ok // wip

* fix: full test // emission reward comparing

* fix: check amount with error range 99.99%

* fix: every test functino to check gns balance (and external reward amount if necessary)

* chore: rename

* test(fix): __TEST_more_01

* test(fix): __TEST_more_02

* test(fix): __TEST_more_04

* test(fix): fix test cases

* fix: when collecting reward, unwrapping should be supported for ugnot coin

* chore: rename

* update canonical env

* fix callback nil

* test(fix): external gnoA

* test(fix): staker full test with all reward calculated

* chore

* test(fix): adjust deposit amount (co-author: @mconcat)

* test(fix): fix internal gnoA

* test(fix): fix test

* add comments, remove unused code

* test(feat): pool with internal reward + external gns

* test(chore): remove duplicated scenario

* remove unnecesary comment

* reimplement api.gno

* feat: remove unused cross (co-author: @mconcat)

* fix: `ApiGetRewardTokens()` not to early return

* remove debug lines

* remove unused lines

* resolve TODOs

* readme wip

* readme

* readme

* readme

---------

Co-authored-by: Lee ByeongJun <lbj199874@gmail.com>
Co-authored-by: 0xTopaz <myunghwan@onbloc.xyz>
Co-authored-by: n3wbie <r3v4@onbloc.xyz>
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.

5 participants