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

Stake: pay rewards during unbond #170

Merged
merged 10 commits into from
Mar 11, 2024
Merged

Conversation

gangov
Copy link
Collaborator

@gangov gangov commented Dec 1, 2023

No description provided.

@gangov gangov self-assigned this Dec 1, 2023
@gangov gangov linked an issue Dec 1, 2023 that may be closed by this pull request
@gangov gangov force-pushed the 80-stake-pay-rewards-during-unbond branch from 56af681 to aa5de26 Compare March 5, 2024 14:51
@gangov gangov marked this pull request as ready for review March 5, 2024 15:19
@gangov gangov requested a review from ueco-jb March 5, 2024 15:19
@ueco-jb
Copy link
Member

ueco-jb commented Mar 6, 2024

Also you did nothing on multihop, so the title is misleading.

@gangov gangov changed the title Stake: first implementation at checking the rewards before unbond; Multihop: formatting Stake: pay rewards during unbond Mar 6, 2024
@gangov gangov requested a review from ueco-jb March 6, 2024 17:10
@gangov gangov requested a review from ueco-jb March 8, 2024 09:03
@gangov gangov requested a review from ueco-jb March 8, 2024 14:01
Comment on lines 250 to 254
staking.fund_distribution(&owner, &0u64, &10_000u64, &lp_token.address, &AMOUNT);

env.ledger().with_mut(|li| {
li.timestamp = WITHDRAW_TIMESTAMP;
});
Copy link
Member

Choose a reason for hiding this comment

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

You created a distribution ranging from timestamp 0 to timestamp 10_000, and you immediately jump 2000 seconds ahead. Why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I chose numbers based on other places in our code where we change the ledger().timestamp. Do the numbers we use matter?

contracts/stake/src/tests/bond.rs Outdated Show resolved Hide resolved
@gangov gangov requested a review from ueco-jb March 11, 2024 10:10
Copy link
Member

@ueco-jb ueco-jb left a comment

Choose a reason for hiding this comment

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

LGTM
Add this to the changelog please.

@gangov gangov merged commit 47566b2 into main Mar 11, 2024
3 checks passed
@gangov gangov deleted the 80-stake-pay-rewards-during-unbond branch March 11, 2024 11:33
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.

Stake: pay rewards during unbond
2 participants