diff --git a/contracts/Collateral.sol b/contracts/Collateral.sol index 1719be2..7f23e8c 100644 --- a/contracts/Collateral.sol +++ b/contracts/Collateral.sol @@ -48,19 +48,11 @@ abstract contract Collateral { assert(token.transfer(msg.sender, amount)); } - function _slashAmount(address account, uint256 percentage) - internal - view - returns (uint256) - { - return (balanceOf(account) * percentage) / 100; - } - function _slash(address account, uint256 percentage) internal collateralInvariant { - uint256 amount = _slashAmount(account, percentage); + uint256 amount = (balanceOf(account) * percentage) / 100; funds.slashed += amount; subtract(account, amount); }