Files
uniswap-v2/contracts/libraries/Math.sol
Noah Zinsmeister 5b15d59773 approveMeta -> permit
call factory for fee logic

fail on balances > max112

add skim

use reserves in burnLiquidity
2019-12-13 17:25:04 -05:00

21 lines
442 B
Solidity

pragma solidity 0.5.14;
library Math {
function min(uint x, uint y) internal pure returns (uint z) {
z = x <= y ? x : y;
}
function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
uint x = (y + 1) / 2;
z = y;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
}