-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
…ept addresses and not interfaces
There was a problem hiding this 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
No description provided.