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

Token Staking - unstaking #5

Closed
wants to merge 2 commits into from
Closed

Token Staking - unstaking #5

wants to merge 2 commits into from

Conversation

r-czajkowski
Copy link
Contributor

@r-czajkowski r-czajkowski commented Oct 26, 2023

Depends on: #11
Refs: #2

This PR adds the initial implementation of the unstaking to the Token Staking contract. Unstaking reduces the stake amount by the provided amount and withdraws tokens to the owner.

r-czajkowski and others added 2 commits November 2, 2023 09:52
Add `unstake` function to the `TokenStaking` contract - this function
reduces stake amount by the provided amount and withdraws tokens to the
owner.
Create `Staker` struct that stores info about staker. Use this struct in
`stakers` map instead of `balanceOf` map. We need to know when user
staked their tokens because we want to add unstaking period - it measn
the unstaking can be called when unstaking period passed since the stake
has been deposited.
@r-czajkowski
Copy link
Contributor Author

We decided to implement the ERC-4626 standard (Tokenized Vaults) so we do not need a separate token staking contract.

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.

1 participant