Skip to content

Commit

Permalink
note edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahZinsmeister committed Dec 20, 2019
1 parent 2037952 commit d2ddbd9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contracts/UniswapV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ contract UniswapV2 is IUniswapV2, ERC20("Uniswap V2", "UNI-V2", 18, 0) {
function made() external lock returns (uint amount0, uint amount1) {
uint liquidity = balanceOf[address(this)];

// there's a funny case here where if a token deflates uniswap's balance, we give too many tokens...
amount0 = liquidity.mul(reserve0) / totalSupply;
amount1 = liquidity.mul(reserve1) / totalSupply;
require(amount0 > 0 && amount1 > 0, "UniswapV2: INSUFFICIENT_LIQUIDITY_BURNED");
Expand Down

0 comments on commit d2ddbd9

Please sign in to comment.