Vulnerability: keep-core - Specification inconsistency: TokenStaking amount to be slashed/seized
Severity: low

Description:
The keep specification states that `slash` and `seize` affect at least the amount specified or the remaining stake of a member.\\nSlash each operator in the list misbehavers by the specified amount (or their remaining stake, whichever is lower).\\nPunish each operator in the list misbehavers by the specified amount or their remaining stake.\\nThe implementation, however, bails if one of the accounts does not have enough stake to be slashed or seized because of the use of `SafeMath.sub()`. This behavior is inconsistent with the specification which states that `min(amount, misbehaver.stake)` stake should be affected. The call to slash/seize will revert and no stakes are affected. At max, the staked amount of the lowest staker can be slashed/seized from every staker.\\nImplementing this method as stated in the specification using `min(amount, misbehaver.stake)` will cover the fact that slashing/seizing was only partially successful. If `misbehaver.stake` is zero no error might be emitted even though no stake was slashed/seized.\\n```\\n/\\*\\*\\n \\* @dev Slash provided token amount from every member in the misbehaved\\n \\* operators array and burn 100% of all the tokens.\\n \\* @param amount Token amount to slash from every misbehaved operator.\\n \\* @param misbehavedOperators Array of addresses to seize the tokens from.\\n \\*/\\nfunction slash(uint256 amount, address[] memory misbehavedOperators)\\n    public\\n    onlyApprovedOperatorContract(msg.sender) {\\n    for (uint i = 0; i < misbehavedOperators.length; i++) {\\n        address operator = misbehavedOperators[i];\\n        require(authorizations[msg.sender][operator], "Not authorized");\\n        operators[operator].amount = operators[operator].amount.sub(amount);\\n    }\\n\\n    token.burn(misbehavedOperators.length.mul(amount));\\n}\\n\\n/\\*\\*\\n \\* @dev Seize provided token amount from every member in the misbehaved\\n \\* operators array. The tattletale is rewarded with 5% of the total seized\\n \\* amount scaled by the reward adjustment parameter and the rest 95% is burned.\\n \\* @param amount Token amount to seize from every misbehaved operator.\\n \\* @param rewardMultiplier Reward adjustment in percentage. Min 1% and 100% max.\\n \\* @param tattletale Address to receive the 5% reward.\\n \\* @param misbehavedOperators Array of addresses to seize the tokens from.\\n \\*/\\nfunction seize(\\n    uint256 amount,\\n    uint256 rewardMultiplier,\\n    address tattletale,\\n    address[] memory misbehavedOperators\\n) public onlyApprovedOperatorContract(msg.sender) {\\n    for (uint i = 0; i < misbehavedOperators.length; i++) {\\n        address operator = misbehavedOperators[i];\\n        require(authorizations[msg.sender][operator], "Not authorized");\\n        operators[operator].amount = operators[operator].amount.sub(amount);\\n    }\\n\\n    uint256 total = misbehavedOperators.length.mul(amount);\\n    uint256 tattletaleReward = (total.mul(5).div(100)).mul(rewardMultiplier).div(100);\\n\\n    token.transfer(tattletale, tattletaleReward);\\n    token.burn(total.sub(tattletaleReward));\\n}\\n```\\n

Impact:

Recommended mitigation:
Require that `minimumStake` has been provided and can be seized/slashed. Update the documentation to reflect the fact that the solution always seizes/slashes `minimumStake`. Ensure that stakers cannot cancel their stake while they are actively participating in the network.