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

Track beneficiary and earning power on stake and withdrawal #9

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

apbendi
Copy link
Collaborator

@apbendi apbendi commented Dec 16, 2023

Stakers will be able to assign the rewards earned by their stake to an
arbitrary address of their choosing. This commit adds the machinery to track
said "beneficiary" address. It is included in the Deposit struct. What's more,
the total "earning power" of every address is tracked in a mapping independent
of deposit balance.

@apbendi apbendi marked this pull request as draft December 16, 2023 16:11
@apbendi apbendi marked this pull request as ready for review December 30, 2023 11:37
Copy link
Collaborator

@alexkeating alexkeating left a comment

Choose a reason for hiding this comment

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

LGTM

src/UniStaker.sol Show resolved Hide resolved
Copy link
Collaborator

@wildmolasses wildmolasses left a comment

Choose a reason for hiding this comment

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

lgtm, a couple nits

src/UniStaker.sol Show resolved Hide resolved
test/UniStaker.t.sol Show resolved Hide resolved
test/UniStaker.t.sol Outdated Show resolved Hide resolved
Stakers will be able to assign the rewards earned by their stake to an
arbitrary address of their choosing. This commit adds the machinery to track
said "beneficiary" address. It is included in the Deposit struct. What's more,
the total "earning power" of every address is tracked in a mapping independent
of deposit balance.
Copy link

github-actions bot commented Jan 3, 2024

Coverage after merging track-beneficiary into main will be

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   UniStaker.sol96.97%75%100%100%75

@apbendi apbendi merged commit 00603e9 into main Jan 3, 2024
4 checks passed
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.

3 participants