fee to 5 bips

This commit is contained in:
Noah Zinsmeister
2020-02-06 15:38:58 -05:00
parent 986d2491bd
commit 5c042758e8
2 changed files with 5 additions and 5 deletions

View File

@ -88,7 +88,7 @@ contract UniswapV2Exchange is IUniswapV2Exchange, UniswapV2ERC20 {
uint rootKLast = Math.sqrt(_kLast);
if (rootK > rootKLast) {
uint numerator = totalSupply.mul(rootK.sub(rootKLast));
uint denominator = rootK.mul(4).add(rootKLast);
uint denominator = rootK.mul(5).add(rootKLast);
uint liquidity = numerator / denominator;
if (liquidity > 0) _mint(feeTo, liquidity);
}

View File

@ -255,10 +255,10 @@ describe('UniswapV2Exchange', () => {
const expectedLiquidity = expandTo18Decimals(1000)
await exchange.transfer(exchange.address, expectedLiquidity)
await exchange.burn(wallet.address, overrides)
expect(await exchange.totalSupply()).to.eq('299700614071741')
expect(await exchange.balanceOf(other.address)).to.eq('299700614071741')
expect(await exchange.totalSupply()).to.eq('249750499251388')
expect(await exchange.balanceOf(other.address)).to.eq('249750499251388')
expect(await token0.balanceOf(exchange.address)).to.eq('299402020436935')
expect(await token1.balanceOf(exchange.address)).to.eq('300000224775562')
expect(await token0.balanceOf(exchange.address)).to.eq('249501683697446')
expect(await token1.balanceOf(exchange.address)).to.eq('250000187312968')
})
})