Created
February 10, 2021 07:21
-
-
Save justinbarry/a5e21846795365702ac141fa621121fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| factory.transferCash(augurMarket, shareToken, fee, _user, address(this), _cash); | |
| // Move 5% of cash to the balancer pool. | |
| uint256 _cashToSendToPool = (_cash * 5 * 10**16) / 10**18; | |
| uint _poolCashBalance = bPool.getBalance(address(cash)); | |
| uint _poolLPTokenTotalSupply = bPool.totalSupply(); | |
| uint256 _lpTokenOut = _cashToSendToPool.div(_poolCashBalance).mul(_poolLPTokenTotalSupply); | |
| shareToken.publicBuyCompleteSets(augurMarket, _cashToSendToPool.div(numTicks)); | |
| uint256[] memory _maxAmountsIn = new uint256[](2); | |
| _maxAmountsIn[0] = 2**128-1; | |
| _maxAmountsIn[1] = 2**128-1; | |
| bPool.joinPool(_lpTokenOut, _maxAmountsIn); | |
| _cash = cash.balanceOf(address(this)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment