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

Staking Contract v0.3 #1

Merged
merged 106 commits into from
Sep 19, 2019
Merged

Staking Contract v0.3 #1

merged 106 commits into from
Sep 19, 2019

Conversation

lbeder
Copy link
Contributor

@lbeder lbeder commented Sep 19, 2019

No description provided.

@OdedWx OdedWx self-requested a review September 19, 2019 16:48
Copy link
Contributor

@OdedWx OdedWx left a comment

Choose a reason for hiding this comment

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

approved. Required fixes: (in a separate PR):

Modify events
event Staked(address indexed stakeOwner, uint256 amount, uint256 total_staked_amount);
event Unstaked(address indexed stakeOwner, uint256 amount, uint256 total_staked_amount);
event Restaked(address indexed stakeOwner, uint256 amount, uint256 total_staked_amount);
event Withdrew(address indexed stakeOwner, uint256 amount, uint256 total_staked_amount);
event AcceptedMigration(address indexed stakeOwner, uint256 amount, uint256 total_staked_amount);

distributeRewards:

  • Inefficiency of multiple ERC20 transfers, a single transfer is preferred

notifyStakeChange:
if (!address(notifier).call(abi.encodeWithSelector(notifier.stakeChange.selector, _stakeOwner))) {

  • Need to set Gas limit to ensure no ability to prevent execution (can be quite a high limit such as 2M GAS)

PartialMigrate
Migrates only part of the staked tokens

@lbeder lbeder merged commit 7b983e4 into master Sep 19, 2019
@lbeder lbeder deleted the v0.3 branch September 19, 2019 16:55
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