Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libraries/ElasticMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ library ElasticMath {
* @return uint256
*/
function revamp(uint256 elasticity) internal pure returns (uint256) {
return SafeMath.add(elasticity, SafeMath.pow(10, 18));
return SafeMath.add(elasticity, 1000000000000000000);
}

/**
Expand Down
20 changes: 0 additions & 20 deletions src/libraries/SafeMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,6 @@ library SafeMath {
return c;
}

/**
* @dev Returns one unsigned integer to the power of another, reverting on
* a multiplication overflow.
*
* Counterpart to Solidity's `**` operator.
*/
function pow(uint256 base, uint256 exponent) internal pure returns (uint256) {
if (exponent == 0) {
return 1;
} else if (exponent == 1) {
return base;
} else if (base == 0 && exponent != 0) {
return 0;
} else {
uint256 z = base;
for (uint256 i = 1; i < exponent; i += 1) z = mul(z, base);
return z;
}
}

/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
Expand Down