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

Locked SOV Contract #219

Merged
merged 21 commits into from
May 13, 2021
Merged

Locked SOV Contract #219

merged 21 commits into from
May 13, 2021

Conversation

ghost
Copy link

@ghost ghost commented May 7, 2021

LockedSOV Contract General Explanation: https://docs.google.com/document/d/1nUzZSjmliifOPsY5SmSTUf_hCA1l_TIsoY9rPy8y7-Y/

A more detailed update on the explanation will be done soon.

@ghost ghost added the enhancement New feature or request label May 7, 2021
@ghost ghost requested review from eMarchenko and ororopickpocket May 7, 2021 15:12
@ghost ghost self-assigned this May 7, 2021
@ghost ghost added this to In progress in Sovryn via automation May 7, 2021
Copy link
Contributor

@ororopickpocket ororopickpocket left a comment

Choose a reason for hiding this comment

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

Nice! Would approve it, but waiting for the tests before doing so ;)

contracts/locked/LockedSOV.sol Show resolved Hide resolved
contracts/locked/LockedSOV.sol Show resolved Hide resolved
* @return _duration This returns 2419200.
* @dev This is calculated based on 4 * 7 days * 24 hours * 60 minutes * 60 seconds.
*/
function fourWeeks() public pure returns (uint256 _duration) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just using a constant?

Copy link
Author

Choose a reason for hiding this comment

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

Changed in 540d9bd

* @notice Stakes tokens for a user who already have a vesting created.
* @dev The user should already have a vesting created, else this function will throw error.
*/
function stakeTokens() external {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would find it nice if there would be a function which

  1. withdraws the unlocked tokens and
  2. stakes the locked tokens
    at once

Copy link
Author

Choose a reason for hiding this comment

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

Added in a57eae8

Copy link

@eMarchenko eMarchenko left a comment

Choose a reason for hiding this comment

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

deposit function is vulnerable

contracts/locked/LockedSOV.sol Outdated Show resolved Hide resolved
contracts/locked/LockedSOV.sol Show resolved Hide resolved
Sovryn automation moved this from In progress to Review in progress May 7, 2021
@ghost ghost linked an issue May 9, 2021 that may be closed by this pull request
@ghost ghost added this to doing in Circle of Chaos May 9, 2021
Sovryn automation moved this from Review in progress to Reviewer approved May 11, 2021
@ororopickpocket ororopickpocket merged commit 1617780 into development May 13, 2021
Sovryn automation moved this from Reviewer approved to Done May 13, 2021
@ororopickpocket ororopickpocket deleted the locked branch May 13, 2021 14:33
@ororopickpocket ororopickpocket moved this from doing to completed in Circle of Chaos May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Sovryn
  
Done
Development

Successfully merging this pull request may close these issues.

LockedSOV Contract
3 participants