diff --git a/contracts/ethPool.sol b/contracts/ethPool.sol index 8b2a4ad..e396cd1 100644 --- a/contracts/ethPool.sol +++ b/contracts/ethPool.sol @@ -85,8 +85,7 @@ contract PoolToken is ReentrancyGuard, ERC20Pausable, DSMath { insuranceAmt = sub(insuranceAmt, difTkn); _currentRate = _previousRate; } else { - uint fee = registry.insureFee(address(this)); - uint insureFeeAmt = wmul(sub(_totalToken, tokenBalance), fee); + uint insureFeeAmt = wmul(sub(_totalToken, tokenBalance), registry.insureFee(address(this))); insuranceAmt = add(insuranceAmt, insureFeeAmt); tokenBalance = sub(_totalToken, insureFeeAmt); _currentRate = wdiv(totalSupply(), tokenBalance);